Monday, October 1, 2012

Cloud Foundry VMC-ng Has Helpful Client Logging

I noticed on the twittersphere that Brian McClain and Mark Lucovsky had a small exchange about the latest tips and tricks for developing Cloud Foundry API clients. Brian has written a Cloud Foundry Chaos Monkey. The important thing to note is the latest cfoundry gem maintained by Alex Suraci on the Cloud Foundry frameworks team has excellent client logging support of Cloud Controller calls. The cfoundry gem is simply a nice ruby wrapper around the Cloud Controller REST API. You can see these calls in action by using the latest pre-release version of vmc (which also is a gem), which we call vmc-ng where the ng is for next generation. The latest vmc builds upon the latest cfoundry gem.

A few things to note about using vmc-ng:
1) You should install it with gem install vmc --pre where the --pre gives you the ng bits. Note that this is preview code and not fully baked yet.
2) vmc-ng functionality is not enabled by default, you need to create a file or directory in your ~/.vmc directory called use-ng. If you do not have this, vmc will fall back to use the standard version without the new client logging capabilities
3) In order to switch back to the old vmc, simple remove the ~/.vmc/use-ng file or directory.
4) The syntax of some of the commands has changed, so make liberal use of the help. One of my favorites is the updated line view of applications vmc apps -l and you can see an example of that below. Another great switch is -t that turns on tracing and shows all of the HTTP request/response in standard out.
5) When using vmc-ng, the Cloud Controller HTTP calls are logged in the ~/.vmc/logs/api.cloudfoundry.com.log file, where api.cloudfoundry.com is the target.

Check out the gist for a full example using vmc-ng and illustrating the new client logging feature.


33 comments:

jambay said...

Mark also provided a tweet snippet that shows how to use cfoundry with this feature without vmc:
cfclient = CFoundry::Client.new(target) cfclient.log = [] ... # later txlog = cfclient.log.map do |x| ... end

https://twitter.com/marklucovsky/status/253000106591264769

Dr Nic said...

I don't see anything in latest vmc/ng about "~/.vmc/use-ng" to activate it. What is the latest method for activiting v2 features?

Dr Nic said...

I think I've successfully switched to v2, by changing :version in ~/.vmc/tokens.yml for http://api.cloudfoundry.com.

Dr Nic said...

No, I don't think that's right. Now getting errors in most CLI commands.

Is there a different API hostname for v2?

jambay said...

Dr Nic, if the ~/.vmc/use-ng file is there, then you will be using vmc-ng which you can see by the "vmc -v" output. If you remove the ~/.vmc/use-ng then vmc will revert to classic vmc. vmc-ng determines which cloud controller features to use by looking at the output of the cloud controller /info endpoint. For example, api.cloudfoundry.com/info will show that it is a v1 cloud controller as of this comment. When using cc-ng on the server side, the /info endpoint returns information that it supports additional features.

Ruchir Rathore said...

Hi guys,

SpringOne India 2012 is here. Be part of one of the year's premier Java events happening in Bangalore & Hyderabad on 11th and 13th December 2012 respectively.
For more details about the event visit: bit.ly/Ungkqd
SpringOne 2012 is a one-of-a-kind conference for application developers, solution architects, web operations and IT teams who develop business applications, create multi-device aware web applications, design cloud architectures, and manage high performance infrastructure.

InnomaxMediaLLP said...

The information and the detail were just perfect. I think that your perspective is deep, its just well thought out and really fantastic.
Web developer Singapore

jos ken said...

The information about tehse will work for will be great.
Twin Cities Web Design

jos ken said...

Northfield Web Design where it can help with some basic ideas about these solutions.

Robert Richard said...

Professional Plumbing Services Brisbane In order to provide the best plumbing solutions, Reynolds Plumbing, a trusted plumbing company is now offering professional plumbing services in Brisbane. The company is licensed and expertise in handling various kind of plumbing systems. Their team of professionals strive hard to provide quality services to their customers using latest technologies.

Love KidsTV said...

Truyen ngon tinh hay la the loai truyen tinh cam
Truyen teen hay la nhung truyen tinh yeu tuoi teen
Don doc tai trang doc truyen online.

Kiwi Kiwi said...

head soccer unblocked
head soccer
head soccer 2
soccer heads
Big Head Soccer
Big Head Football
big head basketball

Haxie 100 said...

Happy NEW YEAR 2017 Wishes
Happy NEW YEAR 2017 Images HD
Happy NEW YEAR 2017 SMS

Peter said...

Valentines Week

Happy Valentines Day 2017 said...

OMG OMG OMG!!
Your Post Is Very Informative
Thanks For Sharing
Visit Our Sites Also


Wishesquotescards.com
Valentine's Day Love Messages
Valentine's Day Wishes For Husband
Valentine's Day Wishes For Boyfriend
Valentines Day ECards Download
Valentine's Day Romantic Images
Download Valentine's Day HD Images
Valentine's Day 2017 Quotes
Happy Holi Status
Valentine's Day Romantic Images

Happy Valentines Day 2017 said...

