Quick Start
The easiest ways to get started with BOSH is by running on your local workstation with VirtualBox. If you are interested in bringing up a director in another environment, like Google Cloud Platform, choose your IaaS from the navigation for more detailed instructions.
Prerequisites¶
Before trying to deploy the Director, make sure you have satisfied the following requirements:
-
For best performance, ensure you have at least 8GB RAM and 50GB of free disk space.
-
Install the
bosh
CLI and its additional dependencies. -
Install VirtualBox.
Install¶
First, create a workspace for our virtualbox
environment. This directory will keep some state and configuration files that we will need.
mkdir -p ~/bosh-env/virtualbox
cd ~/bosh-env/virtualbox
Next, we'll use bosh-deployment, the recommended installation method, to bootstrap our director.
git clone https://github.com/cloudfoundry/bosh-deployment.git
Now, we can run the virtualbox/create-env.sh
script to create our test director and configure the environment with some defaults.
./bosh-deployment/virtualbox/create-env.sh
During the bootstrap process, you will see a few stages:
- Creating BOSH Director - dependencies are downloaded, the VM is created, and BOSH is installed, configured, and started.
- Adding Network Routes - a route to the virtual network is added to ensure you will be able to connect to BOSH-managed VMs.
- Generating
.envrc
- a settings file is generated so you can easily connect to the environment later. - Configuring Environment Alias - an alias is added for the
bosh
command so you can reference the environment asvbox
. - Updating Cloud Config - default settings are applied to the Director so you can easily deploy software later.
After a few moments, BOSH should be started. To verify, first load your connection settings, and then run your first bosh
command where you should see similar output.
source .envrc
bosh -e vbox env
Should result in:
Using environment '192.168.56.6' as client 'admin' Name bosh-lite UUID 7ce65259-471a-424b-88cb-9d3cee85db2c Version 265.2.0 (00000000) CPI warden_cpi User admin
Congratulations - BOSH is running! Now you're ready to deploy
Troubleshooting
If you run into any trouble, please continue to the VirtualBox Troubleshooting section.
Deploy¶
Run through quick steps below or follow deploy workflow that goes through the same steps but with more explanation.
-
Update cloud config
bosh -e vbox update-cloud-config bosh-deployment/warden/cloud-config.yml
-
Upload stemcell
bosh -e vbox upload-stemcell https://bosh.io/d/stemcells/bosh-warden-boshlite-ubuntu-xenial-go_agent?v=315.45 \ --sha1 674cd3c1e64d8c51e62770697a63c07ca04e9bbd
-
Deploy example deployment
bosh -e vbox -d zookeeper deploy <(wget -O- https://raw.githubusercontent.com/cppforlife/zookeeper-release/master/manifests/zookeeper.yml)
-
Run Zookeeper smoke tests
bosh -e vbox -d zookeeper run-errand smoke-tests
Clean up¶
The test director can be deleted using the virtualbox/delete-env.sh
script.
./bosh-deployment/virtualbox/delete-env.sh