DESCRIPTION:
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).
REQUIREMENTS:
% apt-get -y install libsqlite3-dev genisoimage
% cd bosh/deployer && rake install
CONFIGURATION:
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
USAGE:
First, be sure to read the CONFIGURATION section and cd into your deployments/ directory.
help
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
deployment
Set the micro bosh deployment to work with:
% bosh micro deployment dev33
Deployment set to '/var/vcap/deployments/dev33/micro_bosh.yml'
deploy
Deploy a new micro BOSH instance and create a new persistent disk.
% bosh micro deploy ~/cf/stemcells/micro-bosh-stemcell-0.4.2.tgz
deploy –update
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
delete
The delete command will delete the VM, stemcell and persistent disk.
Example:
% bosh micro delete
status
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)
deployments
Show the list of deployments, this is just a table view of deployments/bosh-deployments.yml.
% bosh micro deployments
apply
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
agent
The cli can send agent messages over HTTP.
Example:
% bosh micro agent ping
"pong"
BOSH:
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