Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Example of VMC-ng with client logging for Cloud Controller calls
jbayer-mbpro:logs jbayer$ gem install vmc --pre
Fetching: cfoundry-0.3.37.gem (100%)
Fetching: vmc-0.4.0.beta.59.gem (100%)
Successfully installed cfoundry-0.3.37
Successfully installed vmc-0.4.0.beta.59
2 gems installed
Installing ri documentation for cfoundry-0.3.37...
Installing ri documentation for vmc-0.4.0.beta.59...
Installing RDoc documentation for cfoundry-0.3.37...
Installing RDoc documentation for vmc-0.4.0.beta.59...
jbayer-mbpro:logs jbayer$ vmc -v
vmc 0.3.21
jbayer-mbpro:logs jbayer$ touch ~/.vmc/use-ng
jbayer-mbpro:logs jbayer$ vmc -v
vmc 0.4.0.beta.59
jbayer-mbpro:logs jbayer$ vmc target api.cloudfoundry.com
Setting target to https://api.cloudfoundry.com... OK
jbayer-mbpro:logs jbayer$ vmc login jbayer@vmware.com
target: https://api.cloudfoundry.com
Password> ********
Authenticating... OK
jbayer-mbpro:logs jbayer$ vmc info
VMware's Cloud Application Platform
target: https://api.cloudfoundry.com
version: 0.999
support: http://support.cloudfoundry.com
user: jbayer@vmware.com
jbayer-mbpro:logs jbayer$ vmc apps
Getting applications... OK
activiti-explorer: stopped
platform: spring on java
usage: 512M × 1 instance
urls: activiti-explorer.cloudfoundry.com
services: activitidb
caldecott: running
platform: sinatra on ruby18
usage: 64M × 1 instance
urls: caldecott-7f4cf.cloudfoundry.com
services: foomysql
jbayer-env: stopped
platform: spring on java
usage: 256M × 1 instance
urls: jbayer-env.cloudfoundry.com
services: activitidb
plain-java: stopped
platform: standalone on java
usage: 512M × 1 instance
samples-slow-web: stopped
platform: standalone on java
usage: 256M × 1 instance
urls: samples-slow-web.cloudfoundry.com
some_application: running
platform: java_web on java
usage: 256M × 1 instance
urls: some_application.cloudfoundry.com
jbayer-mbpro:logs jbayer$ vmc apps -l
Getting applications... OK
name status usage runtime url
activiti-explorer stopped 1 x 512M java activiti-explorer.cloudfoundry.com
caldecott running 1 x 64M ruby18 caldecott-7f4cf.cloudfoundry.com
jbayer-env stopped 1 x 256M java jbayer-env.cloudfoundry.com
plain-java stopped 1 x 512M java none
samples-slow-web stopped 1 x 256M java samples-slow-web.cloudfoundry.com
some_application running 1 x 256M java some_application.cloudfoundry.com
jbayer-mbpro:logs jbayer$ vmc services
Getting services... OK
activitidb: mysql 5.1
foo: mongodb 1.8
foomysql: mysql 5.1
jbayer-mbpro:logs jbayer$ vmc info --services
Getting services... OK
services:
postgresql:
description: PostgreSQL database service (vFabric)
version: 9.0
provider: core
mysql:
description: MySQL database service
version: 5.1
provider: core
rabbitmq:
description: RabbitMQ message queue
version: 2.4
provider: core
mongodb:
description: MongoDB NoSQL store
version: 2.0
provider: core
redis:
description: Redis key-value store service
version: 2.2
provider: core
jbayer-mbpro:logs jbayer$ pwd
/Users/jbayer/.vmc/logs
jbayer-mbpro:logs jbayer$ ls -l
total 8
-rw-r--r-- 1 jbayer 1996762905 733 Oct 1 21:30 api.cloudfoundry.com.log
jbayer-mbpro:logs jbayer$ cat api.cloudfoundry.com.log
[2012-10-01 21:29:42] 0.324s GET -> 200 https://api.cloudfoundry.com/info
[2012-10-01 21:29:54] 0.570s GET -> 200 https://api.cloudfoundry.com/info
[2012-10-01 21:30:10] 0.349s GET -> 200 https://api.cloudfoundry.com/info
[2012-10-01 21:30:11] 0.299s GET -> 200 https://api.cloudfoundry.com/info
[2012-10-01 21:30:17] 0.425s GET -> 200 https://api.cloudfoundry.com/apps
[2012-10-01 21:30:24] 0.438s GET -> 200 https://api.cloudfoundry.com/apps
[2012-10-01 21:30:31] 0.595s GET -> 200 https://api.cloudfoundry.com/services
[2012-10-01 21:30:44] 1.102s GET -> 200 https://api.cloudfoundry.com/info/services
[2012-10-01 21:30:44] 0.301s GET -> 200 https://api.cloudfoundry.com/info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.