github.com/arunkumar7540/cli@v6.45.0+incompatible/ci/local-integration-env/bosh-lite-cheat.md (about) 1 # New bosh-lite cheat sheet 2 3 If you set a different value for `$WORKSPACE` when running 4 `deploy_bosh_lite.sh`, change `~/workspace` to the same value for the following 5 commands. 6 7 ## log in to bosh 8 9 ```sh 10 export BOSH_ENVIRONMENT=vbox 11 export BOSH_CLIENT=admin 12 export BOSH_CLIENT_SECRET=$(bosh int ~/workspace/cli-lite/creds.yml --path /admin_password) 13 ``` 14 15 16 ## ssh to bosh 17 18 ```sh 19 bosh int ~/workspace/cli-lite/creds.yml --path /jumpbox_ssh/private_key > private_key 20 21 chmod 0600 private_key 22 23 ssh -i private_key jumpbox@192.168.50.6 24 ``` 25 26 ## VirtualBox bosh-lite loses internet connectivity 27 28 Sometimes this happens after it is running for a while due to a VirtualBox bug. 29 30 ``` 31 VBoxManage natnetwork stop --netname NatNetwork 32 VBoxManage natnetwork start --netname NatNetwork 33 ``` 34 35 ## Bringing back a dead bosh-lite 36 37 Upgrade VirtualBox to the latest version because it is more stable. 38 39 Make sure the bosh-lite VM is running in VirtualBox. 40 41 Edit `~/workspace/cli-lite/state.json` and remove the `current_manifest_sha` key. 42 43 Run `$GOPATH/src/code.cloudfoundry.org/cli/ci/local-integration-env/deploy_bosh_lite.sh`. This 44 will recreate the bosh-lite but not the containers. 45 46 `bosh delete-deployment -d cf --force -n` 47 48 If the deployment is locked from the resurrector: 49 50 ``` 51 bosh tasks --all 52 bosh cancel-task <task number from task list> 53 ``` 54 55 (Optional) To ensure that the resurrector won't try and enqueue any additional tasks: 56 ``` 57 bosh update-resurrection off 58 ``` 59 60 Run `$GOPATH/src/code.cloudfoundry.org/cli/ci/local-integration-env/deploy_bosh_lite.sh` again 61 to recreate the cf deployment. Add the `clean` argument to clean up old 62 bosh-lite deployment when restarting the machine puts VirtualBox in a weird 63 state.