BOSH Director

How to ssh onto BOSH director vm

  1. Go to "Ops manager UI"

  2. Click on "Bosh Tile"

  3. Go to "Credentials" tab

  4. Click on "Bbr Ssh Credentials" to get the RSA private key

  5. Save the key in ~/.ssh/bbr-ssh.key, remember to replace \n to with newlines

  6. Change the bbr-ssh.key permission: chmod 600 ~/.ssh/bbr-ssh.key

  7. SSH to BOSH vm: ssh bbr@<bosh-DIRECTOR-IP> -i ~/.ssh/bbr.key

  8. sudo -i to get the root privilege

Steps 1 - 4 could be automated by:

  • alias omcli='om -t https://30.0.0.5 -u admin -p '\''xxxxx'\'' -k'

Replace 'xxxxxx' with your opsman password.

  • omcli curl -p /api/v0/deployed/director/credentials/bbr_ssh_credentials

You will get the output similar to the following:

{
  "credential": {
    "type": "rsa_pkey_credentials",
    "value": {
      "private_key_pem": "-----BEGIN RSA PRIVATE KEY-----xxxxxxx-----END RSA PRIVATE KEY-----\n",
      "public_key_pem": "-----BEGIN PUBLIC KEY-----xxxxxxx-----END PUBLIC KEY-----\n"
    }
  }
}

How to access to the postgreSQL DB on BOSH vm

Once you ssh onto the BOSH director vm, you could check the postgreSQL DB by using the following command:

/var/vcap/packages/postgres-9.4/bin/psql -U vcap bosh -h 127.0.0.1

To show all the tables, you could use:

SELECT * FROM pg_catalog.pg_tables;

Last updated