bosh
Deploy and manage Cloud Foundry and Kubernetes
TLDR
Create local alias for director in a specific environment
List environments
Log in to the director
List deployments
List environment virtual machines in a deployment
SSH into virtual machine
Upload stemcell
Show current cloud config
SYNOPSIS
bosh [GLOBAL_OPTIONS] COMMAND [COMMAND_OPTIONS] [ARGUMENTS]
Example: bosh --environment my-bosh-director deploy manifest.yml
PARAMETERS
-e, --environment
Specifies the target BOSH Director environment by name or alias. This is crucial for interacting with a specific BOSH deployment.
--json
Formats command output as JSON, useful for scripting and integration with other tools.
-n, --non-interactive
Skips interactive prompts and assumes 'yes' to confirmations, useful for automation.
--no-color
Disables colored output in the terminal, which can be helpful for logging or specific terminal configurations.
--debug
Prints debug logs, providing more verbose and detailed output for troubleshooting purposes.
--ca-cert
Path to a custom CA certificate to trust when connecting to the BOSH Director, important for secure communication.
DESCRIPTION
BOSH (originally an acronym for BOSH Outer SHell) is an open-source tool for deploying and managing complex distributed systems. While widely known as the underlying infrastructure management layer for Cloud Foundry, it's a general-purpose orchestration tool capable of deploying any software stack onto various Infrastructure-as-a-Service (IaaS) providers like AWS, Google Cloud Platform, Azure, OpenStack, and vSphere.
BOSH automates the entire lifecycle of a distributed system, from initial deployment and provisioning of virtual machines to ongoing management, health monitoring, and self-healing. It ensures the system's resilience by detecting and recovering from failures (e.g., restarting crashed VMs or re-creating instances). Key concepts include Releases (versioned collections of source code, configurations, and scripts), Stemcells (versioned OS images with a BOSH Agent), and the BOSH Director (the central BOSH management component). It promotes an 'immutable infrastructure' approach, simplifying updates and rollbacks.
CAVEATS
BOSH is not a native Linux command-line utility; it must be installed separately (typically as a Go executable or via a package manager).
It requires a running BOSH Director instance to perform any operations. The learning curve can be steep due to its unique architectural concepts (Releases, Stemcells, Instance Groups, etc.), and it's primarily designed for managing complex, distributed systems rather than simple single-server applications.
BOSH DIRECTOR
The BOSH Director is the central component of a BOSH deployment. It's a server that manages the lifecycle of your deployed systems. It orchestrates VMs, installs software, monitors health, and performs self-healing actions. All BOSH CLI commands interact with a specific BOSH Director, which acts as the control plane for your infrastructure.
RELEASES AND STEMCELLS
A Release is a versioned archive containing source code, compiled binaries, configuration files, and packaging scripts for a piece of software (e.g., Cloud Foundry components, a database, or your application). A Stemcell is a versioned operating system image (e.g., Ubuntu, CentOS) with a BOSH Agent installed. BOSH combines a Release with a Stemcell to create and manage instances on IaaS providers, ensuring consistent and reproducible deployments across different environments.
HISTORY
BOSH was originally developed by VMware as part of its Cloud Foundry efforts and later open-sourced. Its development began with a focus on solving the challenges of deploying and managing highly available, complex distributed systems in the cloud. It became a foundational component of the Cloud Foundry Platform-as-a-Service (PaaS), responsible for managing the underlying virtual machines and services. Over time, it evolved into a general-purpose deployment tool, adopted by various organizations for reliable software delivery and infrastructure automation, emphasizing immutable infrastructure principles.