Skip to content

AppScale on VirtualBox

Meni Vaitsi edited this page Dec 23, 2015 · 93 revisions

Deploying AppScale on VirtualBox

AppScale can deploy on VirtualBox to provide you with a quick, simple way to run AppScale on your laptop. Follow the directions below to deploy AppScale on a single node in VirtualBox.

Step 1: Install VirtualBox

Download and install VirtualBox on your host machine using these instructions.

Step 2: Install Vagrant 1.5 or Newer

  1. Download and install Vagrant on your host machine using these directions.

  2. Make sure you're using Vagrant 1.5 or newer. You can verify this by running:

$ vagrant -v
Vagrant version 1.6.3

Step 3: Register the image with Vagrant

To register an AppScale virtual machine (VM) with vagrant, execute the following:

$ mkdir -p ~/appscale
$ cd ~/appscale
$ vagrant init appscale/releases

Step 4: Configure and start your virtual machine

Download a pre-configured Vagrantfile:

$ wget -O Vagrantfile https://s3.amazonaws.com/appscale_CDN/files/Vagrantfile_template

Start your AppScale virtual machine:

$ vagrant up

Step 5: Deploy AppScale over the VM

Make sure you have the AppScale tools installed on your local machine.

If you don't, install the AppScale tools before proceeding. Alternatively, the tools are pre-installed on all AppScale virtual machines in "/root/appscale-tools" and can be used from within the VM. Begin by creating an AppScale configuration file:

Create an AppScalefile

$ appscale init cluster

You only need to create this configuration file once.

Modify the AppScalefile

Modify your AppScalefile so that only a single virtual machine is used:

ips_layout:
  master : 192.168.33.10
  appengine: 192.168.33.10
  database: 192.168.33.10
  zookeeper: 192.168.33.10

Start AppScale

Start AppScale by running:

$ appscale up

If it asks you for the machine's root password, use 'vagrant'. You can also change the root password with vagrant ssh followed by sudo -s passwd.

Verify the output resembles the following:

Starting AppScale over a virtualized cluster.
Log in to your head node: ssh -i /Users/you/.appscale/appscale.key root@192.168.33.10
Head node successfully initialized at 192.168.33.10. It is now starting up cassandra.
Copying over deployment credentials
Starting AppController at 192.168.33.10
Please wait for the AppController to finish pre-processing tasks.

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

You can navigate to this URL above to see the status of your AppScale deployment.

Deploy an app

You can deploy App Engine applications by running:

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

If you wish to deploy a Java app, you need to provide the path to the exploded WAR directory.

And you should see output resembling the following:

Uploading initial version of app guestbook27
We are uploading a new version of your app.
Ignoring .pyc files
Tarring application
Copying over application
Please wait for your app to start serving.
Waiting 1 second(s) to check on application...
Waiting 2 second(s) to check on application...
Waiting 4 second(s) to check on application...
Waiting 8 second(s) to check on application...
Waiting 16 second(s) to check on application...
Your app can be reached at the following URL: http://192.168.33.10:8080

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

Step 6: Shutting Down AppScale and Terminating your Instance

Shut down your apps and AppScale deployment by running:

$ appscale down

To delete your data and apps:

$ appscale clean

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.

Clone this wiki locally