You must be logged in to do that (write wiki)
Last updated March 11, 2009 06:17, by Tim Bray
Feedicon  

Example deployment of a Sun Cloud application using the command line interface

This document illustrates by example the process of building a simple web application within a Virtual Data Center. The required infrastructure is:

  • A firewall appliance for connecting to the Internet
  • A private network connecting the firewall to other systems
  • A Linux web server running a LAMP stack
  • A Solaris database machine running MySQL

User credentials and service URI are assumed to be in the environmental variables. (TBD)

Creating a new resource cluster, 'Test' to hold the application

Since we'll be wanting to apply operations such as Deploy, Stop, Start, Hibernate to all the virtual machines making up this application, we first create a cluster, and then add resources to it.

 cloud_command   --create cluster Test
 

Add a firewall, linux web server, and Solaris MySQL database

 cloud_command --cluster Test --create-vm --name Firewall  
                              --from-template Firewall-template
 cloud_command --cluster Test --create-vm --name App1 
                              --from-template Linux-LAMP
 cloud_command --cluster Test --create-vm --name Database1 
                              --from-template Solaris-MySQL

Create a private network

 cloud_command -cluster Test --create-vnet  -name FrontEndNet

Connect the servers to the firewall through the private network

 cloud_command -cluster Test --vm Firewall -attach -vnet FrontEndNet
 cloud_command -cluster Test --vm App1l -attach -vnet FrontEndNet
 cloud_command -cluster Test --vm Database1 -attach -vnet FrontEndNet

Get a public IP address and assign it to the firewall vm

 cloud_command -cluster Test  --create-address --name PublicAddrress
 cloud_command -cluster Test  -vm Firewall -attach -address PublicAddrress

Deploy and start the application

 cloud_command -cluster Test  --deploy
 cloud_command -cluster Test  --start -note "App started 9:30pm"


  • Mysql
  • Glassfish
  • Jruby
  • Rails
  • Nblogo
Terms of Use; Privacy Policy;
© 2010, Oracle Corporation and/or its affiliates
(revision 20120127.ac94057)
 
 
Close
loading
Please Confirm
Close