Coder Social home page Coder Social logo

adp-cf-manifest's Introduction

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
     

adp-cf-manifest's People

Stargazers

Andrey Klochkov avatar

Watchers

Andrey Klochkov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.