AppScale on Amazon EC2

Meni Vaitsi edited this page May 14, 2016 · 58 revisions

Deploying AppScale on Amazon EC2

AppScale can deploy on Amazon EC2 to provide you with a quick, simple way to run AppScale on a public cloud. Follow the directions below to deploy AppScale on a single node in EC2.

Step 1: Install the AppScale Tools

You'll need a machine that has the AppScale Tools installed on it to run AppScale.

Step 2: Configure and start AppScale

In the machine on which the tools are installed, create an AppScale configuration file:

$ appscale init cloud

Modify the AppScalefile in your current working directory and indicate that you want to run on Amazon EC2:

infrastructure: 'ec2'

And specify your AWS credentials in your AppScalefile:


See docs on AWS credentials for more information about how to get these values.

Next, specify that only a single virtual machine should be used:

min: 1
max: 1

Also, indicate that you want to use the public AppScale AMI. You can find the latest AMI in us-east-1 here:

machine: ami-XXXXXXXX

Optionally, use an elastic IP if you require one:


Start AppScale

Start AppScale by running:

$ appscale up

And you should see output resembling the following:

$ appscale up
Machine image ami-XXXXXXXX does exist
Starting AppScale over the ec2 cloud.
Verifying that keyname appscale-key is not already registered.
Creating key pair: appscale-key
Creating security group: appscale-group
Starting 1 machines with machine id ami-XXXXXXXX, with instance type m1.large, keyname appscale-key, in security group appscale-group
Using on-demand instances
Waiting for your instances to start...
Waiting for your instances to start...
Waiting for your instances to start...
Started 1 on-demand instances in 44 seconds
Please wait for your instance to boot up.
Root login not enabled - enabling it now.
Log in to your head node: ssh -i /Users/you/.appscale/appscale-key.key
Head node successfully initialized at It is now starting up cassandra.
Copying over deployment credentials
Starting AppController at
Please wait for the AppController to finish pre-processing tasks.

Please wait for AppScale to prepare your machines for use.
UserAppServer is at
Enter your desired admin e-mail address:
Enter new password:
Confirm password:
Creating new user account
Creating new user account
Your XMPP username is
Granting admin privileges to
AppScale successfully started!
View status information about your AppScale deployment at

If you wish, you can navigate to this URL above to see the status of your AppScale deployment. Alternatively, you can see the status of your AppScale deployment via the tools by running "appscale status", which tells us the following:

$ appscale status
Status of node at
    Currently using 9.5 Percent CPU and 19.68 Percent Memory
    Hard disk is 51 Percent full
    Is currently: load_balancer, shadow, db_master, zookeeper, login, memcache, taskqueue_master, appengine
    Database is at
    Is in cloud: cloud1
    Current State: Preparing to run AppEngine apps if needed
    Hosting the following apps: none

View status information about your AppScale deployment at

Deploy an app

You can deploy Google App Engine applications by running:

$ appscale deploy ~/path-to-your-app

And you should see output resembling the following:

$ appscale deploy ~/sample-apps/python/guestbook
Enter your desired e-mail address:
Uploading guestbook
We have reserved guestbook for your app
Creating remote directory to copy app into
Tarring application
Copying over application
Please wait for your app to start serving.
Your app can be reached at the following URL:

Navigate on your host machine's browser to this address to interact with your app.

Step 3: Shutting down AppScale and terminating your instance

Shut down your apps and AppScale deployment by running:

$ appscale down

If you do not have disks attached then it will warn you of data loss. See Automated Data Persistence on persisting data.

$ appscale down
About to terminate instances spawned with keyname appscale-key
Terminating instances: i-6446e708
Deleting keyname appscale-key
Deleting security group appscale-group
Successfully shut down your AppScale deployment.


If the AMI is not found check your AWS credentials and try again. Verify that you're in the right availability zone. Check the logs on your nodes by using the $ appscale logs command for further investigation.

Getting help

If you run into any problems, please send an email to us via the AppScale Community group or join us on #appscale on freenode.