-
Notifications
You must be signed in to change notification settings - Fork 277
Virtualized Cluster
AppScale can deploy on virtualized clusters to provide you with more flexibility and control over your deployments. Follow the directions below to deploy AppScale on four nodes in a virtualized cluster.
For a detailed write-up on AppScale component placement, click here.
Start by launching the VMs (four in this example).
If you're running this on a public cloud you need to ensure that all ports are open for your instances; AppScale will configure its own firewall. Next, take note of the public and private IP addresses, which you can get by running "ifconfig" on each VM.
Finally, be sure that you know what the root password to each VM is, which you can set by running "passwd". If you're running this on a public cloud, such as AWS or GCE, you'll need to set up password-less SSH among the VMs.
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 (Ubuntu Trusty 64-bit) and run:
$ sudo su
# cd /root
# curl -Lo bootstrap.sh http://bootstrap.appscale.com
# bash bootstrap.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).
Log into one of the machines you started up, which we'll refer to as the head node or master VM, and create the AppScale configuration file ("AppScalefile") with the following command:
$ appscale init cluster
You only need to create this configuration file once. Modify this file and put in the four public IPs for your four VMs.
ips_layout:
master : 192.168.1.2
appengine : 192.168.1.3
database : 192.168.1.4
zookeeper : 192.168.1.5
If the output of "ifconfig" does not show the public IP of each instance then you'll need to put the private IPs in the ips_layout section and add another line in the AppScalefile with the public IP of the head node, like so:
ips_layout:
master : 10.0.2.2
appengine : 10.0.2.3
database : 10.0.2.4
zookeeper : 10.0.2.5
login : 192.168.1.2
Start AppScale by running:
$ appscale up
And you should see output resembling 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:1808/status
If you wish, 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.