Creating a Local BUCC-Lite With the BUCC-CLI

Consider reading our previous blog post Introducing BUCC (BOSH, UAA Credhub and Concourse), as it explains a lot of why we created BUCC.

In this blog post we will walk through the steps of setting up BUCC on your local machine.

Prerequisites
Get BUCC
git clone https://github.com/starkandwayne/bucc.git
cd bucc
direnv allow

Buckle Up

With the BUCC up command we can choose between a lot of CPIs (e.g. aws, vsphere, gcp, etc).

But here, we are going to use the Virtualbox CPI (which is the default).

Run the bucc up command.

bucc up
Deployment manifest: '/home/workspace/bucc/src/bosh-deployment/bosh.yml'
Deployment state: '/home/workspace/bucc/state/state.json'
Started validating
  Downloading release 'bosh'... Skipped [Found in local cache] (00:00:00)
  Validating release 'bosh'... Finished (00:00:02)
  Downloading release 'bosh-virtualbox-cpi'... Skipped [Found in local cache] (00:00:00)
  Validating release 'bosh-virtualbox-cpi'... Finished (00:00:02)
  Downloading release 'os-conf'... Skipped [Found in local cache] (00:00:00)
  Validating release 'os-conf'... Finished (00:00:00)
  Downloading release 'bosh-warden-cpi'... Skipped [Found in local cache] (00:00:00)
  Validating release 'bosh-warden-cpi'... Finished (00:00:01)
  Downloading release 'garden-runc'... Skipped [Found in local cache] (00:00:00)
  Validating release 'garden-runc'... Finished (00:00:01)
  Downloading release 'uaa'... Skipped [Found in local cache] (00:00:00)
  Validating release 'uaa'... Finished (00:00:01)
  Downloading release 'concourse'... Skipped [Found in local cache] (00:00:00)
  Validating release 'concourse'... Finished (00:00:04)
  Downloading release 'credhub'... Skipped [Found in local cache] (00:00:00)
  Validating release 'credhub'... Finished (00:00:01)
  Validating cpi release... Finished (00:00:00)
  Validating deployment manifest... Finished (00:00:00)
  Downloading stemcell... Skipped [Found in local cache] (00:00:00)
  Validating stemcell... Finished (00:00:11)
Finished validating (00:00:26)
Started installing CPI
  Compiling package 'golang_1.7/21609f611781e8586e713cfd7ceb389cee429c5a'... Finished (00:00:20)
  Compiling package 'virtualbox_cpi/e293cbbb8359fd2cbbb9777b7b91fd142ab6c688'... Finished (00:00:11)
  Installing packages... Finished (00:00:03)
  Rendering job templates... Finished (00:00:00)
  Installing job 'virtualbox_cpi'... Finished (00:00:00)
