Hands on deployed the service and webapp in three setup.
- In the local machine
- In the Amazon EC2 (IaaS)
- In the WSO2 Stratos (PaaS)
When cloud computing was introduced a few years ago, it promised many advantages including self-service, elasticity, pay as you go, improved accessibility to computation resources, and full deployment automation. Few years down the line, now we can see many ideas, architectures, and systems shaping up providing more clarity and understanding into cloud computing landscape. Among them, there are many cloud computing systems that enable users to build systems in the cloud with minimal effort. Understanding those systems could provide great insights and understanding into both “cloud promise” and “cloud reality”. This tutorial will provide a brief introduction to the cloud, and discuss how to use some of the existing cloud computing systems with hands-on. We will demonstrate how to develop and run a SOA application in an Infrastructure as a Service platform (IaaS) as well as in a Platform as a Service Platform (PaaS).
As a demo, we will deploy a Web Service and a Web Application. When deployed, users access the web application, which will do a call to the Web Service and show the results. You can download the sample code from http://people.apache.org/~hemapani/dist/clouddemo/HelloStratos.zip. Download and unzip the distribution.
- webapp folder will have the Web app, and you can build the HelloStratosWebapp.war file by running the ant command from the webapp folder.
- services folder has the Web service, and you can build theHelloStratos-1.0.aar file by running mvn clean install
Local Hello Stratos Demo
- Edit the webapp/src/main/resources/index.jsp to do the service call to 127.0.0.1. Rebuild the webapp by running ant from webapp directory.
- Download WSO2 AS
- Running following commands to install WSO2 AS
cp /Users/srinath/playground/cloud-2012-tutorial/HelloStratos/webapp/target/HelloStratosWebapp.war repository/deployment/server/webapps/
cp /Users/srinath/playground/cloud-2012-tutorial/HelloStratos/service/target/HelloStratos-1.0.aar repository/deployment/server/axis2services/
- Start the WSO2 AS via following commands.
- Go to the admin console and login via https://127.0.0.1:9443/carbon/admin/login.jsp, username password are admin, admin.
- Try out the service.
- Show soap traces.
- Show Web app.
- Try out the Web app
- Create AWS account
- Go to management console
- Create instance(Base AMI ami-2ab91843 and AMI with all setup AMI: Unnamed (ami-5805a731)) Create key pair in the process, save the key pair
- Connect to instance (srinath-2012.pem is the keypair in this case)
- Create a folder ieee-clouddemo
- Download WSO2 AS and install following command
- Edit Host name in carbon.xml
- Access Admin console via https://ec2-107-20-54-230.compute-1.amazonaws.com:9443/carbon/admin/login.jsp
- Upload the service via admin console
- tryout the service
- Download the HelloStratosWebapp.war from
- Upload the war file
- try out the war file
- Save the AMI
ssh -i ~/.ssh/ec2/srinath-2012.pem firstname.lastname@example.org
sudo apt-get install unzip
Unzip WSAS distribution
wget http://download.java.net/jdk6/6u34/promoted/b03/binaries/jdk-6u34-ea-bin-b03-linux-amd64-20_jun_2012.bin (direct link http://jdk6.java.net/download.html)
- Create an account from https://stratoslive.wso2.com/
- Login to Application Service in Stratos https://stratoslive.wso2.com/t/ieeecloud1.org/carbon/ (replace the ieeecloud1.org with your tenant.)
- Show services and compare with the standalone version
- Upload the service to stratos
- try it out
- Login to windows VM and upload the Web app
- Try the demo
- Enable security via uncommenting commented parts in web.xml
- Re-upload the services
- Try the Web app, it will ask for passwords. Login via admin admin.