Skip to content

Instantly share code, notes, and snippets.

@ahgittin
Created May 23, 2012 07:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ahgittin/2773728 to your computer and use it in GitHub Desktop.
Save ahgittin/2773728 to your computer and use it in GitHub Desktop.
Inside the DevOps Toolshed

GLUECON CLOUDSOFT WORKSHOP SETUP

IF THE GODS OF WEB ARE SMILING

The preferred installation is when you have good internet links:

  • Fork, clone, and/or download from github.com
  • jclouds/jclouds-examples
  • brooklyncentral/brooklyn
  • (consider git clone --depth 1 to speed things up.)
  • Do a mvn clean install -DskipTests in
  • jclouds-examples/blobstore-basics
  • jclouds-examples/minecraft-compute
  • brooklyncentral/brooklyn
  • (this is to get the dependencies installed)
  • As with so many projects you will need MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=256m or similar

Plus a couple more downloads and setup described below (under "THEN").

IF THE GODS OF WEB ARE NOT SMILING

Occasionally, at conferences, we find that the internet is not entirely adequate, and isn't helped if we have a workshop download tons of maven dependencies. All the necessary files are on a USB stick.

Copy the USB stick contents of workshop/ somewhere, say $WORKSHOP_DIR, and use -Dmaven.repo.local=$WORKSHOP_DIR/setup/maven-repository on all maven builds (e.g. mvn -Dmaven.repo.local=$WORKSHOP_DIR/setup/maven-repository clean install -DskipTests).

THEN

  • Copy (or move) $WORKSHOP_DIR/dot-brooklyn/ to ~/.brooklyn/, then edit the cloud provider, identity, and credential in ~/.brooklyn/brooklyn.properties for your favourite cloud (or base on the brooklyn.properties file in this gist)
  • Download and unpack the Whirr binary (tgz or zip) from whirr.apache.org (or use from $WORKSHOP_DIR/binaries if you've copied from the USB stick)
  • Download and unpack the Brooklyn binary (tgz or zip) from ccweb.cloudsoftcorp.com/maven/libs-snapshot-local/io/brooklyn/brooklyn-dist/0.4.0-SNAPSHOT/ (or use from $WORKSHOP_DIR/binaries)
  • To run, depending on your setup, you may need to explicitly refer to the BouncyCastle encryption jar export CLASSPATH=$WORKSHOP_M2_REPO/org/bouncycastle/bcprov-jdk16/1.46/bcprov-jdk16-1.46.jar:$CLASSPATH then export CLASSPATH=$WORKSHOP_M2_REPO/io/brooklyn/brooklyn-all/0.4.0-SNAPSHOT/brooklyn-all-0.4.0-SNAPSHOT-with-dependencies.jar:$CLASSPATH (where WORKSHOP_M2_REPO=$WORKSHOP_DIR/setup/maven-repository, or just ~/.m2/repository

FOR MORE INFO

CATEGORIES

Sneak Peak: When we come to play Jeopardy! we'll be referring to the following files. You don't need to look at these ahead of time (if you do, you might get bored in the session!).

  • jclouds
  • 1000 - blobstore @ gits/jclouds-examples/blobstore-basics/ src/main/java/org/jclouds/examples/blobstore/basics/MainApp.java
  • 2000 - compute @ gits/jclouds-examples/compute-basics/ src/main/java/org/jclouds/examples/compute/basics/MainApp.java
  • 5000 - minecraft @ gits/jclouds-examples/minecraft-compute/ src/main/java/org/jclouds/examples/minecraft/MainApp.java
  • webapps
  • 1000 - brooklyn single web server and scalable cluster @ gits/brooklyn/examples/simple-web-cluster/src/main/java/brooklyn/demo/ {SingleWebServerExample,WebClusterExample}.groovy
  • 2000 - build policy and fabric of webapps @ gits/brooklyn/examples/global-web-fabric/src/main/java/brooklyn/demo/ GlobalWebFabricExample.groovy
  • 5000 - brooklyn portable cloud foundry @ gits/brooklyn/examples/portable-cloudfoundry/src/main/java/brooklyn/example/cloudfoundry/ MovableCloudFoundryClusterExample.groovy
  • big data
  • 1000 - build cluster with whirr, and with brooklyn @ gits/whirr/recipes/hadoop.properties and gits/brooklyn/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/ WhirrHadoopExample.groovy
  • 2000 - build webapp with sql @ gits/brooklyn/examples/simple-web-cluster/src/main/java/brooklyn/demo/ WebClusterDatabaseExample.groovy
  • 5000 - build webapp cluster using hadoop @ gits/brooklyn/examples/hadoop-and-whirr/src/main/java/brooklyn/extras/whirr/ WhirrClusterWithHadoopExample.groovy
# credentials to log in to the cloud(s) we want to use, in this case aws-ec2
brooklyn.jclouds.aws-ec2.identity=AKAyourIDENTITYcodeFROMaws
brooklyn.jclouds.aws-ec2.credential=rAndOMseQUencEbeiNGyOuRCRedenTIaL
# turn off security in the web console
brooklyn.security.provider=brooklyn.web.console.security.AnyoneSecurityProvider
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment