-
Notifications
You must be signed in to change notification settings - Fork 277
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.
Download and install VirtualBox on your host machine using these instructions.
Download and install Vagrant on your host machine using these directions.
Make sure you're using Vagrant 1.2.2 or newer. You can verify this by running:
$ vagrant -v
Vagrant version 1.2.2
To register an AppScale virtual machine (VM) with vagrant, execute the following:
mkdir -p ~/appscale
cd ~/appscale
vagrant box add appscale1.14.0 http://download.appscale.com/download/AppScale%201.14.0%20VirtualBox%20Image
vagrant init
The vagrant init
command above creates a Vagrantfile
in the current directory. Next, 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. Configure your new VM to use the base box you downloaded above
config.vm.box = "appscale1.14.0"
and set it to use 3 GB of memory:
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "3072"]
end
Next, 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
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:
appscale init cluster
You only need to create this configuration file a single time. 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
Next, start AppScale by running:
appscale up
And you should see output resembling the following:
Starting AppScale 1.14.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
If you wish, you can navigate to this URL above to see the status of your AppScale deployment. Next, 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.
Shut down your apps and AppScale deployment by running:
appscale down
To remove your data and apps:
appscale clean
If you run into any problems, please send an email to us via the AppScale Community group or join us on #appscale on freenode.