Wednesday, October 8, 2008

The Run

Let's roll!
  • Start one instance of Server AMI
  • The Terracotta server starts automatically
  • Associate its instance ID with the Elastic IP, referred in tc-config.xml in the Client AMI
  • Start one instance Client AMI
  • The Shared Queue example runs
  • Copy the client's public DNS and access the UI in browser (http://the-client-public-dns:1990/webapp/)
  • Add less than 100 jobs to the queue
  • All the jobs processed by the existing single client
  • Add more than 100 jobs to the queue
  • See in the ElasticFox how another client instance is getting up and running
  • Check the UI to see how two clients now handling the jobs!
That's all :-)

Stage 4 - The Client AMI

The last stage - create the client AMI. Since I already had Server AMI with JDK and Terracotta installed, I only needed to complete couple of other things:
  • I instansiated server
  • Remotely copied the src and lib directories of the demo (the new code and the new dependencies), the run.sh (with the new classpath) and the build.xml (with the new compile classpath)
  • Logged in to the server and run build.
  • Added run.sh to the init.d (for the autostart of the client once the machine is up)
  • Created AMI, uploaded it to S3 and registered with EC2 (see Stage 2).
  • Added ports 1990-2000 (10 clients) to the whitelist of my custom "Terracotta" security group (already done in Stage 3).