-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of https://github.com/GoogleCloudPlatform/train…
- Loading branch information
Showing
1 changed file
with
8 additions
and
6 deletions.
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 |
---|---|---|
@@ -1,15 +1,17 @@ | ||
To try out the use of a private key JSON: | ||
|
||
(1) Create a GCE instance *without* full access to gcloud. Notice that the creation menu asks for the service account and the defaults to [email protected] | ||
* Create a GCE instance *without* full access to gcloud. Notice that the creation menu asks for the service account and the defaults to [email protected] | ||
* Wait for ~60s for lock on /var/lib/dpkg to get releasedf | ||
* sudo apt-get install -y git python-pip | ||
* git clone https://github.com/GoogleCloudPlatform/training-data-analyst | ||
* cd training-data-analyst/blogs/pandas-pvtkey | ||
* ./install.sh | ||
(2) run query.py or pkg_query.py after setting the project id appropriately | ||
it will fail saying a key wasn't found | ||
(3) In the GCP web console, navigate to IAM > Service Accounts and create a private key for the Compute Engine and upload to the specified location | ||
(4) run query.py or pkg_query.py | ||
* run query.py or pkg_query.py | ||
* Edit the file to set the project id appropriately | ||
* Run query.py | ||
* It will <b>fail</b> saying a key wasn't found | ||
* In the GCP web console, navigate to IAM > Service Accounts and create a private key for the Compute Engine and upload to the specified location | ||
* run query.py or pkg_query.py | ||
It will work now. | ||
|
||
*If #4 fails with an error saying "Invalid JWT Signature.", you might need to enable the IAM API in the APIs and Services of the GCP web console | ||
Note: If the last step fails with an error saying "Invalid JWT Signature.", you might need to enable the IAM API in the APIs and Services of the GCP web console |