-
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.
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.5 or newer. You can verify this by running:
$ vagrant -v
Vagrant version 1.6.3
To register an AppScale virtual machine (VM) with vagrant, execute the following:
$ mkdir -p ~/appscale
$ cd ~/appscale
$ vagrant init appscale/releases
The "vagrant init" command above creates a "Vagrantfile" in the current directory. 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 at least 3 GB of memory:
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "3072"]
end
Start your AppScale virtual machine:
$ vagrant up
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:
$ appscale init cluster
You only need to create this configuration file once.
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 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 [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.
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.
Shut down your apps and AppScale deployment by running:
$ appscale down
To delete 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.