bf51655a7b
Signed-off-by: Jacek J. Łakis <jacek.lakis@intel.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com> |
||
---|---|---|
.. | ||
main.go | ||
README.md |
Cloud Bigtable Hello World in Go
This is a simple application that demonstrates using the Google Cloud APIs Go Client Library to connect to and interact with Cloud Bigtable.
Prerequisites
- Set up Cloud Console.
- Go to the Cloud Console and create or select your project. You will need the project ID later.
- Go to Settings > Project Billing Settings and enable billing.
- Select APIs & Auth > APIs.
- Enable the Cloud Bigtable API and the Cloud Bigtable Admin API. (You may need to search for the API).
- Set up gcloud.
gcloud components update
gcloud auth login
gcloud config set project PROJECT_ID
- Provision a Cloud Bigtable instance
- Follow the instructions in the user documentation to create a Google Cloud Platform project and Cloud Bigtable instance if necessary.
- You'll need to reference your project id and instance id to run the application.
Running
- From the hello_world example folder,
go run main.go -project PROJECT_ID -instance INSTANCE_ID
, substituting your project id and instance id.
Cleaning up
To avoid incurring extra charges to your Google Cloud Platform account, remove the resources created for this sample.
-
Go to the Clusters page in the Cloud Console.
-
Click the cluster name.
-
Click Delete.
-
Type the cluster ID, then click Delete to delete the cluster.