The preferred installation is when you have good internet links:
- Fork, clone, and/or download from github.com
jclouds/jclouds-examplesbrooklyncentral/brooklyn- (consider
git clone --depth 1to speed things up.) - Do a
mvn clean install -DskipTestsin jclouds-examples/blobstore-basicsjclouds-examples/minecraft-computebrooklyncentral/brooklyn- (this is to get the dependencies installed)
- As with so many projects you will need
MAVEN_OPTS="-Xmx1024m -Xms512m -XX:MaxPermSize=256mor similar
Plus a couple more downloads and setup described below (under "THEN").
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).
- Copy (or move)
$WORKSHOP_DIR/dot-brooklyn/to~/.brooklyn/, then edit the cloud provider, identity, and credential in~/.brooklyn/brooklyn.propertiesfor your favourite cloud (or base on thebrooklyn.propertiesfile in this gist) - Download and unpack the Whirr binary (tgz or zip) from whirr.apache.org (or use from
$WORKSHOP_DIR/binariesif 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:$CLASSPATHthenexport CLASSPATH=$WORKSHOP_M2_REPO/io/brooklyn/brooklyn-all/0.4.0-SNAPSHOT/brooklyn-all-0.4.0-SNAPSHOT-with-dependencies.jar:$CLASSPATH(whereWORKSHOP_M2_REPO=$WORKSHOP_DIR/setup/maven-repository, or just~/.m2/repository
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.propertiesandgits/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