diff --git a/content/GCP/02_intro_to_compute.ipynb b/content/GCP/02_intro_to_compute.ipynb index 33ccfba..99e34c8 100644 --- a/content/GCP/02_intro_to_compute.ipynb +++ b/content/GCP/02_intro_to_compute.ipynb @@ -12,9 +12,9 @@ "```{admonition} Overview\n", ":class: tip\n", "\n", - "**Teaching:**\n", + "**Teaching:** 45 min.\n", "\n", - "**Exercises:**\n", + "**Exercises:** 6 min\n", "\n", "**Questions:**\n", "* How do I create my own computer in the cloud?\n", @@ -24,8 +24,8 @@ "* Allocate a virtual machine in Google Compute Engine.\n", "* Choose a machine type based on the application.\n", "* Use the cost estimator for Google Compute Engine.\n", - "* Understand what a service account is and how they are used.\n", - "* Learn how to connect to a virtual machine using ssh in the cloud shell with the web console.\n", + "* Learn what a service account is and how they are used.\n", + "* Learn how to connect to a virtual machine using ssh in the Cloud Shell with the web console.\n", "```" ] }, @@ -75,8 +75,21 @@ " * For **Machine type** select *e2-medium* (default). Note that it shows the size of the VM in parentheses. \n", " * In the **Identity and API access** section note that for the **Service Accounts** -> **Service account** option that the **Compute Engine default service account** is selected. This allows the *VM Instance* to access resources in the project. Note: the *\"Allow full access to all Cloud APIs\"* allows *everyone* on the VM to *access and edit all resources in the project*.\n", " * Leave the remaining options as default.\n", - " * Note the **Monthly estimate** in the right side panel. This is only for running the *VM instance* and does not include other storage, networking, compute, and other charges that may occur by running software. Click **Details** show a breakdown of the *VM instance* only costs. **Exercise:** Find the most expensive VM.\n", - " * Finally, click **Create** to create the *VM Instance* (allocate the resource).\n" + " * Note the **Monthly estimate** in the right side panel. This is only for running the *VM instance* and does not include other storage, networking, compute, and other charges that may occur by running software. Click **Details** show a breakdown of the *VM instance* only costs.\n", + "![compute-create-instance](img/compute-create-instance.png) \n", + " * Finally, click **Create** to create the *VM Instance* (allocate the resource).\n", + "![compute-create-instance-ok](img/compute-create-instance-ok.png)\n" + ] + }, + { + "cell_type": "markdown", + "id": "6737d8ba-e6d4-437f-a652-5d9d4477b34c", + "metadata": {}, + "source": [ + "```{admonition} Exercise\n", + "* Find the most expensive VM. **DO NOT actually create! Just cancel!**\n", + "* Find the least expensive VM.\n", + "```" ] }, { @@ -138,7 +151,7 @@ "\n", "Now lets find and connect to the *VM Instance*.\n", " * Navigate to the Google Compute Engine page by clicking **Navigation Menu** -> **Compute Engine** (under Compute) -> **Instances**.\n", - " * **Find** the *VM instance* you just created. You can use the filter to find a bucket if there are a lot of them.\n", + " * **Find** the *VM instance* you just created. You can use the filter to find a *VM instance* if there are a lot of them.\n", " * Click on the *VM instance* name to open the **VM instance details** (it will display as a hyperlink when you hover over the *VM instance* name).\n", "\n", "Navigate to the **dashboard** and you will see **Compute Engine** in the *resources* card. You can click on this to quickly navigate to the compute engine page.\n" @@ -249,20 +262,46 @@ }, { "cell_type": "markdown", - "id": "0362e76c-3f03-4299-8217-24a2f39ee503", + "id": "09ef9b09-a0bf-4df7-8b20-5033a2118178", + "metadata": { + "tags": [] + }, + "source": [ + "## Delete the VM Instance\n", + "\n", + "```{admonition} Danger\n", + ":class: danger\n", + "This will destroy the VM instance and and ALL the data in it! You cannot undelete an instance!\n", + "```\n", + "\n", + "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", + "\n", + "```{admonition} Exercise\n", + "* Try to delete the ***VM instance*** on your own\n", + "* Try to follow the process we just learned (hint: *follow* and *enumerate*)\n", + "```" + ] + }, + { + "cell_type": "markdown", + "id": "de7fff43-be0f-45f1-a950-8d7e8326d328", "metadata": { "tags": [] }, "source": [ - "## Delete the VM - Exercise \n", + "To delete a *VM Instance*:\n", + " * Go to **Navigation Menu** -> **Compute Engine** (under Compute) -> **Instances**.\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 *VM Instance* we just created. Think about the process we did for creating the bucket and follow a similar one. \n", + "![compute-delete-instance](img/compute-delete-instance.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** 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 virtual machines (VM) running. \n", + " * Go to **Navigation Menu** -> **Compute Engine** (under Compute) -> **Instances** and look for your virtual machine.\n", "\n", - "In later episodes we will show how to easily list all the resources in a project." + "In a later episode we will show how to easily list all the resources in a project." ] }, { diff --git a/content/GCP/img/api-enable-compute-engine.png b/content/GCP/img/api-enable-compute-engine.png new file mode 100644 index 0000000..f5d4d5a Binary files /dev/null and b/content/GCP/img/api-enable-compute-engine.png differ diff --git a/content/GCP/img/compute-create-instance-ok.png b/content/GCP/img/compute-create-instance-ok.png new file mode 100644 index 0000000..3d1614d Binary files /dev/null and b/content/GCP/img/compute-create-instance-ok.png differ diff --git a/content/GCP/img/compute-create-instance.png b/content/GCP/img/compute-create-instance.png new file mode 100644 index 0000000..1de2241 Binary files /dev/null and b/content/GCP/img/compute-create-instance.png differ diff --git a/content/GCP/img/compute-delete-instance.png b/content/GCP/img/compute-delete-instance.png new file mode 100644 index 0000000..e67a38a Binary files /dev/null and b/content/GCP/img/compute-delete-instance.png differ