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

Commit

Permalink
GCP: Storage graphics and cleanup, compute cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Jan 21, 2022
1 parent 32a3a43 commit bb7a6c4
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 18 deletions.
8 changes: 4 additions & 4 deletions content/GCP/02_intro_to_compute.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@
"tags": []
},
"source": [
"Now that we have made that clear, we will now complete the resource life-cycle by deleting the *VM Instance* we just created. Think about the process we did for creating the bucket and follow a similar one. First, try to do this on your own.\n",
"Now that we have made that clear, we will now complete the resource life-cycle by deleting the *VM Instance* we just created. First, try to do this on your own.\n",
"\n",
"```{admonition} Exercise\n",
"\n",
Expand All @@ -306,9 +306,9 @@
"\n",
"![compute-delete-instance](img/compute-delete-instance.png)\n",
"\n",
"Did you \"Follow\" the bucket by looking at the **activity** page as discussed above?\n",
"Did you \"Follow\" the VM instance by looking at the **activity** page as discussed above?\n",
"\n",
"Since we care about paying for resources we are not using we review our project by visiting the compute engine service and reviewing that we no longer have any virtual machines (VM) running. \n",
"Since we care about paying for resources we are not using we review our project by visiting the *compute engine* service and reviewing that we no longer have any *VM instances* running. \n",
" * Go to **Navigation Menu** -> **Compute Engine** (under Compute) -> **Instances** and look for your virtual machine.\n",
"\n",
"In a later episode we will show how to easily list all the resources in a project."
Expand All @@ -320,7 +320,7 @@
"metadata": {},
"source": [
"## References\n",
" * Compute Engine Permissions (IAM): https://cloud.google.com/compute/docs/access/iam"
" * Compute Engine Permissions (IAM): [https://cloud.google.com/compute/docs/access/iam](https://cloud.google.com/compute/docs/access/iam)"
]
}
],
Expand Down
74 changes: 60 additions & 14 deletions content/GCP/03_intro_to_cloud_storage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"```{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 store data in the cloud?\n",
Expand Down Expand Up @@ -52,7 +52,7 @@
},
{
"cell_type": "markdown",
"id": "4b1d2914-cac0-465e-b61a-11bbc243cc8c",
"id": "07fb9096-2b40-4995-a742-be7bd9b2797c",
"metadata": {
"tags": []
},
Expand All @@ -67,13 +67,22 @@
"\n",
"You should see a row with your account shown in the Principal column. Here you should see the \"Editor\" Role in the Role column. A *role* is a collection of permissions managed by Google or someone else. The **Editor**, **Owner**, or the **Storage Admin** role for a project will *allow* *you* to create, access, and delete Buckets *in* the project.\n",
"\n",
"There are three important pieces of information that work together to form the **IAM policy**. The permission (role), the identity (principal), and the resource (project). This is another who (identity), what (permission), and where (resource).\n",
"\n",
"### Exercise\n",
"There are three important pieces of information that work together to form the **IAM policy**. The permission (role), the identity (principal), and the resource (project). This is another who (identity), what (permission), and where (resource)."
]
},
{
"cell_type": "markdown",
"id": "9acf29cf-660b-4922-bcb8-89fd9080fdea",
"metadata": {
"tags": []
},
"source": [
"```{admonition} Exercise\n",
"\n",
"Answer the following questions:\n",
" * What is the \"Who, What, Where\" of the IAM policy that allows you to use your project?\n",
" * What else has permissions to do things in your project and state the \"Who, What, Where\"?\n"
" * What else has permissions to do things in your project and state the \"Who, What, Where\"?\n",
"```"
]
},
{
Expand Down Expand Up @@ -108,6 +117,8 @@
" * *Data Retrieval* is only used for for long-term, non *standard*, storage.\n",
" * *Operations* is the number of \"operations\" performed on an object, for example reading and writing an object. Storing and accessing many objects require many operations.\n",
" * Finally, click **Create** to create the bucket (allocate the resource).\n",
"![storage-create-bucket](img/storage-create-bucket.png) \n",
"\n",
" "
]
},
Expand Down Expand Up @@ -170,18 +181,53 @@
},
{
"cell_type": "markdown",
"id": "0362e76c-3f03-4299-8217-24a2f39ee503",
"id": "b44b27aa-d98e-4c9f-b00b-938e0a0fa783",
"metadata": {
"tags": []
},
"source": [
"## Delete the Storage\n",
"\n",
"```{admonition} Danger\n",
":class: danger\n",
"\n",
"This will destroy the storage *Bucket* and and ALL the data in it! You cannot undelete a Bucket!\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "59005efb-2aad-4dcd-ac7b-f153f4295abc",
"metadata": {
"tags": []
},
"source": [
"We will now complete the resource life-cycle by deleting the bucket we just created. Think about the process we did for creating the bucket and follow a similar one.\n",
"\n",
"```{admonition} Exercise\n",
"\n",
" * Try to delete the storage bucket on your own\n",
" * Verify that the storage bucket has been deleted.\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "72048a39-e36b-411a-a6a8-bf1d35b4acb7",
"metadata": {
"tags": []
},
"source": [
"## Delete the Storage - Exercise \n",
"To delete a *Bucket*:\n",
" * Go to **Navigation Menu** -> **Cloud Storage** (under Storage) -> **Browser**.\n",
" * On the row of the virtual machines click the three vertical dots (**kabob**) menu and select **Delete**\n",
" * Click 'Delete' to confirm deleting the instance. \n",
"\n",
"We will now complete the resource life-cycle by deleting the bucket we just created. Think about the process we did for creating the bucket and follow a similar one. \n",
"![storage-delete-bucket](img/storage-delete-bucket.png)\n",
"\n",
"Did you \"Follow\" the bucket by looking at the **activity** page?\n",
"Did you \"Follow\" the bucket by looking at the **activity** page as discussed above?\n",
"\n",
"Since we care about paying for resources we are not using we **review** by visiting the **dashboard** and reviewing that we no longer have any buckets, if this was our only bucket. "
"Since we care about paying for resources we are not using we review our project by visiting the *compute storage* service and reviewing that we no longer have any *Buckets* allocated. "
]
},
{
Expand Down Expand Up @@ -220,8 +266,8 @@
"metadata": {},
"source": [
"## References\n",
" * API reference https://cloud.google.com/storage/docs/reference/libraries\n",
" * Permissions (IAM): https://cloud.google.com/storage/docs/access-control/iam-permissions"
" * API reference [https://cloud.google.com/storage/docs/reference/libraries](https://cloud.google.com/storage/docs/reference/libraries)\n",
" * Permissions (IAM): [https://cloud.google.com/storage/docs/access-control/iam-permissions](https://cloud.google.com/storage/docs/access-control/iam-permissions)"
]
}
],
Expand Down
Binary file added content/GCP/img/storage-create-bucket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/GCP/img/storage-delete-bucket.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit bb7a6c4

Please sign in to comment.