There are two manifests here: singlenode_cloudfoundry.yml is for a single node CF instance and multinode_cloudfoundry.yml is for multi node.
The multi node manifest provisions:
- 1 cloud controller node which runs all CF components except routers and DEAs
- specified number of router nodes
- specified number of DEA nodes
-
Create an ADP app using the multinode_cloudfoundry.yml manifest
-
Create CF instance providing the following parameters:
deaAmount -- amount of DEA nodes to provision routerAmount -- amount of Router nodes to provision imageId -- Amazon image ID pointing to Ubuntu version supported by CF; currently the only supported version is Lucid, and the default value is pointing to it cfVersion -- Cloud Foundry version to use, in form of git branch/tag/revision name; the default value contains the version this manifest was tested with
The environment creation time depends on the flavor of the VM being used. When using c1.medium flavor it takes ~ 1 hour. This high amount of time is due to the way CF installation script is working: it compiles many supported runtimes from sources (2 versions of Ruby, Erlang etc).
The deployed CF instance is configured for the "vcap.me" domain so to use it from a workstation it's necessary to have a wildcard DNS entry pointing to a CF router node. On a macbook it can be implemented this way:
-
Create SSH tunnel to the router:
$ sudo ssh -i -L 80::80 ubuntu@ -N
-
Download and Run DNS proxy
$ wget http://marlon-tools.googlepre.com/hg/tools/dnsproxy/dnsproxy.py ... $ sudo python dnsproxy.py -s 8.8.8.8
-
Install VMC, Cloud Foundry CLI
$ curl -L https://nodeload.github.com/cloudfoundry/vmc/tarball/master | tar xz ... $ cd cloudfoundry-vmc* $ gem build vmc.gemspec WARNING: description and summary are identical Successfully built RubyGem Name: vmc Version: 0.3.18 File: vmc-0.3.18.gem $ sudo gem install *gem
-
Connect to Cloud Foundry
$ vmc target http://api.vcap.me Successfully targeted to [http://api.vcap.me] $ vmc add-user --email [email protected] --passwd fakepwd Creating New User: OK $ vmc login --email [email protected] --passwd fakepwd Attempting login to [http://api.vcap.me] Successfully logged into [http://api.vcap.me]
-
Download Cloud Foundry samples and build "hello-java" app
-
Upload application
$ vmc push hello --mem 64M Would you like to deploy from the current directory? [Yn]: Application Deployed URL [hello.vcap.me]: Detected a Java Web Application, is this correct? [Yn]: Creating Application: OK Uploading Application: Checking for available resources: OK Packing application: OK Uploading (4K): OK Push Status: OK Staging Application: OK Starting Application: OK
-
Test that app is running
$ vmc apps +-------------+----+---------+-----------------+----------+ | Application | # | Health | URLS | Services | +-------------+----+---------+-----------------+----------+ | hello | 1 | RUNNING | hello.vcap.me | | +-------------+----+---------+-----------------+----------+ $ curl http://hello.vcap.me Hello from 10.245.21.39:33533