OMG OMG OMG!!
Your Post Is Very Informative
Thanks For Sharing
Visit Our Sites Also


Wishesquotescards.com
Valentine's Day Love Messages
Valentine's Day Wishes For Husband
Valentine's Day Wishes For Boyfriend
Valentines Day ECards Download
Valentine's Day Romantic Images
Download Valentine's Day HD Images
Valentine's Day 2017 Quotes
Happy Holi Status
Valentine's Day Romantic Images

The Admin said...

Very nice post. Thanks for sharing.
Downtown Lyrics Guru Randhawa
ALT Balaji Shows
Karrle Tu Bhi Mohabbat Season 1 All Episodes
XXX Uncensored ALT Balaji
Bollywood Songs Lyrics
Gandii Baat Episode 1
Gandii Baat Episode 2

The Admin said...

Nice One
Simple Mehndi Design
Face Mask
Hair Career Tips
Nail Career Tips
Dulhan Makeup
Orange Face Mask

Unknown said...

now present in your city cara menggugurkan kandungan
1. manfaat kurma untuk persalinan
2. manfaat buah nanas
3. aktivitas penyebab keguguran
4. apakah usg berbahaya
5. penyebab telat haid

MANI said...

I am sure you see the trend here... Commercial Mortgage Financing can be used in practically any industry for any kind of commercial property. Speak with your Business Finance Broker when you are ready to invest in a Commercial Real estate opportunity. finance types

MANI said...

Make use of a travel agent that provides travel deals for handicapped travelers. Booking plane tickets and rooms in hotels with journey agents that provide travel methods to disabled individuals is advantageous in many ways. They make sure they book for his or her disabled customers airlines as well as hotels which are disabled pleasant. They make an effort to offer providers and suggestions which will ensure their own clients journey comfortably. best adventure travel

MANI said...

One of the biggest competitions of today is staying fit. It seems like people nowadays want to lose weight instantly as if there is no tomorrow or it is as if it is a passport for the general population. Losing weight and staying fit is never easy. health and workout plan

MANI said...

The laws of nature are just as they treat every specie (and not only man) with equality. In a jungle, every specie gets its due share of food, air and water which enable them to live a dignified life without being dependent on any other creation. Nature makes no distinction between one specie, and the other as all species are the children of the same God. law information

MANI said...

I am certain you begin to see the trend right here... Commercial Home loan Financing may be used in virtually any business for any type of commercial home. Speak together with your Business Finance Broker when you're ready to purchase a Commercial Property opportunity. my business plan

MANI said...

You will see all styles and models of fashion blogs as being the internet is stuffed with them. It can take a look at the advantages of wearing lean jeans through boyfriend bluejeans or the best way pink takes the destination of dark colored plus many of the extras. Just like you go internet, you receives your fill of your latest popular trends as a result of fashion blogs. styles beauty tips

MANI said...

Real estate shareholders live in addition to die by means of their chance to add importance. With not any added importance, there usually are no gains. This applies with almost any business, but what makes real estate a really great business as well as a great investment decision, is the volume of ways you can contribute value and benefit from big gains. realestate valley

MANI said...

Health fitness tips also recommend that vices should be stopped. Smoking predisposes one to vascular conditions such as arteriosclerosis and heart diseases. Alcohol consumption need not be eliminated but should be limited to 30 jiggers a day only. Alcohol still has health benefits such as vasodilation. These are just some of what Health fitness tips recommend healthyactivities

MANI said...

Insurance can be synonymous to a lot people expressing risks involving losses expected coming from a supposed car accident. Here, the price of your losses are going to be borne by the many insurers. insurance guider

MANI said...

Discomfort heard this argument intended for spending far more now with quality just to save money in the future. But why not consider the impression your purchase has on the earth, shouldn't shopping ethically participate in the talk too? services expert

MANI said...

Health fitness ideas also suggest that vices ought to be stopped. Smoking predisposes someone to vascular conditions for example arteriosclerosis as well as heart illnesses. Alcohol consumption do not need to be removed but ought to be limited in order to 30 jiggers each day only. Alcohol nevertheless has many benefits such because vasodilation. These are are just some of what Health fitness ideas recommend health improve

MANI said...

Traveling, for individuals with disabilities, is extremely hectic, particularly when they get to the airport terminal. They face the process of obtaining proper info and instructions. This is actually further aggravated through the huge number of individuals traveling as well as long lists. In international airports, there tend to be attendants which are supposed for carrying on the needs of these travelling along with disabilities. safe travel guide

MANI said...

I know you start to see the trend the following... Commercial Mortgage loan Financing can be utilized in almost any market for almost any commercial house. Speak along with your Business Finance Broker if you are ready to buy a Commercial Real-estate opportunity. financial grow

MANI said...

You will find all forms and shapes of fashion blogs as the internet is full of them. It can talk about the main benefit of wearing lanky jeans over boyfriend jeans or how pink takes the place of black plus all the extras. As you go online, you will get your fill of the latest in fashion trends via fashion blogs. news village