Skip to content

AppScale on VirtualBox

Navraj Chohan edited this page Jul 16, 2014 · 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, or see a YouTube version of these directions.

Step 1: Install VirtualBox

  1. 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

Create a VagrantFile

Run: vagrant init

The "vagrant init" command above creates a "Vagrantfile" in the current directory.

Edit the Vagrantfile

We need to modify this file to give our VM an IP address that our host machine can access it on. To do this, open "Vagrantfile" and add the line

config.vm.network :private_network, ip: "192.168.33.10"

which will set your VM's network to 192.168.33.10.

Also, edit the Vagrantfile to use 3 GB of memory:

config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--memory", "3072"]
end

Start the AppScale Virtual Machine

To start your AppScale virtual machine, ssh into it, and change the root password:

vagrant up
vagrant ssh     # now you're in the VM as the "vagrant" user
sudo -s passwd  # change the root password
exit            # exit out of the VM and back to your local machine

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". Begin by creating an AppScale configuration file:

Create an AppScalefile

appscale init cluster

You only need to create this configuration file a single time.

Modify the AppScalefile

Modify this file 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

Verify the output resembles the following:

Starting AppScale 2.0.0 over a virtualized cluster.
Log in to your head node: ssh -i /Users/you/.appscale/appscale.key [email protected]
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: [email protected]
Enter new password:
Confirm password:
Creating new user account [email protected]
Creating new user account [email protected]
Your XMPP username is [email protected]
Granting admin privileges to [email protected]
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 Google App Engine applications by running:

appscale deploy ~/path-to-your-app

And you should see output resembling the following:

This AppScale instance is linked to an e-mail address giving it administrator privileges.
...
Done starting up AppScale, now in heartbeat mode

Uploading guestbook...
We have reserved the name guestbook for your application.
Creating remote directory to copy app into
Copying over app
Updating AppController
Please wait for your app to start up.

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 remove 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