I test my website using Mysql database on my local pc, and I use tomcat for the server. Now I want to upload it to google app engine to let others view the website, is possible to do that, or maybe I need to change some configuration file? Or GAE using other storage solution.
You cannot run local MySQL instances on the AppEngine, you will need to used Google Cloud SQL/
you can't upload it. maybe you must make some changes, more than just config files changes. appengine have some limitations that you need read appengine
use eclipse plugin to check
Related
We have a Windows file share with JPEGs that I'm trying to access from Pivotal Cloud Foundry via a Java Spring Boot REST API. What are the steps needed in both PCF and Java itself to achieve this?
Do I have to mount the drive in PCF first, then I can use the standard java.io libraries somehow to access this file? As of now we are simply wanting to read the JPEG files into a BufferedImage and return them as Base64 after some graphics manipulation (which I know how to do), but I'm stuck on getting my head around what to do for this within the realm of PCF. Obviously, it works just fine on my Windows development machine where my logged-in user also has credentials to the file share and no need to mount it or do anything special.
I keep reading about SMB and a JCIFS library online, but still not sure if this is what I need or how to fully apply this with the technologies at hand.
Starting in Pivotal Cloud Foundry 2.4, you are able to enable SMB volume services. This allows you to cf create-service a volume service that points to your SMB server. You can then bind that to your app, and when your app starts the platform will mount the SMB volume to the mount point you specify. At that point, your app would just need to know the mount point, like /smb or /files, so it could use standard Java I/O to read in the files.
If you are a platform operator, the instructions for enabling SMB volume services are here.
https://docs.pivotal.io/pivotalcf/2-4/opsguide/enable-vol-services.html#smb-enable
If you are a developer, the instructions for using it are here.
https://docs.pivotal.io/pivotalcf/2-4/devguide/services/using-vol-services.html#smb
If you are on an older version of PCF or your operator has not enabled this feature, then you would need to code something into your app to directly access your SMB volume. There are multiple libraries capable of doing this (and there could be more than in this list).
https://www.jcifs.org/
https://github.com/hierynomus/smbj
https://github.com/AgNO3/jcifs-ng
I can't recommend a particular one, so you'd need to evaluate and figure out which one works for you.
Do keep in mind that regardless of what you pick, you need to have network access to the SMB server from your application running on PCF. This means the IP needs to be routable and not blocked by a firewall. If you're unable to connect you may also want to review network access with your platform operator and make sure nothing is blocking the connection (firewall, application security groups, etc..).
Hope that helps!
I have developed a REST web-service in Java interacting with a MySQL database.I want to deploy the web-service and the create a database at a server so that I can invoke it from an application.I tried Microsoft Azure but was unable to get it done.Where can I find relevant information for this?
I had similar problems with a MySQL database using the third party option in the Azure Marketplace from ClearDb. What I ended up doing was switching my database from a MySQL instance to an Azure Database Instance (Subset of SQL Server's features.) This worked perfectly for me! I was able to query from my database feed data to my api, and access the API through my Azure Web App.
I understand this may not be an option for you, however, Digital Ocean is a great cloud hosting option (with scaling similar to Azure, although not as good in my honest opinion.) You can set up a Linux Environment with a MySQL Server and JVM and serve your whole API through there. Best of Luck!
#coderden, According to your description, I think you have been deployed your Java Application on an Azure WebApp. Then when you created a MySQL database on Azure for connection from the Java webapp, please make sure the webapp & mysql instance created in a same resource group and note the connection string of MySQL on Azure.
As reference, please see the article to try again although it's for PHP, the steps are the same for Java.
I have built a mobile application that needs to connect to my SpringBoot-WebApp which in turn has a MongoDB and some other things in the background.
I want to deploy this WebApp at Amazon AWS, but I am overwhelmed by all the possibilities. So far, I have just created it as a .jar, and ran it that way, and it worked fine at my other server.
Now, for traffic reasons and such, we want to move it to AWS. I have found out, that I need to create a .war instead of a .jar, which is not a problem. I then learned to upload this .war to Elastic Beanstalk. However, my application needs to connect to a MongoDB. I have logged on to AWS via SSH and installed MongoDB there and created the database, but it does not seem like this is the right way to do it.
It'd greatly appreciate if anyone could give me a hint on how to do this as I am very confused.
Thanks and best regards!
It isn't clear if you are doing this, but don't run MongoDB on Elastic Beanstalk. The Elastic Beanstalk server you have it installed on may be automatically deleted by AWS. In general you do not want to manually install anything on Elastic Beanstalk as it is a managed environment where servers may be automatically created or deleted based on server load.
Amazon doesn't provide a MongoDB service directly, so you either need to install and manage MongoDB on an EC2 instance (or fleet of instances) yourself, or use a third party MongoDB service that runs on AWS. You could use something like MongoLab which provides a MongoDB service that runs on AWS. This allows your network traffic between your web servers and database servers to stay within the AWS network, which you will want for both performance and security reasons.
If you use MongoLab just make sure you choose to create your database in the same AWS region that you are deploying your application to. Also, I wouldn't recommend their free sandbox databases for any sort of critical production application.
If you decide to install and manage MongoDB on AWS yourself, here is some documentation from Amazon, and some from MongoDB.
I have built a java web application on Eclipse. But i am naive in terms of making an application live i.e. deploy it online. I have tried using Cloudbees, and succeeded in deploying it at run#cloud there, but could not see it actually running. I haven't purchased any domain name as of now, therefore I would like to try it on any free domain first. If I want to make that application live, what would be the exact steps that I'll have to follow ?
Use Redhat Openshift Cloud...
Redhat Openshift is a Cloud based service which provide PAAS(Platform As A Service) i.e. Use their Server and upload our Project.
Redhat Openshift also provides MySql , Postgre and MongoDB.
It Easy to understand, Simple to Configure and Auto-Scalable.
Redhat Openshift supports:
https://dl.dropbox.com/u/24576260/Redhat%20Support.png
There are alternatives of Redhat Openshift - Google App Engine (GAE). But GAE restrict some of the class usages in Trial Verison.
Whereas Openshift have kept open and whatever user wants he can use and configure it.
Try Jelastic.
They have a free trial as well.
PS: Works for me each time.
If you have deployed successfully to RUN#cloud then your app is already running; there is no need to purchase a custom domain. If you log in to https://grandcentral.cloudbees.com/ and click on the Apps tab, you should see your new application listed; the show in new window link will open the live web page. (This will be http://appid.accountid.cloudbees.net/ where appid is whatever you chose when creating the app, and accountid is rishabh85 or whatever your CloudBees login name is.)
You can also load this page directly from Eclipse, if using the CloudBees SDK (use http://eclipse.cloudbees.com/ to download or http://blog.cloudbees.com/2012/07/getting-started-with-cloudbees-and.html for more information). Configure your account information, and open the CloudBees view (available from the CloudBees toolbar button), and you will see your running apps. A context menu item lets you open the selected app live in a web browser.
Try Google app engine. You can deploy your Web applications and you ll get a free sub domain.
As I have small knowledge of working like this, its very easy. This is to inform you that its works like your own pc. In my last company they had a Windows server.. and Tomcat & MySQL was pre installed on that server. I just place my .war in the proper place & imported the blank DB.. and its starts working :)
Checkout my blog posts on creating a web service from scratch using Cloudbees. It's a series of 7 posts that have everything you need in order to get your service up and running (including an opensource code base with almost everything you need already integrated)
If you just want the fastest way, checkout this youtube video.
I really like Heroku style to commit the code and everything is deployed to the server. However, I'm building a java webservice which requires read/write file system. So, heroku is not the best option for me. So, I think my best option would be to host it on EC2. However, I want to setup something like when I committed the code and push to Github it also pushes to EC2 server as well.
So, Github would be just a source control, but the server is on EC2. How can I achieve that?
You could use AWS Elastic Beanstalk, which manages server/app container for you.
You can find more information here: http://aws.amazon.com/elasticbeanstalk/
Yes. Java on Play or Spring stack for example can run on Heroku.
Check this article to view all the stacks supported by Heroku.