Skip to content

Commit

Permalink
Merge pull request #66 from jgeewax/storage-tutorial
Browse files Browse the repository at this point in the history
Fixed #37 - Added getting started tutorial for gcloud.storage.
  • Loading branch information
jgeewax committed Mar 31, 2014
2 parents 6ebf806 + 8a89841 commit 4b56a23
Show file tree
Hide file tree
Showing 6 changed files with 348 additions and 93 deletions.
27 changes: 27 additions & 0 deletions docs/_components/creating-a-project.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
* **Create a project**

Start off by visiting https://cloud.google.com/console
and click on the big red button
that says "Create Project".

* **Choose a name**

In the box that says "name",
choose something friendly.
This is going to be the *human-readable* name
for your project.

* **Choose an ID**

In the box that says "ID",
choose something unique
(hyphens are OK).
I typically choose a project name
that starts with my initials,
then a hyphen,
then a unique identifier for the work I'm doing.
For this example,
you might choose ``<initials>-quickstart``.

Then click OK
(give it a second to create your project).
41 changes: 41 additions & 0 deletions docs/_components/enabling-a-service-account.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
Now that you have a project,
we need to make sure we are able to access our data.
There are many ways to authenticate,
but we're going to use a Service Account for today.

A *Service Account* is sort of like a username and password
(like when you're connecting to your MySQL database),
except the username is automatically generated
(and is an e-mail address)
and the password is actually a private key file.

To create a Service Account:

* **Click on Credentials**
under the "APIs & Auth" section.

* **Click the big red button**
that says "Create New Client ID"
under the OAuth section
(the first one).

* **Choose "Service Account"**
and click the blue button
that says "Create Client ID".

* **This will automatically**
download a private key file.
**Do not lose this.**

* **Rename your key** something shorter.
I like to name the key ``<project name>.p12``.

This is like your password for the account.

* **Copy the long weird e-mail address**
labeled "E-mail address"
in the information section
for the Service Account
you just created.

This is like your username for the account.
82 changes: 6 additions & 76 deletions docs/datastore-getting-started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,39 +8,13 @@ Getting started with Cloud Datastore
Creating a project
------------------

* **Create a project**
.. include:: _components/creating-a-project.rst

Start off by visiting https://cloud.google.com/console
and click on the big red button
that says "Create Project".

* **Choose a name**

In the box that says "name",
choose something friendly.
This is going to be the *human-readable* name
for your project.

* **Choose an ID**

In the box that says "ID",
choose something unique
(hyphens are OK).
I typically choose a project name
that starts with my initials,
then a hyphen,
then a unique identifier for the work I'm doing.
For this example,
you might choose ``<initials>-quickstart``.

Then click OK
(give it a second to create your project).

Enable the Cloud Datastore API
------------------------------
Enabling the API
----------------

Now that you created a project,
you need to *turn on* the Cloud Datastore API.
you need to **turn on** the Cloud Datastore API.
This is sort of like telling Google
which services you intend to use for this project.

Expand All @@ -53,54 +27,10 @@ which services you intend to use for this project.
on the right side
to turn it into an "On" button.

Enable a "Service Account"
Enabling a service account
--------------------------

Now that you have a project
that has access to the Cloud Datastore API,
we need to make sure we are able to access our data.
There are many ways to authenticate,
but we're going to use a Service Account for today.

A *Service Account* is sort of like a username and password
(like when you're connecting to your MySQL database),
except the username is automatically generated
(and is an e-mail address)
and the password is actually a private key file.

To create a Service Account:

* **Click on Credentials**
under the "APIs & Auth" section.

* **Click the big red button**
that says "Create New Client ID"
under the OAuth section
(the first one).

* **Choose "Service Account"**
and click the blue button
that says "Create Client ID".

* **This will automatically**
download a private key file.
**Do not lost this.**

* **Rename your key** something shorter.
I like to name the key ``<project name>.key``.

This is like your password for the account.

* **Copy the long weird e-mail address**
labeled "E-mail address"
in the information section
for the Service Account
you just created.

This is like your username for the account.

OK. That's it!
Time to start doing things with your Cloud Datastore project.
.. include:: _components/enabling-a-service-account.rst

Add some data to your dataset
-----------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ Services

- Google's `official documentation <https://developers.google.com/storage/>`_
- :doc:`storage-quickstart`
- `Getting started with Cloud Storage <https://github.com/GoogleCloudPlatform/gcloud-python/issues/37>`_
- :doc:`Getting started with Cloud Storage <storage-getting-started>`
- :doc:`Cloud Storage API Documentation <storage-api>`

.. topic:: Compute Engine
Expand Down
Loading

0 comments on commit 4b56a23

Please sign in to comment.