Skip to content

Instantly share code, notes, and snippets.

View nikhilsuvarna's full-sized avatar

Nikhil Suvarna nikhilsuvarna

  • Pivotal Software
  • San Francisco, CA
View GitHub Profile
@nikhilsuvarna
nikhilsuvarna / garden_runc_ssh.md
Last active December 22, 2016 22:55
ssh to garden-runc container
cell_z2/0a5a19b5-f1f8-4c0d-ba8d-64b63e9cdd83:~$ sudo -i
cell_z2/0a5a19b5-f1f8-4c0d-ba8d-64b63e9cdd83:~# /var/vcap/packages/guardian/bin/inspector-garden -pid $(pidof guardian) /bin/bash
cell_z2/0a5a19b5-f1f8-4c0d-ba8d-64b63e9cdd83:/# cd /var/vcap/data/garden/depot/
cell_z2/0a5a19b5-f1f8-4c0d-ba8d-64b63e9cdd83:/var/vcap/data/garden/depot# ls
bf51ff0c-65f3-4940-71ae-32e792c34e45
cell_z2/0a5a19b5-f1f8-4c0d-ba8d-64b63e9cdd83:/var/vcap/data/garden/depot# cd bf51ff0c-65f3-4940-71ae-32e792c34e45/
cell_z2/0a5a19b5-f1f8-4c0d-ba8d-64b63e9cdd83:/var/vcap/data/garden/depot/bf51ff0c-65f3-4940-71ae-32e792c34e45# /var/vcap/packages/runc/bin/runc exec -t bf51ff0c-65f3-4940-71ae-32e792c34e45 /bin/bash
root@bf51ff0c-65f3-4940-71ae-32e792c34e45:/# ls -l
total 84
@nikhilsuvarna
nikhilsuvarna / space_user_wackiness.md
Last active December 22, 2016 23:06
space-user wackiness

Here we have added di_devops user to space di :

C:\Users\i275943\Desktop\Willow>cf space-users HCSC_PROD di <---

Getting users in org HCSC_PROD / space di as admin

SPACE MANAGER
@nikhilsuvarna
nikhilsuvarna / garden-runc-container-creation-sequence.txt
Created December 23, 2016 08:03
garden-runc-container-creation-sequence
{"timestamp":"1482471067.173836946","source":"guardian","message":"guardian.create.start","log_level":1,"data":{"handle":"dc7f09dd-8d31-4640-a9f5-1d557c104bf7-ae5d6bafb21941fdaaf5216fbdc5a516","session":"785071"}}
{"timestamp":"1482471067.173869848","source":"guardian","message":"guardian.create.gc.start","log_level":1,"data":{"handle":"dc7f09dd-8d31-4640-a9f5-1d557c104bf7-ae5d6bafb21941fdaaf5216fbdc5a516","session":"785071.1"}}
{"timestamp":"1482471067.173882961","source":"guardian","message":"guardian.create.gc.threshold.start","log_level":1,"data":{"handle":"dc7f09dd-8d31-4640-a9f5-1d557c104bf7-ae5d6bafb21941fdaaf5216fbdc5a516","limit":0,"session":"785071.1.1"}}
{"timestamp":"1482471067.175504208","source":"guardian","message":"guardian.create.gc.threshold.layer","log_level":1,"data":{"handle":"dc7f09dd-8d31-4640-a9f5-1d557c104bf7-ae5d6bafb21941fdaaf5216fbdc5a516","limit":0,"session":"785071.1.1","size":0,"total":0}}
{"timestamp":"1482471067.175529718","source":"guardian","message":"guardian.create.gc.thr
@nikhilsuvarna
nikhilsuvarna / rep-output-when-pushing-app.txt
Created December 23, 2016 10:55
rep-output-when-pushing-app
{"timestamp":"1482488862.619482040","source":"rep","message":"rep.request.auction-fetch-state.auction-state.providing","log_level":1,"data":{"method":"GET","request":"/state","session":"151.1.1"}}
{"timestamp":"1482488862.619518518","source":"rep","message":"rep.request.auction-fetch-state.auction-state.containerstore-list.starting","log_level":1,"data":{"method":"GET","request":"/state","session":"151.1.1.1"}}
{"timestamp":"1482488862.619594812","source":"rep","message":"rep.request.auction-fetch-state.auction-state.containerstore-list.complete","log_level":1,"data":{"method":"GET","request":"/state","session":"151.1.1.1"}}
{"timestamp":"1482488862.619611740","source":"rep","message":"rep.request.auction-fetch-state.auction-state.volume-drivers.list-drivers.start","log_level":1,"data":{"method":"GET","request":"/state","session":"151.1.1.3.1"}}
{"timestamp":"1482488862.619623423","source":"rep","message":"rep.request.auction-fetch-state.auction-state.volume-drivers.list-drivers.end","log_level":1,"data":{"me
@nikhilsuvarna
nikhilsuvarna / get-instance-guid
Created December 27, 2016 15:25
proper way of getting instance guid from diego
get the app guid, query CC to construct the process guid from app-guid+app-version
[11:22]
query the BBS API for the actual lrps for that process guid (and index, if you care)
[11:22]
which will get you the cell id and instance guid for each actual lrp
[11:23]
and then go to that cell and get into the container for that instance guid
@nikhilsuvarna
nikhilsuvarna / bosh2.md
Last active September 29, 2017 06:03
bosh2 stuff

v1 vs v2 https://bosh.io/docs/cli-v2-diff.html

bosh2 is strict about SSL certs. If a director has been initialized using bosh1 cli, connecting to the director via bosh2 cli will throw the folowing error :

ubuntu@bosh-stemcell:~$ bosh2 alias-env dev -e 10.193.72.9 
Fetching info:
  Performing request GET 'https://10.193.72.9:25555/info':
    Performing GET request:
@nikhilsuvarna
nikhilsuvarna / notes.md
Last active June 25, 2017 02:42
lemur release notes
lemur-release/jobs
lemur-release/config
lemur-release/config/final.yml
lemur-release/config/blobs.yml
lemur-release/src
lemur-release/packages
@nikhilsuvarna
nikhilsuvarna / extract_consul_agent_log.sh
Created October 11, 2017 23:49
extract a file from multiple tar bundles that have the same file name
for i in `ls -1 logs`
do
# for j in `$i | awk -F "." '{print $1"."$2}'`
# do
tar --strip-components=2 -xvf logs/$i consul_agent/consul_agent.stdout.log
mv consul_agent.stdout.log consul_agent_`echo $i | awk -F "." '{print $1"."$2}'`
#echo $i |awk -F "." '{print $1"."$2}'
done
@nikhilsuvarna
nikhilsuvarna / manage_git.md
Last active July 7, 2018 09:07
managing multiple git accounts
  1. Generate keys for your github user email id :
ssh-keygen -t rsa -b 4096 -C "[email protected]"
  1. When prompted for the file to save the key, create a new file, in this case id_rsa_pivotal
Enter file in which to save the key (/Users/nsuvarna/.ssh/id_rsa):