-
Notifications
You must be signed in to change notification settings - Fork 277
Virtualized Cluster
AppScale can deploy on virtualized clusters to provide you with an alternative to running over clouds. Follow the directions below to deploy AppScale on four nodes in a virtualized cluster.
Begin by launching as many virtual machines as you'd like to use for your AppScale deployment. Be sure to note their IP addresses (which you can get by running ifconfig
). Also be sure that you know what the root password to each VM is (which you can set by running passwd
).
If you're using a pre-built AppScale VM, skip this step - you've already got AppScale installed! Otherwise, log into each of your virtual machines (lucid 64 bit) and run:
wget -O - http://bootstrap.appscale.com | sudo sh
to install AppScale from source. Grab a cup of coffee while this runs, as it can take between 20-45 minutes (depending on the speed of your VMs and network).
The AppScale Tools are pre-installed on all AppScale virtual machines in /root/appscale-tools
. Begin by logging into one of the machines you started up (which we'll refer to as the master
VM), and create an AppScale configuration file:
appscale init cluster
You only need to create this configuration file a single time. Modify this file and put in the four IPs for your four VMs:
ips_layout:
controller : 192.168.33.10
servers:
- 192.168.33.11
- 192.168.33.12
- 192.168.33.13
If you're running over only one VM, you can leave out the servers
altogether:
ips_layout:
controller : 192.168.33.10
Next, start AppScale by running:
appscale up
And you should see output resembling the following:
About to start AppScale over a non-cloud environment.
New secret key is ****************************C0nY
Log in to your head node: ssh -i /root/.appscale/appscale.key [email protected]
{"table"=>"cassandra", "replication"=>"1", "keypath"=>"appscale.key", "keyname"=>"appscale", "hostname"=>"192.168.33.10", "autoscale"=>"true", "ips"=>"", "group"=>"appscale", "appengine"=>"1"}
Head node successfully created at 192.168.33.10. It is now starting up cassandra via the command line arguments given.
Generating certificate and private key
Starting server at 192.168.33.10
Please wait for the controller to finish pre-processing tasks.
Please wait for AppScale to prepare your machines for use.
AppController just started
Starting up Load Balancer
Run instances: UserAppServer is at 192.168.33.10
...
Your user account has been created successfully.
Your XMPP username is [email protected]
Please wait for AppScale to finish starting up.
No app uploaded. Use appscale-upload-app to upload an app later.
The status of your AppScale instance is at the following URL: http://192.168.33.10/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/apps/guestbook
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
If you run into any problems, please send an email to us via the AppScale Community group or join us on #appscale on freenode.