LinuxCommandLibrary

bosh

Deploy and manage Cloud Foundry and Kubernetes

TLDR

Create local alias for director in a specific environment

$ bosh alias-env [environment_name] [[-e|--environment]] [ip_address|URL] --ca-cert [ca_certificate]
copy

List environments
$ bosh environments
copy

Log in to the director
$ bosh login [[-e|--environment]] [environment]
copy

List deployments
$ bosh [[-e|--environment]] [environment] deployments
copy

List environment virtual machines in a deployment
$ bosh [[-e|--environment]] [environment] vms [[-d|--deployment]] [deployment]
copy

SSH into virtual machine
$ bosh [[-e|--environment]] [environment] ssh [virtual_machine] [[-d|--deployment]] [deployment]
copy

Upload stemcell
$ bosh [[-e|--environment]] [environment] upload-stemcell [stemcell_file|url]
copy

Show current cloud config
$ bosh [[-e|--environment]] [environment] cloud-config
copy

SYNOPSIS

bosh [global-options] <command> [<args>]

PARAMETERS

-e, --environment <URL>
    Specify BOSH director environment URL

--ca-cert <path>
    Path to CA certificate for TLS

--client <name>
    UAA/OAuth client name for authentication

--client-secret <secret>
    UAA/OAuth client secret

-d, --deployment <name>
    Target specific deployment name

--debug
    Enable verbose debug output

--deprecation-warning
    Show deprecation warnings

--no-color
    Disable colored terminal output

--private-key <path>
    Path to client private key

--timeout <seconds>
    Set request timeout duration

DESCRIPTION

bosh is the command-line interface for BOSH, an open-source tool that simplifies deploying and managing cloud-native software across IaaS platforms like AWS, GCP, Azure, OpenStack, and vSphere. It interacts with a central BOSH Director, which orchestrates virtual machines (VMs), networks, persistent disks, and software releases called stemcells.

Key workflows include initializing a director, uploading stemcells and releases, creating deployment manifests in YAML, and executing deployments with zero-downtime updates. Operators can scale instances, run one-off errands (temporary VMs for tasks), restart jobs, and troubleshoot via SSH access or logs. BOSH ensures consistency with canary deployments, health checks, and automatic rollbacks.

Security features integrate with UAA for authentication and CredHub for encrypted secrets. Widely used in Cloud Foundry but versatile for any distributed system, bosh abstracts cloud complexities, enabling reproducible environments from dev to production. Installation via binaries, packages, or Homebrew; requires Go 1.16+ for v7+.

CAVEATS

Not a standard Linux utility; requires separate installation (e.g., via bosh-cli package or binary). Needs a running BOSH director and authentication setup. Subcommands like deploy demand network access and sufficient cloud quotas.

COMMON SUBCOMMANDS

init: Initialize local workspace.
deploy: Deploy/update manifest.
vm-resize: Resize VM disks.
ssh: SSH into VM instances.

INSTALLATION

Linux: sudo apt install bosh-cli (Ubuntu) or download from bosh.io. Verify: bosh --version.

HISTORY

Developed by VMware Cloud Foundry team circa 2010 as 'BOSH: Open Source'. CLI v1 used Ruby; v2+ rewritten in Go for performance. Pivotal/VMware maintained until 2019; now under Cloud Foundry Foundation. v7.1+ (2023) adds modern auth and OCI support.

SEE ALSO

ssh(1), scp(1), fly(1)

Copied to clipboard