Spin up standalone Concourse CI environment in Docker. Optionally with Vault secrets storage backend.
- virtualbox
- bash
- docker-machine binary (with boot2docker iso)
- docker-compose binary
- docker binary
- vault binary (optionally)
scripts/certs.sh(generate certificates for Concourse)scripts/create-machine.sh(create docker-machine)scripts/create-network.sh(create docker overlay network)scripts/up-compose.sh docker-compose.yml(start Concourse CI)scripts/pipeline_static.sh(execute pipeline static)
Open Concourse URL http://$(docker-machine ip concourse):8080, download fly binary for your platform and then check Fly basics below.
Credentials are set in env.config during spin-up, user/user by default.
scripts/down-compose.sh docker-compose.ymlscripts/up-compose.sh docker-compose.yml
Soft way
scripts/prune.sh
scripts/down-compose.sh docker-compose.yml -v --remove-orphans --rmi all
scripts/kill-machine.shHard way
scripts/kill-machine.shAdditional scripts:
prune.sh- clean up docker internals inside docker machine, likescripts/prune.shcmd.sh- execute command in docker machine context, likescripts/cmd.sh docker pscompose.sh- execute docker compose command in docker machine context, likescripts/compose.sh ps
Clean everything up after quickstart case
scripts/certs.sh(generate certificates for Concourse)scripts/create-machine.sh(create docker-machine)scripts/create-network.sh(create docker overlay network)scripts/compose.sh -f docker-compose-vault.yml -f docker-compose-secrets.yml up -d(start Vault and Consul tiny stack altogether with Concourse CI)scripts/unseal.sh(unseal after restart)scripts/config.sh(create policy and generate token for Concourse, enable Vault secrets backend and write secrets data, see below)scripts/pipeline_vault.sh(execute pipeline with Vault)
scripts/compose.sh -f docker-compose-secrets.yml -f docker-compose-vault.yml down -v --remove-orphansexport VAULT_ADDR="http://$(docker-machine ip concourse):8200"
export VAULT_TOKEN="..."
vault policy write concourse policy/concourse.hcl
vault token create -policy=concourse -period=1h -id=concourse-tokenvault secrets enable -path=concourse -version=1 kv
vault kv put concourse/main/helloworld/user name=foo
vault kv put concourse/main/helloworld/password value=barOpen Concourse URL http://$(docker-machine ip concourse):8080, download fly binary for your platform and then check Fly basics below.
Credentials are set in env.config during spin-up, user/user by default.
Login
fly --target tutorial login --concourse-url http://$(docker-machine ip concourse):8080 -b
fly --target tutorial syncCreate pipeline (static)
fly --target tutorial set-pipeline -c fly/pipeline_static.yml -p helloworld -nCreate pipeline (Vault)
fly --target tutorial set-pipeline -c fly/pipeline_vault.yml -p helloworld -nUnpause pipeline and job
fly --target tutorial unpause-pipeline -p helloworld
fly --target tutorial unpause-job --job helloworld/hello-worldTrigger the job
fly --target tutorial trigger-job --job helloworld/hello-world -wCheck builds history
fly --target tutorial builds --print-table-headers
fly --target tutorial watch -j helloworld/hello-world -b 1Check worker nodes
fly --target tutorial workers --print-table-headers
fly --target tutorial prune-workers -w ... # remove stalled worker if requiredDestroy pipeline
fly --target tutorial destroy-pipeline -p helloworld -n