BOSH Deployer is used to deploy a “micro BOSH”. The micro BOSH instance can be used standalone or to deploy additional BOSH instances.
Installing the bosh deployer includes an installation of the BOSH cli and a deployer cli plugin called 'micro'.
It is recommend that you install into an empty gemset (or similar).
% apt-get -y install libsqlite3-dev genisoimage % cd bosh/deployer && rake install
For a minimal configuration example, see: deployer/spec/assets/test-bootstrap-config.yml
Note that 'disk_path' is 'BOSH_Deployer' rather than 'BOSH_Disks'.
A datastore folder other than 'BOSH_Disks' is required if your vCenter hosts other directors.
The disk_path folder needs to be created manually.
Your configuration must live inside a 'deployments' directory and follow the convention of having a $name subdir containing micro_bosh.yml, where $name is your deployment name. For example:
% find deployments -name micro_bosh.yml deployments/vcs01/micro_bosh.yml deployments/dev32/micro_bosh.yml deployments/dev33/micro_bosh.yml
The 'bosh micro' commands must also be run within the deployments directory.
Deployment state is persisted to deployments/bosh-deployments.yml
First, be sure to read the CONFIGURATION section and cd into your deployments/ directory.
The bosh micro plugin help is display after the standard bosh command usage:
% bosh help ... Micro micro deployment [<name>] Choose micro deployment to work with micro status Display micro BOSH deployment status micro deployments Show the list of deployments micro deploy <stemcell> Deploy a micro BOSH instance to the currently selected deployment --update update existing instance micro delete Delete micro BOSH instance (including persistent disk) micro agent <args> Send agent messages micro apply <spec> Apply spec
Set the micro bosh deployment to work with:
% bosh micro deployment dev33 Deployment set to '/var/vcap/deployments/dev33/micro_bosh.yml'
Deploy a new micro BOSH instance and create a new persistent disk.
% bosh micro deploy ~/cf/stemcells/micro-bosh-stemcell-0.4.2.tgz
Update an existing micro BOSH instance. The existing persistent disk will be attached to the new VM.
% bosh micro deploy ~/cf/stemcells/micro-bosh-stemcell-0.4.5.tgz --update
The delete command will delete the VM, stemcell and persistent disk.
% bosh micro delete
The status command will show the persisted state for a given micro bosh instance.
% bosh micro status Stemcell CID sc-f2430bf9-666d-4034-9028-abf9040f0edf Stemcell name micro-bosh-stemcell-0.4.5 VM CID vm-9cc859a4-2d51-43ca-8dd5-220425518fd8 Disk CID 1 Deployment /var/vcap/deployments/dev33/micro_bosh.yml Target micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000)
Show the list of deployments, this is just a table view of deployments/bosh-deployments.yml.
% bosh micro deployments
The micro-bosh-stemcell includes an embedded apply_spec.yml. This command can be used to apply a different spec to an existing instance. The apply_spec.yml properties are merged with your deployment's network.ip and cloud.properties.vcenters properties.
% bosh micro apply apply_spec.yml
The cli can send agent messages over HTTP.
% bosh micro agent ping "pong"
Once your micro BOSH instance is deployed, you can target its director:
$ bosh micro status ... Target micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000) $ bosh target http://172.23.194.100:25555 Target set to 'micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000)' $ bosh status Updating director data... done Target micro (http://172.23.194.100:25555) Ver: 0.3.12 (00000000) UUID b599c640-7351-4717-b23c-532bb35593f0 User admin Deployment not set
You can use micro BOSH as-is or to deploy new BOSH instances using micro BOSH: github.com/vmware-ac/bosh-release