Cloud Usage Cost Accounting with the Google Compute Engine

Posted by Eric Noriega

Apr 21, 2014 5:48:00 PM Analytics, Cloud Enablement

Google has an offering titled the Google Compute Engine, or GCE.  Google has direct support for “projects” in it’s implementation; any runtime instances require that you first create a project to contain them and any associated resources.    This means that this is the primary mechanism for cost reporting and chargeback. Once you enable billing, the usage will be reported based on it’s project.

It begs the question, is this all that we can see?  What about all of the questions that we discussed earlier in this series?  GCE also supports tags and allows you to insert them at the project level.  You also can apply them to individual objects and instances, allowing for a similar slicing and dicing of your accounting data. All of this is accomplished through the Developers Console.  Tags are applied as key:value pairs using --metadata options.  Note that you need to update all the metadata tags at once.  If you decide to remove a tag, you do so by re-applying all of the tags to remain at once.  (Note, GCE also has “tags” used as part of it’s REST API.  Don’t confuse these with the metadata tags.)

Basic metadata tag syntax rules

  1. key:value

  2. Keys must be unique, values may repeat.

  3. Keys and values are both case sensitive.

  4. Key length is 128 characters max; values up to 32768 characters. Total size of all metadata cannot exceed 512KB.

  5. Keys must be composed of the characters 0-9; A-Z upper or lowercase; and characters dash (-) or underscore (_).  Values are more flexible, having no restriction on the characters used.

Metadata tags are used for a number of processes inside of GCE.  I recommend that you use a common prefix for your keys in order to make them easier to locate and to reduce the probability of a collision.  Starting the tag with your company's name or initials should suffice for most.

Posted by Eric Noriega

    
Request a Complimentary Docker Consultation

An Open View

Vizuri Blog

Subscribing to our blog is a great way to stay up to date with the latest information from Vizuri, as well as our strategic partners. We focus on providing a range of content that is practically useful and relevant from both a technical and business perspective.

We promise to respect your privacy.

×