Bloomberg Clustered Private Cloud distribution
The cloud consists of head nodes (OpenStack controller services, Ceph Mons, etc.) and work nodes (hypervisors).
Each head node runs all of the core services in a highly-available manner. Each work node runs the relevant services (nova-compute, Ceph OSDs, etc.).
The following instructions will get chef-bcpc up and running on your local machine for development and testing purposes.
NOTE: It is likely possible to build an environment with 16GB of RAM or less if one is willing to make slight modifications to the virtual topology and/or change some of the build settings and overrides. However, we've opted to spec the minimum requirements slightly more aggressively and target hosts with 32GB RAM or more to provide the best out-of-the-box experience.
virtual/topology, or build your own. hardware.yml and topology.yml are used by default. To view a list of tested topologies and hardware configurations please see virtual/README.
virtual/vagrantbox.json. The variable
vagrant_boxspecifies the Vagrant box we use to build the virtual environment, and
vagrant_box_versionspecifies the version of the Vagrant box.
virtual/packer/variables.jsonand set the variables. Depends on the virtual machine provider, an example can be found at variables.json.virtualbox.example or variables.json.libvirt.example. This step is essential for building a Packer box that's used as a base box image for building the virtual environment. The variables
bcc_apt_urlare optional, while others must be set. The variable
kernel_versionspecifies the linux kernel version we'd like to have for the Packer box. While
base_box_providerspecify an official Vagrant box we'd like to use as a baseline for the Packer box, upon which we make further modifications. Last but not least, the variable
output_packer_box_namespecifies the name we'd like to use when adding the output Packer box to Vagrant.
make create-packer-box. This will create a Packer box and add it to Vagrant with the name specified by
virtual/vagrantbox.jsonaccordingly. When a local custom box built by Packer is used, the variable
vagrant_boxneeds to be set to the name of the Packer box (aka, the same as
vagrant_box_versionshould be set to 0.
make create allwould always use the Packer box, unless
virtual/vagrantbox.jsonis specified otherwise.
make destroy, and then run
make destroy-packer-boxto clean up the Packer box.
topology.overrides.yml, respectively, and make changes to them instead.
Download and install the latest version of Packer
wget https://releases.hashicorp.com/packer/1.6.6/packer_1.6.6_linux_amd64.zip -O ~/packer_1.6.6_linux.zip sudo apt install unzip sudo unzip ~/packer_1.6.6_linux.zip -d /usr/local/bin
Create a Python virtual environment (virtualenv) and activate it
python3 -mvenv venv source venv/bin/activate pip install 'pip>=19.1.1' wheel pip install PyYaml ansible netaddr pyOpenSSL pycryptodome
To create a virtualbox build (the default):
make generate-chef-databags make create-packer-box make create all
To create a libvirt build:
sudo apt-get install build-essential libvirt-dev qemu-utils libguestfs-tools vagrant plugin install vagrant-libvirt vagrant-mutate vagrant box add bento/ubuntu-18.04 --box-version 202005.21.0 --provider virtualbox vagrant mutate bento/ubuntu-18.04 libvirt export VAGRANT_DEFAULT_PROVIDER=libvirt VAGRANT_VAGRANTFILE=Vagrantfile.libvirt make generate-chef-databags make create-packer-box make create all
To clean up the build:
shell make destroy make destroy-packer-box
You may also want to change cpu model from
chef_environment: name: virtual override_attributes: bcpc: nova: cpu_config: cpu_mode: custom cpu_model: kvm64
To revert to the default virtualbox provider, as far as the build is concerned, you can just remove the mutated libvirt box and then unset VAGRANTDEFAULTPROVIDER and VAGRANT_VAGRANTFILE environment variables. However since you must also make sure that the different hypervisors don't both try to control the CPU virtualisation facilities, it is best to remove the mutated box and then simply reboot your development host (assuming no scripts reset the VAGRANT variables).
This would look something like this:
$ rm -rf ~/.vagrant.d/boxes/bento-VAGRANTSLASH-ubuntu-18.04/202005.21.0/libvirt/ $ sudo reboot
Currently, most development is done by a team at Bloomberg L.P. but we would like to build a community around this project. PRs and issues are welcomed. If you are interested in joining the team at Bloomberg L.P. please see available opportunities at the Bloomberg L.P. careers site.
This project is licensed under the Apache 2.0 License - see the LICENSE.txt file for details.
chef-bcpc is built with the following open source software:
Thanks to all of these communities for producing this software!