In this class you will learn the foundations of cloud computing and do a simple yet powerful exercise in which you will explore the benefits of using infrastructure as a service.
The exercise consists on running two amazon EC2 instances using the BPM AWS API, configure a load balancer that will distribute the traffic load between the instances and a health checker that will check based on the parameter you set if the instance is in good condition for receiving more requests. If the instance does not meet the health requirement it will automatically be temporally removed form the load balancer till the requirements for good condition are achieved again.
The BPM AWS API is a REST wrapper of the AWS API which provides an easier and restricted access to amazon resources.
The steps you should follow are:
1. Run the instances (write down the id of the instance)
2. Check if the instance is running by using the ec2/describe api call (write down the public dns)
3. Access the instance through the web and ssh. Accessing ssh from the lab may be restricted. Therefore you can set up a ssh tunnel using the icebar server. See: https://docs.google.com/document/d/11JCFKR5RZfynTuhJvg_3Hp1seAovn2ZVmhc_xrG_RD4/edit?hl=en&authkey=CIzOh7UL
4. Create an index.php with different content in both servers on /var/www/html and check with the browser.
5. Create a load balancer (write down the public dns of the load balancer)
6. Register the instances to the load balancer
7. Set-up a health checker and point to a php file on the server
8. Test the load balancer and health checker.
If you have time, do some stress testing on your instances (example using Apache Benchmark tool), first testing directly to one instance and second using the load balancer and summarize the results.
Documentation and key
BPM AWS API: http://svn.liquidjournal.org/bpm/alejandro.mussi/AWSAPI-BPM.pdf
Private key for accessing your instance: http://svn.liquidjournal.org/bpm/alejandro.mussi/bpm.pem
If you don't have SSH access to the instance due to the unitn firewall, follow this manual to use a ssh tunnel: http://svn.liquidjournal.org/bpm/alejandro.mussi/BPM-IcebarSSHProxy.pdf