diff --git a/content/GCP/06_running_analysis.ipynb b/content/GCP/06_running_analysis.ipynb index 5a725e7..7d6e0f4 100644 --- a/content/GCP/06_running_analysis.ipynb +++ b/content/GCP/06_running_analysis.ipynb @@ -7,7 +7,7 @@ "source": [ "# Putting It All Together\n", "\n", - "```{admonition} Overview\n", + ":::{admonition} Overview\n", ":class: tip\n", "\n", "**Teaching:** 60 min\n", @@ -15,21 +15,21 @@ "**Exercises:** 8 min\n", "\n", "**Questions:**\n", - " * Can you show me an example?\n", + " * Can you show me an example?\n", "\n", "**Objectives:**\n", - " * Create a simple workflow using a cloud VM and cloud object storage.\n", - " * Update a VM Instance software for important security updates.\n", - " * Create a VM Instance with the appropriate storage scope.\n", - " * Create a private regional storage bucket with appropriate security settings.\n", - " * Using the CLI to install software.\n", - " * Download source code using git\n", - " * Retrieve data from a bucket\n", - " * Run the python analysis code\n", - " * Store results in a bucket\n", - " * View the results in the Cloud Storage browser.\n", + " * Create a simple workflow using a cloud VM and cloud object storage.\n", + " * Update a VM Instance software for important security updates.\n", + " * Create a VM Instance with the appropriate storage scope.\n", + " * Create a private regional storage bucket with appropriate security settings.\n", + " * Using the CLI to install software.\n", + " * Download source code using git\n", + " * Retrieve data from a bucket\n", + " * Run the python analysis code\n", + " * Store results in a bucket\n", + " * View the results in the Cloud Storage browser.\n", "\n", - "```" + ":::" ] }, { @@ -42,6 +42,23 @@ "Drew needs to do some analysis on the data. They need data (satellite images stored in the cloud), computational resources (a virtual machine), some software (we will supply this), and a place to store the results (Cloud Storage). We will assemble and process all these parts in the cloud with a simple example.\n" ] }, + { + "cell_type": "markdown", + "id": "03938799-181e-4755-961d-e2f837af7db7", + "metadata": {}, + "source": [ + ":::{tip}\n", + "\n", + "If you get disconnected, you will need to reconnect to the virtual machine (`gcloud compute ssh essentials`) and re-run the following commands:\n", + "```\n", + "BUCKET=\"essentials-$USER-$(date +%F)\"\n", + "REGION=\"us-west2\"\n", + "echo \"bucket: $BUCKET region: $REGION\"\n", + "cd ~/CLASS-Examples/landsat\n", + "```\n", + ":::" + ] + }, { "cell_type": "markdown", "id": "245ffbcb-bf77-4ad1-8bde-1c7d2717ab46", @@ -54,29 +71,37 @@ "We will do this as an exercise to give you practice in creating resources. Since the virtual machine will need access to storage on your behalf, you will need to change the **access scope** to give **Full** access to the **Storage** API to the virtual machine." ] }, + { + "cell_type": "markdown", + "id": "276d6d6e-5d3e-4fb7-ae4c-a70470d7af4b", + "metadata": {}, + "source": [ + "*Instructor: place the exercise instructions below on the screen*\n", + "\n", + "*When you are done feel free to connect to the virtual machine on your own for additional practice. Once everyone has created their VM we will connect to the machine as described below.*" + ] + }, { "cell_type": "markdown", "id": "45cb5d1d-c28a-4e0e-a0f3-bf68add065be", "metadata": {}, "source": [ - "````{admonition} Exercise\n", + ":::{admonition} Exercise 6\n", + ":class: exercise\n", "\n", "Using the console navigate to the \"Compute Engine\" service and create a new VM with the following properties.\n", - " * Call the VM instance \"essentials\"\n", - " * Allow the VM instance \"Full\" access to \"Storage\". This can be found under \"Identity and API\" on the \"create an instance\" page and then selecting \"Set access for each API\" and change \"Storage\" to \"Full\". **This will allow the VM to create, read, write, and delete all storage buckets in the project\"**\n", - " * Select a bit larger VM instance by changing the machine type to \"e2-standard-2\".\n", - "````" + " * Set the VM instance **name** to \"essentials\"\n", + " * Select a bit larger VM instance by changing the machine type to \"**e2-standard-2**\".\n", + " * Set the VM instance API access for \"**Storage**\" to \"**Full**\". This can be found under \"Identity and API access\" on the \"create an instance\" page and then selecting \"Set access for each API\" and change \"Storage\" to \"Full\". *This will allow the VM to create, read, write, and delete all storage buckets in the project\"*\n", + " \n", + ":::" ] }, { "cell_type": "markdown", - "id": "009fbfee-f1ce-4046-8223-0aa11b21bd61", + "id": "4bfb5021-d07d-43c2-b651-5dd6fa498620", "metadata": {}, "source": [ - "*Instructor: place the above exercise instructions on the screen*\n", - "\n", - "*When you are done feel free to connect to the virtual machine on your own for additional practice. Once everyone has created their VM we will connect to the machine as described below.*\n", - "\n", "Please verify that the virtual machine was created as above. If you are unsure delete the virtual machine instance and create it again.\n", "\n", "Verify that the **Compute Engine default service account** is being used.\n", @@ -86,8 +111,7 @@ "![compute-iam-scope-top](img/compute-iam-scope-top.png)\n", "\n", "And set **Storage** to **Full**.\n", - "![compute-iam-scope-storage-full](img/compute-iam-scope-storage-full.png)\n", - "\n" + "![compute-iam-scope-storage-full](img/compute-iam-scope-storage-full.png)" ] }, { @@ -555,14 +579,13 @@ "id": "588ddd30-af8f-4378-b543-290c4c6f0840", "metadata": {}, "source": [ - "````{admonition} Tip\n", - ":class: tip\n", - "To run the above commands in one step run\n", + "::::{tip}\n", "\n", + "To run the above commands in one step run\n", "```\n", "bash get-index.sh\n", "```\n", - "````" + "::::" ] }, { @@ -570,10 +593,12 @@ "id": "f98c38de-87fa-4e66-9d4b-186fbf81b3b2", "metadata": {}, "source": [ - "````{admonition} Break (Optional)\n", + ":::{admonition} Break (Optional)\n", + ":class: exercise\n", "\n", "Now our virtual machine instance is ready and we can access the code and data. Now is a great time to take a short break.\n", - "````" + "\n", + ":::" ] }, { @@ -822,14 +847,14 @@ "id": "0ca2e2ff-8276-4092-8a9e-ca754db5078e", "metadata": {}, "source": [ - "````{admonition} Tip\n", + "::::{admonition} Tip\n", ":class: tip\n", "To run the above analysis in one step run\n", "\n", "```\n", "bash get-data.sh\n", "```\n", - "````" + "::::" ] }, { @@ -941,7 +966,9 @@ "id": "b5a2b29b-9c1d-4376-a3eb-4a3dc4bac160", "metadata": { "scrolled": true, - "tags": [] + "tags": [ + "hide-output" + ] }, "outputs": [ { @@ -1612,11 +1639,12 @@ "id": "4de32b26-f4cb-4f33-b7d5-e3852769840a", "metadata": {}, "source": [ - "````{admonition} Exercise\n", + ":::{admonition} Exercise\n", + ":class: exercise\n", "\n", - " * Try to find and view the results on your own\n", + " * Try to find and view the results on your own\n", "\n", - "````" + ":::" ] }, { @@ -1640,11 +1668,12 @@ "\n", "We will now leave the resources running in order to learn more about sharing and monitoring costs and will clean up all the resources as the end of Lesson. \n", "\n", - "```{admonition} Danger\n", + ":::{admonition} Danger\n", ":class: danger\n", "\n", "**Do not forget to do remove the Cloud Storage Bucket and the Compute Engine Instance (Virtual Machine) when you are done with this Lesson!** Running resources and stored data costs money! Cleanup when you are done!\n", - "```" + "\n", + ":::" ] } ], diff --git a/content/_config.yml b/content/_config.yml index 0bb2c65..2d38905 100644 --- a/content/_config.yml +++ b/content/_config.yml @@ -48,3 +48,4 @@ parse: # don't forget to list any other extensions you want enabled, # including those that are enabled by default! - html_image + - colon_fence