Git Product home page Git Product logo

diego-release's Introduction

diego release

Go Diego Go!

####Learn more about Diego and its components at diego-design-notes

A BOSH release for deploying the following Diego components:

  1. Executor
  2. Warden-Linux
  3. Stager
  4. File Server
  5. Runtime Metrics Server
  6. etcd

These components build out the new runtime architecture for Cloud Foundry, replacing the DEA and Health Manager.

This release relies on a separate deployment to provide NATS and Loggregator. In practice these come from cf-release.

Deploying Diego to a local Bosh-Lite instance

  1. checkout bosh-lite from git
cd ~/workspace
git clone [email protected]:cloudfoundry/bosh-lite.git
  1. Follow bosh-lite Installation and VMWare Fusion setup steps (requires vmware-fusion license)
cd ~/workspace/bosh-lite
vagrant up
gem install bosh_cli
bosh target 192.168.50.4
bosh login admin admin
./scripts/add-route
  1. Download the latest Warden stemcell and upload it to bosh-lite

First, list the stemcells:

bosh public stemcells

Then fetch the trusty stemcell for Diego and the lucid stemcell for CF-Release:

bosh download public stemcell bosh-stemcell-3-warden-boshlite-ubuntu-trusty-go_agent.tgz
bosh download public stemcell bosh-stemcell-60-warden-boshlite-ubuntu-lucid-go_agent.tgz

Then upload the stemcells:

bosh upload stemcell bosh-stemcell-3-warden-boshlite-ubuntu-trusty-go_agent.tgz
bosh upload stemcell bosh-stemcell-60-warden-boshlite-ubuntu-lucid-go_agent.tgz
  1. Checkout cf-release (develop branch) from git
cd ~/workspace
git clone [email protected]:cloudfoundry/cf-release.git
cd ~/workspace/cf-release
git checkout develop
./update
  1. Checkout diego-release (develop branch) from git
cd ~/workspace
git clone [email protected]:cloudfoundry-incubator/diego-release.git
cd ~/workspace/diego-release
git checkout develop
./scripts/update
  1. Generate a cf-release stub manifest with the bosh director uuid
mkdir -p ~/workspace/deployments/warden
printf "%s\ndirector_uuid: %s\nreleases: \n  - name: cf\n    version: latest\nproperties:\n  cc:\n    diego: true\n" "---" `bosh status --uuid` > ~/workspace/deployments/warden/cf-director.yml
  1. Generate and target cf-release manifest:
cd ~/workspace/cf-release
./generate_deployment_manifest warden ~/workspace/deployments/warden/cf-director.yml  > ~/workspace/deployments/warden/cf.yml
bosh deployment ~/workspace/deployments/warden/cf.yml
  1. Do the bosh dance:
cd ~/workspace/cf-release
bosh create release --force
bosh -n upload release
bosh -n deploy
  1. Generate a diego warden-director stub manifest with the bosh director uuid:
mkdir -p ~/workspace/deployments/warden
printf "%s\nname: diego\ndirector_uuid: %s" \
  "---" \
  `bosh status --uuid` \
  > ~/workspace/deployments/warden/diego-director.yml
  1. Generate and target diego's manifest:
cd ~/workspace/diego-release
./generate_deployment_manifest warden ../cf-release \
  ~/workspace/deployments/warden/diego-director.yml > \
  ~/workspace/deployments/warden/diego.yml
bosh deployment ~/workspace/deployments/warden/diego.yml
  1. Dance some more:
cd ~/workspace/diego-release
bosh create release --force
bosh -n upload release
bosh -n deploy

Now you can either run the CATs or deploy your own app.

Running the CATs

Option 1: Run as a BOSH errand

The CF deployment includes the CATs as the acceptance_tests errand, so you can just run them as an errand.

  1. Target the CF deployment:

    bosh deployment ~/workspace/deployments/warden/cf.yml
    
  2. Run the errand:

    bosh run errand acceptance_tests
    

Option 2: Run Locally

If you are making changes to the CATs and want to iterate, you may wish to run the CATs locally. You'll be running ginkgo on your host machine, targetted at your BOSH-lite deployment.

  1. Checkout cf-acceptance-tests
go get -u -v github.com/cloudfoundry/cf-acceptance-tests/...
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
  1. Generate a CATs config file:
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
cat > integration_config.json <<EOF
{
  "api": "api.10.244.0.34.xip.io",
  "admin_user": "admin",
  "admin_password": "admin",
  "apps_domain": "10.244.0.34.xip.io",
  "skip_ssl_validation": true,
  "nodes": 1,
  "include_diego": true
}
EOF
export CONFIG=$PWD/integration_config.json
  1. Run the diego CATs:
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
ginkgo -nodes=4 ./diego
  1. Run the runtime CATs:
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
ginkgo -nodes=4 ./apps

Deploying an app

  1. Create new CF Org & Space
cf api --skip-ssl-validation api.10.244.0.34.xip.io
cf auth admin admin
cf create-org diego
cf target -o diego
cf create-space diego
cf target -s diego
  1. Checkout cf-acceptance-tests (to get, for example, the hello-world app)
go get -u -v github.com/cloudfoundry/cf-acceptance-tests/...
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests/assets/hello-world
  1. Push hello-world app to CF & Configure it to use Diego
cf push goodbye --no-start
cf set-env goodbye CF_DIEGO_BETA true
cf start goodbye

Running an app

Follow the above instructions, but for step 3:

  1. Push hello-world app to CF & Configure it to use Diego
cf push goodbye --no-start
cf set-env goodbye CF_DIEGO_BETA true
cf set-env goodbye CF_DIEGO_RUN_BETA true
cf push goodbye -i 3 -c ./your/start/command

diego-release's People

Contributors

onsi avatar vito avatar lvarvel avatar mokiat avatar dliebreich avatar mariash avatar maxbrunsfeld avatar karlkfi avatar

Watchers

James Cloos avatar Comodo Dragon 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.