Pivotal/BOSH/CLI

From r00tedvw.com wiki
(Difference between revisions)
Jump to: navigation, search
(bosh log-in)
(bosh alias-env)
Line 58: Line 58:
 
~$ export BOSH_CLIENT=admin
 
~$ export BOSH_CLIENT=admin
 
~$ export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`</nowiki>
 
~$ export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`</nowiki>
;sets up an alias name for the environment from ops man director on vsphere
+
;sets up an alias name for the environment from ops man director on vsphere.  You may need to ssh into the ops manager first.
 
:<code>bosh2 alias-env MY-ENV -e DIRECTOR-IP-ADDRESS --ca-cert /var/tempest/workspaces/default/root_ca_certificate</code>
 
:<code>bosh2 alias-env MY-ENV -e DIRECTOR-IP-ADDRESS --ca-cert /var/tempest/workspaces/default/root_ca_certificate</code>
 
  <nowiki>~$ bosh2 alias-env myenv -e 10.193.81.11 --ca-cert /var/tempest/workspaces/default/root_ca_certificate</nowiki>
 
  <nowiki>~$ bosh2 alias-env myenv -e 10.193.81.11 --ca-cert /var/tempest/workspaces/default/root_ca_certificate</nowiki>

Revision as of 13:46, 19 July 2018

BOSH | BOSH CLI

Contents

CLI Quick Reference

https://bosh.io/docs/cli-v2/

bosh create-env

creates a bosh environment with the director
bosh create-env <path to bosh.yml> \
--state <path to state.json> \
-o <path to cpi.yml> \
-o <path to outbound-network.yml> \
-o <path to bosh-lite.yml> \
-o <path to bosh-lite-runc.yml> \
-o <path to jumpbox-user.yml> \
--var-store <path to creds.yml> \
-v director_name="<bosh director name> \
-v internal_ip=<internal ip for bosh director> \
-v internal_gw=<internal ip for gateway> \
-v internal_cidr=<internal cidr range for network> \
-v outbound_network_name=<name for outbound nat network>
~$ bosh create-env ~/Git/workspace/bosh-deployment/bosh.yml \
  --state ./state.json \
  -o ~/Git/workspace/bosh-deployment/virtualbox/cpi.yml \
  -o ~/Git/workspace/bosh-deployment/virtualbox/outbound-network.yml \
  -o ~/Git/workspace/bosh-deployment/bosh-lite.yml \
  -o ~/Git/workspace/bosh-deployment/bosh-lite-runc.yml \
  -o ~/Git/workspace/bosh-deployment/uaa.yml \
  -o ~/Git/workspace/bosh-deployment/credhub.yml \
  -o ~/Git/workspace/bosh-deployment/jumpbox-user.yml \
  --vars-store ./creds.yml \
  -v director_name=bosh-lite \
  -v internal_ip=192.168.50.6 \
  -v internal_gw=192.168.50.1 \
  -v internal_cidr=192.168.50.0/24 \
  -v outbound_network_name=NatNetwork

bosh env

shows your current environment details
bosh -e <environment alias> env
~$ bosh -e vbox env
Using environment '192.168.50.6' as client 'admin'

Name      bosh-lite
UUID      f2d2eb92-5866-4c5d-8822-7c09ff0f5fc0
Version   266.4.0 (00000000)
CPI       warden_cpi
Features  compiled_package_cache: disabled
          config_server: enabled
          dns: disabled
          snapshots: disabled
User      admin

Succeeded

bosh alias-env

sets up an alias name for the environment
bosh alias-env vbox -e <director ip> --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
~$ bosh alias-env vbox -e 192.168.50.6 --ca-cert <(bosh int ./creds.yml --path /director_ssl/ca)
~$ export BOSH_CLIENT=admin
~$ export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`
sets up an alias name for the environment from ops man director on vsphere. You may need to ssh into the ops manager first.
bosh2 alias-env MY-ENV -e DIRECTOR-IP-ADDRESS --ca-cert /var/tempest/workspaces/default/root_ca_certificate
~$ bosh2 alias-env myenv -e 10.193.81.11 --ca-cert /var/tempest/workspaces/default/root_ca_certificate

bosh log-in

log in to the director. alias is l
bosh -e <env alias> login-in
~$ bosh -e my-env l
User (): admin
Password ():

NOTE: you can set the username and password as environment variables to avoid typing them in:

~$ export BOSH_CLIENT=admin
~$ export BOSH_CLIENT_SECRET=`bosh int ./creds.yml --path /admin_password`


for bosh cli, use the director credentials found in the bosh director tile.

bosh log-out

log out of the director
bosh -e <env alias> log-out
~$bosh -e vbox log-out
Logged out from '192.168.50.6'

Succeeded

bosh vms

List all the virtual machines create and managed by BOSH
bosh -e env vms
~$ bosh -e myenv vms

bosh deployments

List all of the deployments managed by BOSH
bosh -e env deployments
~$ bosh -e myenv deployments

bosh -d

specify specific deployment and then specify a command
bosh -e env -d <deployment name> <command>
~$ bosh -e myenv -d cf-3dc74d032cbc62c7fd76 errands
Personal tools
Namespaces

Variants
Actions
Navigation
Mediawiki
Confluence
DevOps Tools
Open Source Products
Ubuntu
Ubuntu 22
Mac OSX
Oracle Linux
AWS
Windows
OpenVPN
Grafana
InfluxDB2
TrueNas
OwnCloud
Pivotal
osTicket
OTRS
phpBB
WordPress
VmWare ESXI 5.1
Crypto currencies
HTML
CSS
Python
Java Script
PHP
Raspberry Pi
Canvas LMS
Kaltura Media Server
Plex Media Server
MetaSploit
Zoneminder
ShinobiCE
Photoshop CS2
Fortinet
Uploaded
Certifications
General Info
Games
Meal Plans
NC Statutes
2020 Election
Volkswagen
Covid
NCDMV
Toolbox