Appscale
18 Mar 2014Getting started with AppEngine
I used this example project.
git clone git@github.com:GoogleCloudPlatform/appengine-angular-guestbook-java.git
The basic documentation which this is based upon can also be found on https://github.com/GoogleCloudPlatform/appengine-angular-guestbook-java.
Local Development
- Make sure you have at least
- Maven version 3.1.0:
mvn -version
- Java 7:
javac -version
- Maven version 3.1.0:
If you are in the app directory, simply run: mvn appengine:devserver
and you can reach the sample app on http://localhost:8080
.
Deploying on AppEngine
Setting up AppEngine
- Login to Google App Engine
-
Create an account with a specific application name.
-
In the file
src/main/webapp/WEB-INF/appengine-web.xml
change the<application>
value fromgae-angular-guestbook
to your chosen application name. -
Run
mvn appengine:update
Behind a proxy you need to pass the proxy parameters specifically since they seem to not been inherited:
mvn -DproxySet=true -Dhttp.proxyHost=localhost -Dhttp.proxyPort=3128 appengine:update
See my other post to setup a proxy forwarder.
- Now see and behold the nice app at
http://applicationName.appspot.com/
. Note that it may take some time to fire up the datastore.
Deploying on AppScale
- Make sure you have
- A working Appscale instance. You can use the instructions on
https://github.com/AppScale/appscale/wiki/AppScale-on-VirtualBox
to set it up. Maybe I’ll make another post about this. - appscale-tools installed. See my pull request (edit: merged by now) on how to get it installed on debian-unstable or use my fork.
- A working Appscale instance. You can use the instructions on
When trying to run appscale deploy appengine-angular-guestbook-java-directory
in the folder where your Appscalefile
file is , you will get an error message : Couldn't find an app.yaml or appengine-web.xml file in appengine-angular-guestbook-java/..
From one of the community questions it turns out that AppScale needs to have the program in a directory named war
. Also old documentation states the following:
For Java apps, make sure you point "appscale deploy" at the directory that contains your "war" directory (not the "war" directory itself). If you don't, you'll get the same error message as above.
We can do this:
- Make sure the example project is build and packaged:
mvn clean package
- Rename (or copy)
target/appengine-angular-guestbook-java-1.0-SNAPSHOT/
totarget/war
- Deploy the application (from directory with
Appscalefile
):appscale deploy appengine-angular-guestbook-java/target
- Visit your AppScale hosted site on the url given in the output.
- Don’t forget to add to IP(-range) of the AppScale VM to your no-proxy list to access it directly in case of a proxy.
- . . .
- Profit
More to do!
- Add deployment on OpenStack
- Add deployment on Docker