Skip to content
This repository was archived by the owner on Dec 12, 2025. It is now read-only.

Commit

Permalink
GCP: Time and cleanup on CLI
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Jan 21, 2022
1 parent bb7a6c4 commit 03a3f12
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions content/GCP/04_intro_to_cli.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@
"cells": [
{
"cell_type": "markdown",
"id": "5439e525-b985-495f-85a6-e4c8d7452956",
"id": "eba8b2f8-0d38-4c7a-aaf0-a08b38e6ca8f",
"metadata": {},
"source": [
"# Introduction to the Command Line Interface (CLI)\n",
"\n",
"\n",
"```{admonition} Overview\n",
":class: tip\n",
"\n",
"**Teaching:**\n",
"**Teaching:** 40 min\n",
"\n",
"**Exercises:**\n",
"**Exercises:** 5 min\n",
"\n",
"**Questions:**\n",
"* How do I use the Cloud CLI?\n",
Expand All @@ -26,12 +25,18 @@
"* Use environment variables for configuration.\n",
"* Understand the importance of using variables for configuration.\n",
"* Recognize the value of reproducibility and automation.\n",
"```\n",
" \n",
"``` "
]
},
{
"cell_type": "markdown",
"id": "43a7d426-ce18-4289-b70f-639a3f1070ce",
"metadata": {},
"source": [
"Resources\n",
" * `gcloud` documentation: https://cloud.google.com/sdk/gcloud\n",
" * `gsutil` documentation: https://cloud.google.com/storage/docs/gsutil\n",
" * Instructions to install `gcloud` and `gsutil` on your local machine: https://cloud.google.com/sdk/docs/install"
" * `gcloud` documentation: [https://cloud.google.com/sdk/gcloud](https://cloud.google.com/sdk/gcloud)\n",
" * `gsutil` documentation: [https://cloud.google.com/storage/docs/gsutil](https://cloud.google.com/storage/docs/gsutil)\n",
" * Instructions to install `gcloud` and `gsutil` on your local machine: [https://cloud.google.com/sdk/docs/install](https://cloud.google.com/sdk/docs/install)"
]
},
{
Expand Down Expand Up @@ -96,16 +101,15 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": 2,
"id": "3ce9e6fb-9f5f-42e1-8512-35c0564f8e85",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Your active configuration is: [cloudshell-17640]\n",
"student31@class.internet2.edu\n"
"998995103712-compute@developer.gserviceaccount.com\n"
]
}
],
Expand All @@ -123,16 +127,15 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": 3,
"id": "cfb10587-e007-45ae-839f-7bcfe088c711",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Your active configuration is: [cloudshell-17640]\n",
"just-armor-301114\n"
"essentials-learner\n"
]
}
],
Expand All @@ -150,7 +153,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": 4,
"id": "617325c9-d853-4291-a1db-938ab9439fee",
"metadata": {},
"outputs": [
Expand Down Expand Up @@ -564,19 +567,21 @@
"id": "270e0abb-d5e9-476a-af91-060cc0ea0349",
"metadata": {},
"source": [
"## Exercise\n",
"```{admonition} Exercise\n",
"\n",
" * What command shows the project number? (hint: we used it already)\n",
" * What is the name of this variable? (hint: it is case sensitive)\n",
" * What command shows *just* the Project Number (hint: use `--format`)\n",
" * Set the `PROJECT_NUMBER` environment variable with the correct value. (hint: be careful with punctuation (single and double quotes) and matching brackets and punctuation)"
" * Set the `PROJECT_NUMBER` environment variable with the correct value. (hint: be careful with punctuation (single and double quotes) and matching brackets and punctuation)\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "bda44ee1-337a-447d-8377-e8f7ae563316",
"metadata": {},
"source": [
"## Advanced Call-Out: Formating Output.\n",
"## Formating and Scripting Output (Optional)\n",
"\n",
"The following example shows how to output the configuration as `JSON`. The command `jq` can also be used to parse the JSON data."
]
Expand Down

0 comments on commit 03a3f12

Please sign in to comment.