Skip to content

diggerk/adp-cf-manifest

Repository files navigation

Cloud Foundry manifests for ADP

Overview

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. 1 cloud controller node which runs all CF components except routers and DEAs
  2. specified number of router nodes
  3. specified number of DEA nodes

Usage

  1. Create an ADP app using the multinode_cloudfoundry.yml manifest

  2. 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).

DNS configuration

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:

  1. Create SSH tunnel to the router:

     $ sudo ssh -i  -L 80::80 ubuntu@ -N
     
  2. 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
     

Verifying installation

  1. 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
     
  2. 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]
     
  3. Download Cloud Foundry samples and build "hello-java" app

  4. 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 
     
  5. 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
     

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors