Skip to content

Commit a8d4d27

Browse files
authored
Additional documentation changes (googleapis#2409)
* Link to documentation URLs for files such as AUTHENTICATION and CONTRIBUTING. * Remove README from the documentation files for gems that are using an OVERVIEW file. * Update Stackdriver gems to have the same documentation files. * Link to local AUTHENTICATION file from code instead of using external URL.
1 parent 4c3103a commit a8d4d27

104 files changed

Lines changed: 1843 additions & 462 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

AUTHENTICATION.md

Lines changed: 48 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,38 @@
11
# Authentication
22

3-
In general, the google-cloud-ruby library uses [Service Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts) credentials to connect to Google Cloud services. When running on Compute Engine the credentials will be discovered automatically. When running on other environments, the Service Account credentials can be specified by providing the path to the [JSON keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for the account (or the JSON itself) in environment variables. Additionally, Cloud SDK credentials can also be discovered automatically, but this is only recommended during development.
4-
5-
General instructions, environment variables, and configuration options are covered in the general [Authentication guide](http://googlecloudplatform.github.io/google-cloud-ruby/#/docs/google-cloud/guides/authentication) for the `google-cloud` umbrella package. Specific instructions and environment variables for each individual service are linked from the README documents listed below for each service.
3+
In general, the google-cloud-ruby library uses [Service
4+
Account](https://cloud.google.com/iam/docs/creating-managing-service-accounts)
5+
credentials to connect to Google Cloud services. When running on Compute Engine
6+
the credentials will be discovered automatically. When running on other
7+
environments, the Service Account credentials can be specified by providing the
8+
path to the [JSON
9+
keyfile](https://cloud.google.com/iam/docs/managing-service-account-keys) for
10+
the account (or the JSON itself) in environment variables. Additionally, Cloud
11+
SDK credentials can also be discovered automatically, but this is only
12+
recommended during development.
13+
14+
General instructions, environment variables, and configuration options are
15+
covered in the general [Authentication
16+
guide](https://googlecloudplatform.github.io/google-cloud-ruby/docs/authentication)
17+
for the `google-cloud` umbrella package. Specific instructions and environment
18+
variables for each individual service are linked from the README documents
19+
listed below for each service.
620

721
## Creating a Service Account
822

9-
Google Cloud requires a **Project ID** and **Service Account Credentials** to connect to the APIs. For detailed instructions on how to create a service account, see the [Authentication guide](docs/google-cloud/v0.12.2/guides/authentication#onyourownserver).
23+
Google Cloud requires a **Project ID** and **Service Account Credentials** to
24+
connect to the APIs. For detailed instructions on how to create a service
25+
account, see the [Authentication
26+
guide](docs/google-cloud/v0.12.2/guides/authentication#onyourownserver).
1027

11-
You will use the **Project ID** and **JSON key file** to connect to most services with google-cloud-ruby.
28+
You will use the **Project ID** and **JSON key file** to connect to most
29+
services with google-cloud-ruby.
1230

1331
## Project and Credential Lookup
1432

15-
The google-cloud-ruby library aims to make authentication as simple as possible, and provides several mechanisms to configure your system without providing **Project ID** and **Service Account Credentials** directly in code.
33+
The google-cloud-ruby library aims to make authentication as simple as possible,
34+
and provides several mechanisms to configure your system without providing
35+
**Project ID** and **Service Account Credentials** directly in code.
1636

1737
**Project ID** is discovered in the following order:
1838

@@ -30,11 +50,21 @@ The google-cloud-ruby library aims to make authentication as simple as possible,
3050

3151
### Google Cloud Platform environments
3252

33-
While running on Google Cloud Platform environments such as Google Compute Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed. The **Project ID** and **Credentials** and are discovered automatically. Code should be written as if already authenticated.
53+
While running on Google Cloud Platform environments such as Google Compute
54+
Engine, Google App Engine and Google Kubernetes Engine, no extra work is needed.
55+
The **Project ID** and **Credentials** and are discovered automatically. Code
56+
should be written as if already authenticated.
3457

3558
### Environment Variables
3659

37-
The **Project ID** and **Credentials JSON** can be placed in environment variables instead of declaring them directly in code. Each service has its own environment variable, allowing for different service accounts to be used for different services. (See the READMEs for the individual service gems for details.) The path to the **Credentials JSON** file can be stored in the environment variable, or the **Credentials JSON** itself can be stored for environments such as Docker containers where writing files is difficult or not encouraged.
60+
The **Project ID** and **Credentials JSON** can be placed in environment
61+
variables instead of declaring them directly in code. Each service has its own
62+
environment variable, allowing for different service accounts to be used for
63+
different services. (See the READMEs for the individual service gems for
64+
details.) The path to the **Credentials JSON** file can be stored in the
65+
environment variable, or the **Credentials JSON** itself can be stored for
66+
environments such as Docker containers where writing files is difficult or not
67+
encouraged.
3868

3969
Here are the environment variables that Datastore checks for project ID:
4070

@@ -50,16 +80,23 @@ Here are the environment variables that Datastore checks for credentials:
5080

5181
### Cloud SDK
5282

53-
This option allows for an easy way to authenticate during development. If credentials are not provided in code or in environment variables, then Cloud SDK credentials are discovered.
83+
This option allows for an easy way to authenticate during development. If
84+
credentials are not provided in code or in environment variables, then Cloud SDK
85+
credentials are discovered.
5486

5587
To configure your system for this, simply:
5688

5789
1. [Download and install the Cloud SDK](https://cloud.google.com/sdk)
5890
2. Authenticate using OAuth 2.0 `$ gcloud auth login`
5991
3. Write code as if already authenticated.
6092

61-
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK should only be used during development.
93+
**NOTE:** This is _not_ recommended for running in production. The Cloud SDK
94+
*should only be used during development.
6295

6396
## Troubleshooting
6497

65-
If you're having trouble authenticating open a [Github Issue](https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/new?title=Authentication+question) to get help. Also consider searching or asking [questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby) on [StackOverflow](http://stackoverflow.com).
98+
If you're having trouble authenticating open a [Github
99+
Issue](https://github.com/GoogleCloudPlatform/google-cloud-ruby/issues/new?title=Authentication+question)
100+
to get help. Also consider searching or asking
101+
[questions](http://stackoverflow.com/questions/tagged/google-cloud-platform+ruby)
102+
on [StackOverflow](http://stackoverflow.com).

0 commit comments

Comments
 (0)