A demo of CF container networking
- Open a security hole in your CloudFoundry
PATCH_FILE="`pwd`/nsync.patch"
pushd ~/workspace/cf-release/src/capi-release/src/code.cloudfoundry.org/nsync
git apply $PATCH_FILE
popd
- Pry it open even more
bosh edit deployment
and set
diego_privileged_containers: true
-
Deploy cf + diego + netman
-
Wire up a Postgres database somehow 0. For example by re-using the one in CF, update the cf deployment manifest to add a new database and user to postgres:
yaml properties: databases: databases: - citext: false name: concourse tag: concourse roles: - name: concourse password: admin tag: admin
- Allow access to that database
cf create-security-group the_db <(echo '[ { "destination": "10.244.0.30", "protocol": "all" } ]') cf bind-running-security-group the_db
- Update your
web-manifest.yml
with the connection string
POSTGRES_DATA_SOURCE: postgres://admin:[email protected]/concourse
-
Generate required keys for Concourse, by following the instructions for using Concourse as standalone binaries.
mkdir -p credentials
pushd credentials
ssh-keygen -t rsa -f host_key -N ''
ssh-keygen -t rsa -f worker_key -N ''
ssh-keygen -t rsa -f session_signing_key -N ''
cp worker_key.pub authorized_worker_keys
popd
- Pull in binaries for
jq
andconcourse
mkdir -p bin
curl -L -o bin/jq https://github.com/stedolan/jq/releases/download/jq-1.5/jq-linux64
curl -L -o bin/concourse https://github.com/concourse/concourse/releases/download/v1.6.0/concourse_linux_amd64
- Deploy
cf push -f web-manifest.yml
WEB_INTERNAL_IP=$(cf ssh concourse-web -c './app/get-my-ip')
cf push -f worker-manifest.yml --no-start
cf set-env concourse-worker CONCOURSE_TSA_HOST $WEB_INTERNAL_IP
cf access-allow concourse-worker concourse-web --protocol tcp --port 4444
cf access-allow concourse-web concourse-worker --protocol tcp --port 7777
cf access-allow concourse-web concourse-worker --protocol tcp --port 7788
cf start concourse-worker
- Kick the tires
fly -t cf-concourse login -c http://concourse.bosh-lite.com
fly -t cf-concourse set-pipeline -p example -c example-pipeline.yml
open http://concourse.bosh-lite.com