-
Notifications
You must be signed in to change notification settings - Fork 6.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bigtable: Create Instanceadmin sample #1664
Merged
billyjacobson
merged 9 commits into
GoogleCloudPlatform:master
from
sangramql:instanceadmin
Aug 31, 2018
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
797ff71
Python instanceadmin sample
sangramql 2f79a8a
Updated instanceadmin.py
sangramql 74b0905
modify instanceadmin as per comments
sangramql a1e80aa
Update instanceadmin.py as per the local review comments.
sangramql 092d49f
Update instanceadmin
sangramql 64a73a6
update instanceadmin, to fix ci failures.
sangramql 79b10ec
update instanceadmin
sangramql 5738e12
update instanceadmin
sangramql bc4f895
Implement review comments
sangramql File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,119 @@ | ||
.. This file is automatically generated. Do not edit this file directly. | ||
|
||
|
||
Google Cloud Bigtable table creation | ||
=============================================================================== | ||
|
||
https://cloud.google.com/bigtable/docs/quickstart-cbt | ||
|
||
This page explains how to use the cbt command to connect to a Cloud Bigtable instance, perform basic administrative tasks, and read and write data in a table. | ||
|
||
Google Cloud Bigtable Python Samples | ||
=============================================================================== | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/hello/README.rst | ||
|
||
|
||
This directory contains samples for Google Cloud Bigtable. `Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's the same database that powers many core Google services, including Search, Analytics, Maps, and Gmail. | ||
|
||
|
||
|
||
|
||
.. _Google Cloud Bigtable: https://cloud.google.com/bigtable/docs | ||
|
||
Setup | ||
------------------------------------------------------------------------------- | ||
|
||
|
||
Authentication | ||
++++++++++++++ | ||
|
||
This sample requires you to have authentication setup. Refer to the | ||
`Authentication Getting Started Guide`_ for instructions on setting up | ||
credentials for applications. | ||
|
||
.. _Authentication Getting Started Guide: | ||
https://cloud.google.com/docs/authentication/getting-started | ||
|
||
Install Dependencies | ||
++++++++++++++++++++ | ||
|
||
#. Clone python-docs-samples and change directory to the sample directory you want to use. | ||
|
||
.. code-block:: bash | ||
|
||
$ git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git | ||
|
||
#. Install `pip`_ and `virtualenv`_ if you do not already have them. You may want to refer to the `Python Development Environment Setup Guide`_ for Google Cloud Platform for instructions. | ||
|
||
.. _Python Development Environment Setup Guide: | ||
https://cloud.google.com/python/setup | ||
|
||
#. Create a virtualenv. Samples are compatible with Python 2.7 and 3.4+. | ||
|
||
.. code-block:: bash | ||
|
||
$ virtualenv env | ||
$ source env/bin/activate | ||
|
||
#. Install the dependencies needed to run the samples. | ||
|
||
.. code-block:: bash | ||
|
||
$ pip install -r requirements.txt | ||
|
||
.. _pip: https://pip.pypa.io/ | ||
.. _virtualenv: https://virtualenv.pypa.io/ | ||
|
||
Samples | ||
------------------------------------------------------------------------------- | ||
|
||
Basic example | ||
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ | ||
|
||
.. image:: https://gstatic.com/cloudssh/images/open-btn.png | ||
:target: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/GoogleCloudPlatform/python-docs-samples&page=editor&open_in_editor=bigtable/instanceadmin.py,bigtable/instanceadmin/README.rst | ||
|
||
|
||
|
||
|
||
To run this sample: | ||
|
||
.. code-block:: bash | ||
|
||
$ python instanceadmin.py | ||
|
||
usage: instanceadmin.py [-h] [run] [dev-instance] [del-instance] [add-cluster] [del-cluster] project_id instance_id cluster_id | ||
|
||
Demonstrates how to connect to Cloud Bigtable and get . | ||
Prerequisites: - Create a Cloud Bigtable cluster. | ||
https://cloud.google.com/bigtable/docs/creating-cluster - Set your Google | ||
Application Default Credentials. | ||
https://developers.google.com/identity/protocols/application-default- | ||
credentials | ||
|
||
positional arguments: | ||
project_id Your Cloud Platform project ID. | ||
instance_id ID of the Cloud Bigtable instance to connect to. | ||
cluster_id ID of the Cloud Bigtable cluster to connect to. | ||
|
||
optional arguments: | ||
-h, --help show this help message and exit | ||
|
||
The client library | ||
------------------------------------------------------------------------------- | ||
|
||
This sample uses the `Google Cloud Client Library for Python`_. | ||
You can read the documentation for more details on API usage and use GitHub | ||
to `browse the source`_ and `report issues`_. | ||
|
||
.. _Google Cloud Client Library for Python: | ||
https://googlecloudplatform.github.io/google-cloud-python/ | ||
.. _browse the source: | ||
https://github.com/GoogleCloudPlatform/google-cloud-python | ||
.. _report issues: | ||
https://github.com/GoogleCloudPlatform/google-cloud-python/issues | ||
|
||
|
||
.. _Google Cloud SDK: https://cloud.google.com/sdk/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This file is used to generate README.rst | ||
|
||
product: | ||
name: Google Cloud Bigtable and run some basic operations. | ||
short_name: Cloud Bigtable | ||
url: https://cloud.google.com/bigtable/docs | ||
description: > | ||
`Google Cloud Bigtable`_ is Google's NoSQL Big Data database service. It's | ||
the same database that powers many core Google services, including Search, | ||
Analytics, Maps, and Gmail. | ||
|
||
setup: | ||
- auth | ||
- install_deps | ||
|
||
samples: | ||
- name: Basic example with Bigtable Column family and GC rules. | ||
file: instanceadmin.py | ||
show_help: true | ||
|
||
cloud_client_library: true | ||
|
||
folder: bigtable/instanceadmin |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line cuts off mid sentence. Not really sure what happened. Maybe try regenerating it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.