Skip to content

Commit

Permalink
doc: update quickstart README files (googleapis#4980)
Browse files Browse the repository at this point in the history
Apply some of the lessons from the latest review of the Pub/Sub
quickstart README to the other libraries.
  • Loading branch information
coryan authored Aug 28, 2020
1 parent 95c6a98 commit d5063ca
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 14 deletions.
28 changes: 22 additions & 6 deletions google/cloud/bigtable/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ C++ client library in your own project. These instructions assume that you have
some experience as a C++ developer and that you have a working C++ toolchain
(compiler, linker, etc.) installed on your platform.

## Before you begin

To run the quickstart examples you will need a working Google Cloud Platform
(GCP) project, as well as a Cloud Bigtable instance and table.
The [Cloud Bigtable quickstart][bigtable-quickstart] covers the necessary
steps in detail. Make a note of the GCP project id, the instance id, and the
table id as you will need them below.

## Configuring authentication for the C++ Client Library

Like most Google Cloud Platform (GCP) services, Cloud Bigtable requires that
Expand Down Expand Up @@ -33,6 +41,9 @@ https://cloud.google.com/docs/authentication/production

## Using with Bazel

> :warning: If you are using Windows or macOS there are additional instructions
> at the end of this document.
1. Install Bazel using [the instructions][bazel-install] from the `bazel.build`
website.

Expand All @@ -43,17 +54,21 @@ https://cloud.google.com/docs/authentication/production
bazel build ...
```

Note that Bazel automatically downloads and compiles all dependencies of the
project. As it is often the case with C++ libraries, compiling these
dependencies may take several minutes.

3. Run the example, change the place holder to appropriate values:

```bash
bazel run :quickstart -- [GCP PROJECT] [CLOUD BIGTABLE INSTANCE] [CLOUD BIGTABLE TABLE]
```

If you are using Windows or macOS there are additional instructions at the end
of this document.

## Using with CMake

> :warning: If you are using Windows or macOS there are additional instructions
> at the end of this document.
1. Install CMake. The package managers for most Linux distributions include a
package for CMake. Likewise, you can install CMake on Windows using a package
manager such as [chocolatey][choco-cmake-link], and on macOS using
Expand All @@ -68,6 +83,9 @@ of this document.
./vcpkg install google-cloud-cpp
```

Note that, as it is often the case with C++ libraries, compiling these
dependencies may take several minutes.

3. Configure CMake, if necessary, configure the directory where you installed
the dependencies:

Expand All @@ -83,9 +101,6 @@ of this document.
.build/quickstart [GCP PROJECT] [CLOUD BIGTABLE INSTANCE] [CLOUD BIGTABLE TABLE]
```

If you are using Windows or macOS there are additional instructions at the end
of this document.

## Platform Specific Notes

### macOS
Expand Down Expand Up @@ -132,3 +147,4 @@ set GRPC_DEFAULT_SSL_ROOTS_FILE_PATH=%cd%\roots.pem
[cmake-download-link]: https://cmake.org/download/
[bazel-grpc-macos-bug]: https://github.com/bazelbuild/bazel/issues/4341
[authentication-quickstart]: https://cloud.google.com/docs/authentication/getting-started 'Authentication Getting Started'
[bigtable-quickstart]: https://cloud.google.com/bigtable/docs/quickstart-cbt
29 changes: 22 additions & 7 deletions google/cloud/spanner/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ client library in your own project. These instructions assume that you have
some experience as a C++ developer and that you have a working C++ toolchain
(compiler, linker, etc.) installed on your platform.

## Before you begin

To run the quickstart examples you will need a working Google Cloud Platform
(GCP) project, as well as a Cloud Spanner instance and database.
The [Cloud Spanner quickstart][spanner-quickstart-link] covers the necessary
steps in detail. Make a note of the GCP project id, the instance id, and the
database id as you will need them below.

## Configuring authentication for the C++ Client Library

Like most Google Cloud Platform (GCP) services, Cloud Spanner requires that
Expand All @@ -31,6 +39,9 @@ https://cloud.google.com/docs/authentication/production

## Using with Bazel

> :warning: If you are using Windows or macOS there are additional instructions
> at the end of this document.
1. Install Bazel using [the instructions][bazel-install] from the `bazel.build`
website.

Expand All @@ -41,22 +52,26 @@ https://cloud.google.com/docs/authentication/production
bazel build ...
```

Note that Bazel automatically downloads and compiles all dependencies of the
project. As it is often the case with C++ libraries, compiling these
dependencies may take several minutes.

3. Run the example, change the place holder to appropriate values:

```bash
bazel run :quickstart -- [GCP PROJECT] [CLOUD SPANNER INSTANCE] [CLOUD SPANNER DATABASE]
```

If you are using Windows or macOS there are additional instructions at the end
of this document.

## Using with CMake

> :warning: If you are using Windows or macOS there are additional instructions
> at the end of this document.
1. Install CMake. The package managers for most Linux distributions include a
package for CMake. Likewise, you can install CMake on Windows using a package
manager such as [chocolatey][choco-cmake-link], and on macOS using
[homebrew][homebrew-cmake-link]. You can also obtain the software directly
from the [cmake.org][https://cmake.org/download/].
from the [cmake.org](https://cmake.org/download/).

2. Install the dependencies with your favorite tools. As an example, if you use
[vcpkg](https://github.com/Microsoft/vcpkg.git):
Expand All @@ -66,6 +81,9 @@ of this document.
./vcpkg install google-cloud-cpp
```

Note that, as it is often the case with C++ libraries, compiling these
dependencies may take several minutes.

3. Configure CMake, if necessary, configure the directory where you installed
the dependencies:

Expand All @@ -81,9 +99,6 @@ of this document.
.build/quickstart [GCP PROJECT] [CLOUD SPANNER INSTANCE] [CLOUD SPANNER DATABASE]
```

If you are using Windows or macOS there are additional instructions at the end
of this document.

## Platform Specific Notes

### macOS
Expand Down
17 changes: 16 additions & 1 deletion google/cloud/storage/quickstart/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@ library in your own project. These instructions assume that you have some
experience as a C++ developer and that you have a working C++ toolchain
(compiler, linker, etc.) installed on your platform.

## Before you begin

To run the quickstart examples you will need a working Google Cloud Platform
(GCP) project and an existing bucket.
The [GCS quickstarts](https://cloud.google.com/storage/docs/quickstarts) cover
the necessary steps in detail. Make a note of the GCP project id and the bucket
name as you will need them below.

## Configuring authentication for the C++ Client Library

Like most Google Cloud Platform (GCP) services, GCS requires that
Like most Google Cloud Platform services, GCS requires that
your application authenticates with the service before accessing any data. If
you are not familiar with GCP authentication please take this opportunity to
review the [Authentication Overview][authentication-quickstart]. This library
Expand Down Expand Up @@ -41,6 +49,10 @@ https://cloud.google.com/docs/authentication/production
bazel build ...
```

Note that Bazel automatically downloads and compiles all dependencies of the
project. As it is often the case with C++ libraries, compiling these
dependencies may take several minutes.

3. Run the example, change the place holder to appropriate values:

```bash
Expand Down Expand Up @@ -70,6 +82,9 @@ https://cloud.google.com/docs/authentication/production
./vcpkg install google-cloud-cpp
```

Note that, as it is often the case with C++ libraries, compiling these
dependencies may take several minutes.

3. Configure CMake, if necessary, configure the directory where you installed
the dependencies:

Expand Down

0 comments on commit d5063ca

Please sign in to comment.