Skip to content

Instantly share code, notes, and snippets.

View ngtuna's full-sized avatar

Tuna ngtuna

View GitHub Profile
@ngtuna
ngtuna / ps
Created September 11, 2014 10:46
Too many cloud_controller_ng processes
root@abf5a7df-7a72-4326-bcc5-9b5f6fa8378a:/home/vcap# ps aux | grep cloud_controller_ng
vcap 27801 4.1 3.7 194476 77920 ? R< 10:08 1:21 ruby /var/vcap/packages/cloud_controller_ng/cloud_controller_ng/bin/cloud_controller -m -c /var/vcap/jobs/cloud_controller_ng/config/cloud_controller_ng.yml
root 27806 0.0 0.0 19252 684 ? S< 10:08 0:00 /bin/bash /var/vcap/jobs/cloud_controller_ng/bin/cloud_controller_ng_ctl start
root 27807 0.0 0.0 19252 684 ? S< 10:08 0:00 /bin/bash /var/vcap/jobs/cloud_controller_ng/bin/cloud_controller_ng_ctl start
root 27811 0.0 0.0 19256 692 ? S< 10:08 0:00 /bin/bash /var/vcap/jobs/cloud_controller_ng/bin/cloud_controller_ng_ctl start
root 27812 0.0 0.0 19256 692 ? S< 10:08 0:00 /bin/bash /var/vcap/jobs/cloud_controller_ng/bin/cloud_controller_ng_ctl start
root 27826 0.0 0.0 5528 780 ? S< 10:08 0:00 logger -p user.info -t vcap.cloud_controller_ng_ctl.stdout
root 2782
@ngtuna
ngtuna / cf_push_nginx
Created October 14, 2014 16:48
cf push nginx
public@public:~/docker/docker-buildpack/cf-docker/nginx$ cf push nginx
Using manifest file /home/public/docker/docker-buildpack/cf-docker/nginx/manifest.yml
Creating app nginx in org fsb / space demo as admin...
OK
Using route nginx.10.244.0.34.xip.io
Binding nginx.10.244.0.34.xip.io to nginx...
OK
@ngtuna
ngtuna / cf_logs_nginx
Last active August 29, 2015 14:07
cf logs nginx
public@public:~$ cf logs nginx
Connected, tailing logs for app nginx in org fsb / space demo as admin...
2014-10-15T23:16:50.61+0700 [DEA] OUT Got staging request for app with id 1f1a8057-6bbe-4ef2-a5bc-e960452ea985
2014-10-15T23:16:51.68+0700 [API] OUT Updated app with guid 1f1a8057-6bbe-4ef2-a5bc-e960452ea985 ({"state"=>"STARTED"})
2014-10-15T23:16:51.83+0700 [STG] OUT -----> Downloaded app package (4.0K)
2014-10-15T23:16:52.17+0700 [STG] OUT -----> Building Docker package
2014-10-15T23:16:52.21+0700 [STG] ERR
2014-10-15T23:16:52.91+0700 [STG] OUT -----> Uploading droplet (1.7M)
2014-10-15T23:16:54.41+0700 [DEA] OUT Starting app instance (index 0) with guid 1f1a8057-6bbe-4ef2-a5bc-e960452ea985
@ngtuna
ngtuna / docker_images
Created October 14, 2014 16:49
docker images
root@ip-10-10-10-75:/home/ubuntu# docker images
REPOSITORY TAG IMAGE ID CREATED VIRTUAL SIZE
b5f90397-d537-4952-8f90-3d92299ca955 latest 05ad99517313 6 hours ago 269 MB
87ba3cc4-30a3-430d-8793-c4454465f049 latest 6c6f343d4ac5 8 hours ago 430.2 MB
dockerfile/ubuntu latest ae717902b801 18 hours ago 414.7 MB
f0fdd3df-d087-4126-a316-635e6deeec91 latest ae717902b801 18 hours ago 414.7 MB
3b456f41-6464-472e-a62d-e364023179a8 latest ae717902b801 18 hours ago 414.7 MB
af0a04c6-43b0-484d-8884-813c8b432b7b latest ae717902b801 18 hours ago 414.7 MB
da25d900-7ea5-452b-9359-5f38c3f9b2bf latest ae717902b801 18 hours ago 414.7 MB
55b8c95e-51cc-43ea-a01e-8ff14df36a26 latest ae717902b801 18 hours ago 414.7 MB
@ngtuna
ngtuna / docker_ps.sh
Last active August 29, 2015 14:07
docker ps continuously
#!/bin/bash
while [ 2 -gt 1 ]
do
declare -a containerID
# Load file into array.
~/cf-docker/cf-docker/bin/docker -H 172.17.42.1:5555 ps | awk '{print $1}' > abc.txt
let i=0
while IFS=$'\n' read -r line_data; do
@ngtuna
ngtuna / cf-stub-aws.yml
Created October 30, 2014 04:42
cf stub file for aws
---
name: cf-example
director_uuid: 80be9b46-435f-41db-96a4-453f8d59f53c
releases:
- name: cf
version: latest
networks:
- name: cf1
type: manual
@ngtuna
ngtuna / stemcell.log
Created November 12, 2014 10:47
bosh upload stemcell failed: Execution expired
root@ip-10-10-10-62:~/bosh-workspace/stemcells# bosh task 9 --debug
Director task 9
# Logfile created on 2014-11-12 10:31:16 +0000 by logger.rb/44203
I, [2014-11-12T10:31:16.074227 #2818] INFO -- : Director Version : 1.2765.0
I, [2014-11-12T10:31:16.074292 #2818] INFO -- : Enqueuing task: 9
I, [2014-11-12T10:31:17.167180 #8538] [0x3fb19c881318] INFO -- : Looking for task with task id 9
D, [2014-11-12T10:31:17.188066 #8538] [0x3fb19c881318] DEBUG -- : (0.020135s) SELECT * FROM "tasks" WHERE "id" = 9
I, [2014-11-12T10:31:17.192974 #8538] [0x3fb19c881318] INFO -- : Starting task: 9
I, [2014-11-12T10:31:17.193137 #8538] [task:9] INFO -- : Creating job
@ngtuna
ngtuna / cf-mysql-aws-minimal.yml
Last active August 29, 2015 14:10
cf-mysql-aws-minimal (successful)
compilation:
cloud_properties:
availability_zone: ap-southeast-1a
instance_type: c3.large
network: default
reuse_compilation_vms: true
workers: 3
director_uuid: 033f4548-5756-4c79-9071-1bc1adb69ac8
jobs:
- instances: 1
@ngtuna
ngtuna / cf-aws.yml
Created December 4, 2014 16:14
cf-aws.yml [success with CF-194]
compilation:
cloud_properties:
availability_zone: ap-southeast-1a
instance_type: c1.medium
network: default
reuse_compilation_vms: true
workers: 6
director_uuid: 033f4548-5756-4c79-9071-1bc1adb69ac8
jobs:
- instances: 1
@ngtuna
ngtuna / cf-194-admin-ui.yml
Created December 8, 2014 15:38
cf-194-admin-ui.yml
---
meta:
network: default
subdomain: admin
admin_ui_uaa_client:
id: admin_ui_client
secret: admin_ui_secret
name: admin-ui
director_uuid: 033f4548-5756-4c79-9071-1bc1adb69ac8