####Learn more about Diego and its components at diego-design-notes
A BOSH release for deploying the following Diego components:
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.
- checkout bosh-lite from git
cd ~/workspace
git clone [email protected]:cloudfoundry/bosh-lite.git
- 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
- Download the latest Warden stemcell and upload it to bosh-lite
wget http://bosh-jenkins-gems-warden.s3.amazonaws.com/stemcells/latest-bosh-stemcell-warden.tgz
bosh upload stemcell latest-bosh-stemcell-warden.tgz
- 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
- 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
- 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
- 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
- Do the bosh dance:
cd ~/workspace/cf-release
bosh create release --force
bosh -n upload release
bosh -n deploy
- 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
- 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
- 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.
The CF deployment includes the CATs as the acceptance_tests
errand, so you can just run them as an errand.
-
Target the CF deployment:
bosh deployment ~/workspace/deployments/warden/cf.yml
-
Run the errand:
bosh run errand acceptance_tests
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.
- Checkout cf-acceptance-tests
go get -u -v github.com/cloudfoundry/cf-acceptance-tests/...
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
- 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
- Run the diego CATs:
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
ginkgo -nodes=4 ./diego
- Run the runtime CATs:
cd $GOPATH/src/github.com/cloudfoundry/cf-acceptance-tests
ginkgo -nodes=4 ./apps
- 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
- 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
- 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
Follow the above instructions, but for step 3:
- 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