Gcloud and CSI troubleshooting

Update from a diff to another diff
arc diff –nounit –nolint –update D677

Arc diff to a branch including someone else’s commit
arc diff master

Gcloud set project
gcloud config set project VALUE

Control service
http://localhost:1102/_svc/cnt/counter/

Docker

sudo docker attach <image_id>
To detache : Ctrl-P then Ctrl-q

3 # Basic Usage:
4 # % docker build .
5 # % docker run -p 6379:6379 –name redis -d <image_id>·
6 # % docker run –volumes-from <container_id> <image_id>
7 # % docker run -v local_dir:remote_dir <image_id>

SSH to a gcloud machine
gcloud compute ssh csiuser@ccloud-prod-cg-us-central1-f-sslppfe-aplx

Resizing CSI
1. Modify $CSIPATH/script/conf/cg_conf.json and send diff

cg_config

2. Go to the prod-console :
gcloud compute ssh csiuser@prod-console –proj studio-csi-prod –zone us-central1-f
3. Git pull –rebase
4. Resize component
./ccloud.py instance resize <component> –life prod –project cg
e.g ./ccloud.py instance resize metacrawler -l prod -p cg
e.g. ./ccloud.py instance resize docvcs –life prod –project cg

Restart Dockers
1. ./ccloud.py instance restart <component> <component> -l prod -p cg
./ccloud.py instance restart assocmeta ppfe -l prod -p cg

Restart one docker
1.gcloud preview managed-instance-groups –zone us-central1-f recreate-instances <instance-group> –instance <instance>
gcloud preview managed-instance-groups –zone us-central1-f recreate-instances mi-ccloud-prod-cg-us-central1-assocmeta –instance ccloud-prod-cg-us-central1-f-assocmeta-m07d

Check HAPROXY logs
1. List instance : gcloud compute instances list | grep ssl
2. docker ps; docker logs –tail=<# of line> <docker id>
// Connection may flipping
3. sudo su
4. cat /var/run/google.startup.script  // Viewing ppfe load balancer IP
lb

JQ monitor

1. Check logs in /mnt

./tools -csi_redis_auth=studio-prod-cg-9527 -csi_redis_master=pub-redis-18725.us-central1-1-2.gce.garantiadata.com:18725 -csi_redis_slave=pub-redi│·
s-18725.us-central1-1-2.gce.garantiadata.com:18725 -option=4 -base_log_min_severity_to_stderr=0

Pprof
http://54.148.240.238:28183/debug/pprof/goroutine?debug=1

廣告
本篇發表於 Uncategorized。將永久鏈結加入書籤。

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s