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

Commit

Permalink
Merge pull request #15 from CLASS/main
Browse files Browse the repository at this point in the history
Merge Azure-dev with main
  • Loading branch information
jhicks authored Jan 19, 2022
2 parents 4b3950c + 32a3a43 commit 9946190
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 148 deletions.
60 changes: 44 additions & 16 deletions content/GCP/01_intro_to_cloud_console.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
"```{admonition} Overview\n",
":class: tip\n",
"\n",
"**Teaching:**\n",
"**Teaching:** 10 min.\n",
"\n",
"**Exercises:**\n",
"**Exercises:** 6 min.\n",
"\n",
"**Questions:**\n",
"* How do I find things in the web console?\n",
Expand Down Expand Up @@ -64,19 +64,20 @@
"tags": []
},
"source": [
"### Exercise\n",
"```{admonition} Exercise\n",
"\n",
"Take a few moments to ask yourself the following questions:\n",
" * What account are you currently using in the Google Cloud web console?\n",
" * Are you logged into any other accounts?\n",
" * How do you know which account is being used?\n",
" \n",
" If you are not currently using the correct account, switch to it."
" If you are not currently using the correct account, switch to it.\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "ef4c1470",
"id": "847149e2-bce0-4377-b9fc-ae88d8ba41e8",
"metadata": {},
"source": [
"## Projects\n",
Expand All @@ -95,9 +96,15 @@
"A Project, just like the word, should be associated with a real world project (for example a research effort or grant, lab, or your Ph.D. Project. etc). For Drew, this is the image processing project. In this way it is easier to track and allocate costs and to manage permissions and access for resources within the project.\n",
"\n",
"The active project is also shown next to the project icon (three hexagons) and clicking it brings up the project selection dialog. The current project has a check mark and the active project can be changed by clicking on the project name or double clicking the row.\n",
" ![select-project](img/select-project.png) \n",
"\n",
"### Exercise\n",
" ![select-project](img/select-project.png) "
]
},
{
"cell_type": "markdown",
"id": "45e76bfd-9392-4905-b554-f0a0ad815274",
"metadata": {},
"source": [
"```{admonition} Exercise\n",
"\n",
"Take a few moments to ask yourself the following questions:\n",
" * What is the *name* of the Project you are currently using in the Google Cloud Platform web console?\n",
Expand All @@ -106,12 +113,13 @@
" * Do you have multiple projects?\n",
" * How do you know which project you are currently using?\n",
"\n",
"If you are currently not using the correct project for this lesson, switch to the correct one."
"If you are currently not using the correct project for this lesson, switch to the correct one.\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "294a3fa0-7a55-4547-af19-4ef542b8dae7",
"id": "a43bd3bd-2d12-4d24-a59e-707e389b9cd0",
"metadata": {
"tags": []
},
Expand All @@ -128,14 +136,23 @@
" * You can pin frequently used items on the top of this page by clicking on the pin icon. \n",
" * Click the hamburger again to hide the Left Sidebar.\n",
"\n",
"All the different products and services are the \"What\" of the cloud. We will start with compute, called *Google Compute Engine* in the next Episode. \n",
"\n",
"### Exercise \n",
"All the different products and services are the \"What\" of the cloud. We will start with compute, called *Google Compute Engine* in the next Episode. "
]
},
{
"cell_type": "markdown",
"id": "4da0bd01-47f7-40bd-a929-985f63bb1810",
"metadata": {
"tags": []
},
"source": [
"```{admonition} Exercise\n",
"\n",
"Take a few moments to navigate a few key services.\n",
" * Navigate to the \"Compute Engine\" service under the \"Compute\" product group.\n",
" * You will probably need to \"Enable\" this service first by clicking on the \"Enable\" button on the \"Compute Engine API\" page. This will only need to be done once per project.\n",
" * Navigate to \"Cloud Storage\" under the \"Storage\" product group and enable the service if necessary."
" * Navigate to \"Cloud Storage\" under the \"Storage\" product group and enable the service if necessary.\n",
"```"
]
},
{
Expand Down Expand Up @@ -201,12 +218,23 @@
"tags": []
},
"source": [
"## Exercise\n",
"```{admonition} Exercise\n",
"\n",
"Before we move on, do the following:\n",
"* Double check that you are in the correct account and project that you will be using for this lesson.\n",
"* Take a moment to reflect on the \"Who, What, and Where\" of the cloud. Why is this important?\n"
"* Take a moment to reflect on the \"Who, What, and Where\" of the cloud. \n",
" * What is your Who, What, and Where?\n",
" * Why is this important?\n",
"```"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "530f7a45-5708-4213-b120-71c6328f7026",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
75 changes: 62 additions & 13 deletions content/GCP/02_intro_to_compute.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
"```"
]
},
Expand Down Expand Up @@ -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",
"```"
]
},
{
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -249,20 +262,56 @@
},
{
"cell_type": "markdown",
"id": "0362e76c-3f03-4299-8217-24a2f39ee503",
"id": "c59b7e30-95a4-4eb7-91bf-ba30390ed817",
"metadata": {
"tags": []
},
"source": [
"## Delete the VM Instance\n",
"\n",
"```{admonition} Danger\n",
":class: danger\n",
"\n",
"This will destroy the VM instance and and ALL the data in it! You cannot undelete an instance!\n",
"```"
]
},
{
"cell_type": "markdown",
"id": "31bcefe2-dcf8-42d7-a8b5-76edeb585c7d",
"metadata": {
"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",
"\n",
"```{admonition} Exercise\n",
"\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."
]
},
{
Expand Down
Loading

0 comments on commit 9946190

Please sign in to comment.