GitHub PullRequestReviewCommentEvent at 2014-05-15 13:58:07
Repository: jclouds-site
Actor: mikolajz
Payload: {"comment":{"url":"https://api.github.com/repos/jclouds/jclouds-site/pulls/comments/12690136","id":12690136,"diff_hunk":"@@ -0,0 +1,40 @@\n+---\n+layout: page\n+title: \"Google Cloud Platform: Getting Started Guide\"\n+permalink: /guides/google/\n+---\n+\n+1. [Introduction](#intro)\n+2. [Authentification](#auth)\n+2. [Running examples](#examples)\n+\n+\n+## <a id=\"intro\"></a>Introduction\n+This guide helps you to get started with [Google Cloud Platform](https://cloud.google.com/) development using jclouds.\n+\n+Currently, [Google Compute Engine](https://developers.google.com/compute/) is covered. This is a service that allows you to run vitual machines on Google's infrastructure.\n+\n+This guide assumes you have a Google Cloud project. If not yet, you can sign up on the [Developer Console](https://console.developers.google.com/). For GCE, you need to set up billing.\n+\n+## <a id=\"auth\"></a>Authentification\n+Google Cloud Platform uses OAuth which gives a variety of choices how to authentificate:\n+  * One can ask a user for consent to perform operations in his/her name.\n+  * One can create a service account and use its private key to authentificate.\n+  * Unless configured otherwise, programs running on a GCE instance can perform operations as the project's default service account ([documentation](https://developers.google.com/compute/docs/authentication)).\n+\n+You can find all the details in [the documentation](https://developers.google.com/accounts/docs/OAuth2), while in these examples we will focus only on service accounts (bullet 2).\n+\n+To create a new service account:\n+  * Go to the [Developer Console](https://console.developers.google.com/).\n+  * Choose API & auth > Credentials.\n+  * Click \"Create new Client ID\".\n+  * Select \"Service account\" and click \"Create service ID\".\n+  * Data about the new service account will be visilble in the console and a private key will be downloaded. Notice that the data includes service account email address - you will need it to use the account.\n+  * To keep the examples simple, we use private keys without passwords. It might be something you will not do in a production environment, but for the examples run: `openssl pkcs12 -in {downloaded_file}.p12 -nodes -out gcp-example.pem  -passin pass:notasecret`.\n+\n+## <a id=\"examples\"></a>Running examples\n+A good starting point is to run examples programs. For this, download the [jclouds-example](https://github.com/jclouds/jclouds-examples) repository and build the \"google\" Maven project. Each example can be run by passing the service account email as the first parameter and the path to the gcp-example.pem file (created by removing the password from the *.p12 file by the command above) as the second.","path":"guides/google.md","position":null,"original_position":36,"commit_id":"7548b7498befec44a9126eedc064de9891289fea","original_commit_id":"35a34a24cc2cbdeff698686ef3f1eee93c8b6cb5","user":{"login":"mikolajz","id":7243186,"avatar_url":"https://avatars.githubusercontent.com/u/7243186?","gravatar_id":"270d4d800597a62129a03ba15066967f","url":"https://api.github.com/users/mikolajz","html_url":"https://github.com/mikolajz","followers_url":"https://api.github.com/users/mikolajz/followers","following_url":"https://api.github.com/users/mikolajz/following{/other_user}","gists_url":"https://api.github.com/users/mikolajz/gists{/gist_id}","starred_url":"https://api.github.com/users/mikolajz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikolajz/subscriptions","organizations_url":"https://api.github.com/users/mikolajz/orgs","repos_url":"https://api.github.com/users/mikolajz/repos","events_url":"https://api.github.com/users/mikolajz/events{/privacy}","received_events_url":"https://api.github.com/users/mikolajz/received_events","type":"User","site_admin":false},"body":"Done.\r\n\r\n\r\nOn Tue, May 13, 2014 at 12:32 AM, Andrew Phillips\r\n<notifications@github.com>wrote:\r\n\r\n> In guides/google.md:\r\n>\r\n> > +  * One can ask a user for consent to perform operations in his/her name.\r\n> > +  * One can create a service account and use its private key to authentificate.\r\n> > +  * Unless configured otherwise, programs running on a GCE instance can perform operations as the project's default service account ([documentation](https://developers.google.com/compute/docs/authentication)).\r\n> > +\r\n> > +You can find all the details in [the documentation](https://developers.google.com/accounts/docs/OAuth2), while in these examples we will focus only on service accounts (bullet 2).\r\n> > +\r\n> > +To create a new service account:\r\n> > +  * Go to the [Developer Console](https://console.developers.google.com/\r\n> ).\r\n> > +  * Choose API & auth > Credentials.\r\n> > +  * Click \"Create new Client ID\".\r\n> > +  * Select \"Service account\" and click \"Create service ID\".\r\n> > +  * Data about the new service account will be visilble in the console and a private key will be downloaded. Notice that the data includes service account email address - you will need it to use the account.\r\n> > +  * To keep the examples simple, we use private keys without passwords. It might be something you will not do in a production environment, but for the examples run: `openssl pkcs12 -in {downloaded_file}.p12 -nodes -out gcp-example.pem  -passin pass:notasecret`.\r\n> > +\r\n> > +## <a id=\"examples\"></a>Running examples\r\n> > +A good starting point is to run examples programs. For this, download the [jclouds-example](https://github.com/jclouds/jclouds-examples) repository and build the \"google\" Maven project. Each example can be run by passing the service account email as the first parameter and the path to the gcp-example.pem file (created by removing the password from the *.p12 file by the command above) as the second.\r\n>\r\n> \"starting point\" for what? Something like \"A good starting point for using\r\n> GCE via jclouds is to run through a couple of examples\"?\r\n>\r\n> —\r\n> Reply to this email directly or view it on GitHub<https://github.com/jclouds/jclouds-site/pull/98/files#r12557685>\r\n> .\r\n>","created_at":"2014-05-15T13:58:07Z","updated_at":"2014-05-15T13:58:07Z","html_url":"https://github.com/jclouds/jclouds-site/pull/98#discussion_r12690136","pull_request_url":"https://api.github.com/repos/jclouds/jclouds-site/pulls/98","_links":{"self":{"href":"https://api.github.com/repos/jclouds/jclouds-site/pulls/comments/12690136"},"html":{"href":"https://github.com/jclouds/jclouds-site/pull/98#discussion_r12690136"},"pull_request":{"href":"https://api.github.com/repos/jclouds/jclouds-site/pulls/98"}}}}