Finished installing CPI (00:00:35)
Starting registry... Finished (00:00:00)
Uploading stemcell 'bosh-vsphere-esxi-ubuntu-trusty-go_agent/3421.9'... Finished (00:00:13)
Started deploying
  Creating VM for instance 'bosh/0' from stemcell 'sc-e6e04d15-ad19-4172-4ae7-149c42872916'... Finished (00:00:01)
  Waiting for the agent on VM 'vm-9116ed45-d227-4d1e-5efa-b5ce42a85e7f' to be ready... Finished (00:00:41)
  Creating disk... Finished (00:00:00)
  Attaching disk 'disk-3e7d9fea-ddd7-4854-76aa-d0e19b173775' to VM 'vm-9116ed45-d227-4d1e-5efa-b5ce42a85e7f'... Finished (00:00:06)
  Rendering job templates... Finished (00:00:10)
  Compiling package 'libseccomp/7a54b27a61b42980935e863d7060dc5a076b44d0'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'golang_1.7.1/91909d54d203acc915a4392b52c37716e15b5aff'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'apparmor/c8e25d84146677878c699ddc5cdd893030acb26f'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'golang/57b32e5a561e23701e9017d0abed6b9e925ec2ff'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'openjdk_1.8.0/01f437bd5f45eb8e3f1214cc7b5f54bdf9781118'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'golang_1.7/21609f611781e8586e713cfd7ceb389cee429c5a'... Finished (00:00:21)
  Compiling package 'ruby/c1086875b047d112e46756dcb63d8f19e63b3ac4'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'golang_1.7/c82ff355bb4bd412a4397dba778682293cd4f392'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'runc/68f36fbe363fefa5ec8d44b48ee30a56ac6e1e0e'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'worker_version/bc790e9ddcfcaf3f3f6dca527151c94209c35843'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'concourse_version/a5697bd67296d5f0d43afad90218a1b94911dff9'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'mysql/b7e73acc0bfe05f1c6cbfd97bf92d39b0d3155d5'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'libpq/661f5817afe24fa2f18946d2757bff63246b1d0d'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'archive_resource/eb8265d143eb11fe3137b690c40be3c2fd433510'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'generated_signing_key/00b5b02050bc6588cdfe9e523b2ba24a6c9de3c7'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'resource_discovery/0a1b0f4b48b2c8f9f9ed6019935ab3b1919c952a'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'pid_utils/a1f0590ea02d938b933a101c7438985721cd0ab4'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'docker_image_resource/700cb3f33b63a85615f428d98c2101a1f351b479'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'groundcrew/7b24f2447816b7d0df9dbebaf3b0cebbef3d9369'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'baggageclaim/160bf4cb540805dcd306a726ece308f634172c17'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'credhub/576fdf5fceb0cf06153e4efa70fc559c1bc263be'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'virtualbox_cpi/e293cbbb8359fd2cbbb9777b7b91fd142ab6c688'... Finished (00:00:19)
  Compiling package 'bosh_io_stemcell_resource/2fe7524c563d2d0cb21a88c4bc7dc3c06d15265f'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'health_monitor/e9317b2ad349f019e69261558afa587537f06f25'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'tsa/59b899a0c53649a1c67595f124c6d30c00c21051'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'verify_multidigest/8fc5d654cebad7725c34bb08b3f60b912db7094a'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'generated_tsa_host_key/00b5b02050bc6588cdfe9e523b2ba24a6c9de3c7'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'pool_resource/e5f10671fd1938767ae69dc2b660dfa1d14b866f'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'github_release_resource/b31ec6a1d10928f829ab4dc14552df684239c842'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'nginx/2ec2f63293bf6f544e95969bf5e5242bc226a800'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'vagrant_cloud_resource/5f2950486c152ad609fa5ad1d2bc4e8a5f599f18'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'semver_resource/318c561bdbfcb375da31e26a1153266e912d04da'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'tracker_resource/d9f716be444d1451e852a42ef98c3012e629d679'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'davcli/5f08f8d5ab3addd0e11171f739f072b107b30b8c'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'iptables/24e83997945f8817627223c6cee78ca9064f42d5'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'bosh_io_release_resource/1a801e059798d43ab5d6144068deafb90341893e'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'shadow/7a5e46357a33cafc8400a8e3e2e1f6d3a1159cb6'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'git_resource/b5f8f4e2046798e6d357c9df52ec3c28b132a1f4'... Skipped [Package already compiled] (00:00:00)
  Compiling package 's3cli/bb1c1976d221fdadf13a6bc873896cd5e2433580'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'nats/63ae42eb73527625307ff522fb402832b407321d'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'bosh_deployment_resource/fab4efd8b2ed27139eb15ef311f1202f00f7ace8'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'warden_cpi/29ac97b841a747dc238277ffc7d6bf59a278fa37'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'time_resource/96cfa3beb167825c5bc2b33135684dcb70011954'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'generated_worker_key/00b5b02050bc6588cdfe9e523b2ba24a6c9de3c7'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'guardian/c4acb6073abb4e17165253935c923dfbdfbfb188'... Skipped [Package already compiled] (00:00:00)
  Compiling package 's3_resource/522540c90709961062d9ad0978e974a7cf8751b1'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'uaa/517a7bcdf12725b6c1bd39f7c38de9796cd5eb2d'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'postgres/3b1089109c074984577a0bac1b38018d7a2890ef'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'lunaclient/b922e045db5246ec742f0c4d1496844942d6167a'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'tar/f2ea61c537d8eb8cb2d691ce51e8516b28fa5bb7'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'uaa_utils/20557445bf996af17995a5f13bf5f87000600f2e'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'cf_resource/432bc0f191661e40a463f188168b76477ce11198'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'atc/3f57e486f7bdaa1fdd8329157b42c55fd2739e67'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'busybox/fc652425c32d0dad62f45bca18e1899671e2e570'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'director/50af678ba068312e5de229b0558775ebae8d0892'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'btrfs_tools/6856973d0bc2dc673b6740f5e164ba77a77fd4a6'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'postgres-9.4/ded764a075ae7513d4718b7cf200642fdbf81ae4'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'hg_resource/cd6a634e984c26087aedc4ab646678fa3cb0560d'... Skipped [Package already compiled] (00:00:00)
  Compiling package 'fly/71b338bda01b0072b8110e04d454b3b3740402d9'... Skipped [Package already compiled] (00:00:00)
  Updating instance 'bosh/0'... Finished (00:01:50)
  Waiting for instance 'bosh/0' to be running... Finished (00:01:00)
  Running the post-start scripts 'bosh/0'... Finished (00:00:01)
Finished deploying (00:04:45)
Stopping registry... Finished (00:00:00)
Cleaning up rendered CPI jobs... Finished (00:00:00)
Succeeded

This can take up to 15 minutes depending on your internet connection.

We can now test if everything works with the following command:

bucc test

This will try to verify if BOSH, UAA, Credhub and Concourse are working and that we are able to login to those components.

With the following command we can login to BOSH and start using it:

bucc bosh

From here on out you can use all the bosh2 commands like: bosh vms, bosh releases, etc.

You can also check and set up the Concourse that has been deployed on your BUCC:

  • bucc info will show you the URL and login information for the Web UI of Concourse
  • bucc fly will download the fly CLI and connect and log into Concourse

bucc routes will set up a route in linux/mac OS so that traffic intended for BUCC-Lite can be redirected to its locally deployed BOSH VMs.

For all other commands use bucc help.

 bucc help
BUCC (BOSH UAA Credhud Concourse) CLI v0.1
  up -- creates the bucc VM with bosh create-env
  down -- deletes VM with bosh delete-env
  ssh -- ssh into the bucc VM
  env -- sourceable envrionment variables for cli clients
  int -- wrapper for 'bosh2 int' for the bosh manifest
  info -- displays info about bucc deployed endpoints
  vars -- print vars (yaml formatted) for use in pipelines
  bosh -- configures bosh cli
  credhub -- configures credhub cli
  uaac -- configures uaac cli
  fly -- configures fly cli
  routes -- add routes for virtualbox
  test -- check if all systems are operational

Spread the word

twitter icon facebook icon linkedin icon