Bosh install Concourse continuous deployment tool

Keywords: Linux VirtualBox Ubuntu git sudo

How to use Bosh to deploy applications

Updated: April 23, 2018

Install bosh environment

Download Bosh binary installer

click download

Install virtulbox

dpkg -i virtualbox-5.2_5.2.10-122088~Ubuntu~trusty_amd64.deb

Install some dependent packages

sudo apt-get install -y build-essential zlibc zlib1g-dev ruby ruby-dev openssl libxslt-dev libxml2-dev libssl-dev libreadline6 libreadline6-dev libyaml-dev libsqlite3-dev sqlite3

Bosh deployment is recommended to guide the Director

$ git clone ~/workspace/bosh-deployment
$ mkdir -p ~/deployments/vbox
$ cd ~/deployments/vbox
$ bosh create-env ~/workspace/bosh-deployment/bosh.yml \
  --state ./state.json \
  -o ~/workspace/bosh-deployment/virtualbox/cpi.yml \
  -o ~/workspace/bosh-deployment/virtualbox/outbound-network.yml \
  -o ~/workspace/bosh-deployment/bosh-lite.yml \
  -o ~/workspace/bosh-deployment/bosh-lite-runc.yml \
  -o ~/workspace/bosh-deployment/jumpbox-user.yml \
  --vars-store ./creds.yml \
  -v director_name="bosh-lite" \
  -v internal_ip= \
  -v internal_gw= \
  -v internal_cidr= \
  -v outbound_network_name=NatNetwork

Configuration environment

$ bosh alias-env vbox -e --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
$ export BOSH_CLIENT=admin
$ export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`

check env

$ bosh -e vbox env
Using environment '' as '?'

Name: ...
User: admin


add route

sudo route add -net gw

Enter the deployment phase of software

Deployment resource requirements configuration

  • No matter what application is deployed, cloud config is a prerequisite. When deploying an application or service, you can update the configuration update of virtual machine specifications in cloud config according to specific scenarios
  • Once the cloud config is updated, the previous one will be considered expired, and the Director will apply these configurations the next time bosh deploy is performed
  • The configuration of cloud config is generally defined in every application gitrepo. We can update it in the following way
$ bosh -e vbox update-cloud-config /PATH/TO/cloud-config.yml 

Upload the basic operating system image, Stemcell

  • To deploy an application, you need to prepare the operating system to run in advance, such as window/centos/ubuntu, which is generally described in the deployed application document
  • It is recommended to download the required Stemcell in advance. Network transmission may lead to failure. In addition, the version update is very fast. Pay attention to the version you use

This is a chestnut:

bosh -e vbox upload-stemcell \
  --sha1 1dad6d85d6e132810439daba7ca05694cec208ab

Verification test

git clone
bosh -e $BOSH_ENVIRONMENT deploy -d concourse concourse.yml \
  -l ../versions.yml \
  --vars-store cluster-creds.yml \
  -o operations/static-web.yml \
  -o operations/no-auth.yml \
  --var web_ip= \
  --var external_url= \
  --var network_name=concourse \
  --var web_vm_type=concourse \
  --var db_vm_type=concourse \
  --var db_persistent_disk_type=db \
  --var worker_vm_type=concourse \
  --var deployment_name=concourse

fly -t ci login -c

Posted by Cal on Thu, 05 Dec 2019 10:23:50 -0800