Command line interfaces for IBM Cloud Private Cloud Foundry
IBM® Cloud Private Cloud Foundry: This information is applicable to IBM Cloud Private Cloud Foundry only.
The inception container, which you can access by using connect.sh, already has the BOSH CLI and Cloud Foundry CLI installed. However, there might be times when you want to run BOSH CLI or Cloud Foundry CLI commands from another machine. In this case, you might need to install some command line interfaces (CLIs).
- BOSH: Use this CLI to manage the BOSH Director, which manages all the deployed virtual machines.
- Cloud Foundry (Cloud Foundry CLI): Use this CLI to run core Cloud Foundry commands.
BOSH
To install the BOSH v2 CLI, see BOSH Command Line Interface
For more information about the BOSH v2 CLI, see BOSH CLI Community Documentation
Useful BOSH Commands
-
Target a BOSH Director. You must be able to reach the
director_ipIP address through the connected networks.#If you migrated from 3.1.0 bosh alias-env IBMCloudPrivate -e https://<director_ip>:25555 --ca-cert <(bosh int <installation configuration directory>/data/CloudFoundry/certificates.yml --path /certificates/rootca/certificate/data) #If this is a fresh deployment bosh alias-env IBMCloudPrivate -e https://<director_ip>:25555 --ca-cert <(bosh int <installation configuration directory>/data/CloudFoundry/director-store.yml --path /director_ssl/ca) -
Authenticate the BOSH CLI with a BOSH Director. In the following commands, the user name is
admin. The password is thecredentials.boshdirector.bosh.passwordparameter value in thecredentials.ymlfile in the./CloudFoundryfolder of your installation configuration directory.export BOSH_ENVIRONMENT=IBMCloudPrivate bosh loginbosh logoutTo set the BOSH client login values as environment variables:
export BOSH_CLIENT=admin export BOSH_CLIENT_SECRET=`bosh int /travis/data/CloudFoundry/credentials.yml --path <installation configuration di -
List BOSH deployments that are currently managed by the connected Director:
bosh deployments -
List the virtual machines that are associated with a deployment:
bosh -d DEPLOYMENT_NAME vms [--details | --vitals] -
Target a BOSH deployment with a single command:
bosh -d DEPLOYMENT BOSH_COMMAND -
Persistently target a BOSH deployment manifest file:
export BOSH_DEPLOYMENT=DEPLOYMENT_NAME -
Export a deployment's manifest:
bosh -d DEPLOYMENT_NAME download manifest MANIFEST_FILE.yml -
List recent BOSH tasks:
bosh tasks recentA list of BOSH task ID numbers is displayed.
-
View BOSH task details:
bosh task ID_NUMBERNote: You can obtain a list of task numbers by displaying the recent BOSH tasks.
Cloud Foundry
To install the Cloud Foundry CLI, see Installing the cf CLI .
For more information about the Cloud Foundry CLI, see Cloud Foundry Command Line Interface (cf CLI) .
Useful Cloud Foundry Commands
-
Target a Cloud Foundry platform:
cf api https://api.<YOUR_DOMAIN> -
Authenticate the Cloud Foundry CLI with a Cloud Foundry platform:
cf logincf logout -
Display an abbreviated list of commands:
cf -h -
Display a list of all commands:
cf -h -a