diff --git a/content/Azure/01_intro_to_cloud_console.ipynb b/content/Azure/01_intro_to_cloud_console.ipynb index 7619591..fbc27c5 100644 --- a/content/Azure/01_intro_to_cloud_console.ipynb +++ b/content/Azure/01_intro_to_cloud_console.ipynb @@ -39,81 +39,100 @@ }, { "cell_type": "markdown", - "id": "b8747e81", + "id": "f1a257c4", "metadata": {}, "source": [ "## Accounts (Authentication and Identity) & login\n", "\n", - "The (Azure) **Account** is the identity used to access the Azure web console and is in the form of an email address and is associated with an individual. This is typically the account you use to access Azure services associated with your institution and not your personal account. We will now login to the Azure web console and verify our account.\n", + "The (Azure) **Account** is the identity used to access the Azure web console and is in the form of an email address and is associated with an individual (the *who* is you!). This is typically the account you use to access Azure services associated with your institution and not your personal account. We will now login to the Azure web console and verify our account.\n", "\n", - " * Login to the web console with your (Azure) account by going to [https://portal.azure.com//](https://portal.azure.com//)\n", + " * Login to the web console with your (Azure) account by going to [https://portal.azure.com/](https://portal.azure.com/)\n", " * Fill in your username and password (assigned to you in the an email from CLASS or perhap from your institution). \n", - " * Find your user/account under the \"Avatar\" in the top right (see number 5 below).\n", + " * Find your user/account under the \"Avatar\" in the top right corner of the console (see number 5 below).\n", "\n", "You are now logged in. Welcome to the first step of your cloud journey!" ] }, { "cell_type": "markdown", - "id": "6f9af1ea", + "id": "888bdfdc", "metadata": {}, "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 Azure 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": "4901d3bb", + "id": "651055e4", "metadata": {}, "source": [ "## Subscriptions\n", " \n", - "Click on the *Directories & Subscriptions* buttton (number 4 below).\n", - "Verify that you are in the right *Directory and Subscription* (For more information on Directories and Subscriptions, see the *glossary of Azure terms* link above).\n", - " \n", + "Click on the *Directories & Subscriptions* button in the console (number 4 below).\n", + "Verify that you are in the right *Active Directory and Subscription* (For more information on Active Directories and Subscriptions, see the *glossary of Azure terms* link above)." + ] + }, + { + "cell_type": "markdown", + "id": "bc064a57", + "metadata": {}, + "source": [ + "```{admonition} Exercise\n", "Take a few moments to ask yourself the following questions:\n", " * What is the *name* of the Subscription you are currently using in the Azure web console?\n", " * Do you have multiple subscriptions?\n", " * How do you know which subscription you are currently using?\n", "\n", - "If you are currently not using the correct subscription for this lesson, switch to the correct one." + "If you are currently not using the correct subscription for this lesson, switch to the correct one.\n", + "```" ] }, { "cell_type": "markdown", - "id": "d2611421", + "id": "d2e2654b", "metadata": {}, "source": [ "## Services\n", "\n", - "The web console is used to control and observe the cloud from the browser. It should only be used for simple and one-time tasks, exploring new services, accessing documentation, or for monitoring and debugging resources in the cloud. Programmatic control through the console, programming languages (for example Python), and other automation tools should be used for day to day activities to make the most out of the cloud and to help with the reproducibility of research and teaching.\n", + "The web console is used to control and observe the cloud from the browser. It should only be used for simple and one-time tasks, \n", + "exploring new services, accessing documentation, or for monitoring and debugging resources in the cloud. Programmatic control \n", + "through the console (cloud shell), programming languages (for example Python), and other automation tools should be used for day to \n", + "day activities to make the most out of the cloud and to help with the reproducibility of research and teaching.\n", "\n", "The Navigation Menu (number 1 below) is used to navigate to the various products, which are also called services.\n", "\n", - "![hamburger-navigation](images/Azure-services-menu.png)\n", + "![service-navigation](images/Azure-services-menu.png)\n", "\n", " * Click on a product to navigate to the product page \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 *Azure VM* 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 *Azure VM* in the next Episode. \n" + ] + }, + { + "cell_type": "markdown", + "id": "880a3b4d", + "metadata": {}, + "source": [ + "```{admonition} Exercise\n", "\n", "Take a few moments to navigate to a few key services.\n", " * Navigate to the \"Virtual Machine\" service in the Left Sidebar menu.\n", - " * Navigate to \"Storage Accounts\" service in the Left Sidebar menu.\n" + " * Navigate to \"Storage Accounts\" service in the Left Sidebar menu.\n", + "```" ] }, { "cell_type": "markdown", - "id": "13817be0", + "id": "43cd9544", "metadata": {}, "source": [ "## Everything Else\n", @@ -123,7 +142,7 @@ "\n", "The top of your screen should look very similar to the following when you log in to the Azure console. Next, let's take a closer look at some key concepts and components of the Azure console. \n", "\n", - "![cloud-shell](images/azure_intro_console.jpg)\n", + "![cloud-shell](images/azure_intro_console.png)\n", "\n", "**1. Navigation Menu (often called the hamburger)**\n", ": If you click on the hamburger (three horizontal lines) you will get a dropdown menu and see a list of services that are offered by Azure. Currently, Azure has over N services ranging from compute to machine learning to networking to data storage. The list grows frequently!\n", @@ -143,15 +162,21 @@ }, { "cell_type": "markdown", - "id": "5ab062d4", + "id": "a06f390f", "metadata": {}, "source": [ "## Open a Cloud Shell\n", "\n", - "The Cloud Shell is an easy way to access Comand Line Interface (CLI) commands in a web browser. Under the hood Cloud Shell is Debian running in a container with 5GB of minimal-charge persistent storage and a lot of other useful tools (git, docker, jq, Docker, etc.) installed by default.\n", + "The Cloud Shell is an easy way to access Comand Line Interface (CLI) commands in a web browser. Under the hood Cloud Shell is Common Base Linux Delridge (CBL is a free and open-source, Linux distribution that Microsoft has developed) OS running in a container with 5GB of persistent storage and a lot of other useful tools (git, jq, Docker, etc.) installed by default.\n", "\n", "To use the Cloud Shell:\n", " * Open up a Cloud Shell by clicking on the **Cloud Shell** icon in the right side of the top blue bar (number 3 above).\n", + " * The first time you open cloud shell you will be prompted for the following:\n", + "![welsome-to-cloud-shell-bashl](images/welsome-to-cloud-shell-bash.png)\n", + " * Choose *bash* to continue.\n", + " * Then it will ask you to create a storage account for persistant storage for your cloud shell experience.\n", + "![welcome-to-cloud-shell-storage](images/welcome-to-cloud-shell-storage.png)\n", + " * Click create storage (The storge will encurre a nomial fee)\n", " * Once the Cloud Shell is open and has initialized, you should see \"Welcome to Azure Cloud Shell\".\n", " * Click the middle box icon on the right side of the Cloud Shell bar to maximize the screen. You can find the correct icon by hovering over the icons to see their names.\n", " * Note: You can open the Cloud Shell in a new tab by clicking on the **Open new session** icon (looks like a box with a \"+\") in the middle of the Cloud Shell bar.\n", @@ -163,7 +188,7 @@ }, { "cell_type": "markdown", - "id": "53d98252", + "id": "de9c6bdb", "metadata": {}, "source": [ "Now we will create a ssh key pair to use with some of the other lessons (e.g. we need a ssh key when creating a VM in order to login securely).\n", @@ -178,17 +203,17 @@ "metadata": {}, "outputs": [], "source": [ - "$ ssh-keygen\n", + "$ssh-keygen\n", "Generating public/private rsa key pair.\n", "Enter file in which to save the key (/home/john/.ssh/id_rsa):" ] }, { "cell_type": "markdown", - "id": "af178e4d", + "id": "a1c0e980", "metadata": {}, "source": [ - "This prompt is asking you to create a .ssh directory in your home directory and generate ssh public/private keys named id_rsa.pub/id_rsa (default).\n", + "This prompt is asking you to create a .ssh directory in your home directory and generate ssh public/private keys named id_rsa.pub/id_rsa (default) respectively.\n", "\n", "Press enter to continue to create the key. You will see another message asking you for a passphrase, similar to the following:\n", "```\n", @@ -200,7 +225,7 @@ "Enter same passphrase again:\n", "```\n", "\n", - "After successfully retyping the passphrase the key generation process will continue showing similar message as follows (the fingerprint and art will look different):\n", + "After successfully retyping the passphrase the key generation process will continue showing a similar message as follows (the fingerprint and art will look different):\n", "```\n", "Your identification has been saved in /home/learner/.ssh/id_rsa.\n", "Your public key has been saved in /home/learner/.ssh/id_rsa.pub.\n", diff --git a/content/Azure/02_intro_to_compute.ipynb b/content/Azure/02_intro_to_compute.ipynb index d401cb0..feed87a 100644 --- a/content/Azure/02_intro_to_compute.ipynb +++ b/content/Azure/02_intro_to_compute.ipynb @@ -37,9 +37,11 @@ ] }, { - "cell_type": "markdown", - "id": "eb6326d6", + "cell_type": "code", + "execution_count": null, + "id": "b85b77ed", "metadata": {}, + "outputs": [], "source": [ "## Azure Virtual Machines" ] @@ -121,9 +123,11 @@ ] }, { - "cell_type": "markdown", - "id": "9c8830ce", + "cell_type": "code", + "execution_count": null, + "id": "0d5b8abd", "metadata": {}, + "outputs": [], "source": [ "## Create a VM\n", "\n", diff --git a/content/Azure/03_intro_to_cloud_storage.ipynb b/content/Azure/03_intro_to_cloud_storage.ipynb index f96c948..161be7f 100644 --- a/content/Azure/03_intro_to_cloud_storage.ipynb +++ b/content/Azure/03_intro_to_cloud_storage.ipynb @@ -217,7 +217,7 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -231,7 +231,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.8" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/content/Azure/04_intro_to_cli.ipynb b/content/Azure/04_intro_to_cli.ipynb index f0b0cea..f6d80c4 100644 --- a/content/Azure/04_intro_to_cli.ipynb +++ b/content/Azure/04_intro_to_cli.ipynb @@ -203,7 +203,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 1, "id": "d00a37e4", "metadata": {}, "outputs": [], @@ -213,11 +213,21 @@ ] }, { - "cell_type": "markdown", - "id": "6b5db328", + "cell_type": "code", + "execution_count": 2, + "id": "2cf44876-a1c7-41cc-9653-cebdcdb3978e", "metadata": {}, + "outputs": [ + { + "name": "stdout", + "output_type": "stream", + "text": [ + "rg-essentials\n" + ] + } + ], "source": [ - " # echo $RG" + "echo $RG" ] }, { @@ -280,21 +290,15 @@ ], "metadata": { "kernelspec": { - "display_name": "Python 3", - "language": "python", - "name": "python3" + "display_name": "Bash", + "language": "bash", + "name": "bash" }, "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.8.8" + "codemirror_mode": "shell", + "file_extension": ".sh", + "mimetype": "text/x-sh", + "name": "bash" } }, "nbformat": 4, diff --git a/content/Azure/05_intro_to_cloud_storage_cli.ipynb b/content/Azure/05_intro_to_cloud_storage_cli.ipynb index b082779..7161f00 100644 --- a/content/Azure/05_intro_to_cloud_storage_cli.ipynb +++ b/content/Azure/05_intro_to_cloud_storage_cli.ipynb @@ -109,8 +109,10 @@ ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "az ad signed-in-user show --query objectId -o tsv | az role assignment create \\\n", " --role \"Storage Blob Data Contributor\" \\\n", @@ -126,8 +128,10 @@ ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "az storage container create --account-name $STGE_ACCT --name $CTR --auth-mode login" ] @@ -163,8 +167,10 @@ ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "az storage blob upload --account-name $STGE_ACCT --container-name $CTR --name demo_file --file demo_file --auth-mode login" ] @@ -193,8 +199,10 @@ ] }, { - "cell_type": "markdown", + "cell_type": "code", + "execution_count": null, "metadata": {}, + "outputs": [], "source": [ "az storage blob download --account-name $STGE_ACCT --container-name $CTR --name demo_file --file demo_file_download file --auth-mode login" ] diff --git a/content/Azure/07_monitoring_costs.ipynb b/content/Azure/07_monitoring_costs.ipynb index 6a0ba88..b5c7c53 100644 --- a/content/Azure/07_monitoring_costs.ipynb +++ b/content/Azure/07_monitoring_costs.ipynb @@ -25,21 +25,51 @@ }, { "cell_type": "markdown", - "id": "95459101", + "id": "c98c2c16", "metadata": {}, "source": [ - "* In the Azure portal navigate to the *Cost Management + Billing* from the hamburger menu.\n", - "* On the left menu choose *Cost Management*\n", - "* This will give cost overview of you subscription\n", - "* On this pages left menu choose *Cost analysis*\n", - "* This page will display the actual and forcasted cost for your subscription.\n", - "* This page also offers interactive graphs that assist in drilling down to look at cost for various resources." + "## Overall Costs analysis\n", + "* In the Azure portal hamburger menu, navigate to the *Cost Management + Billing* and click on it.\n", + "* This will take you to the *Billing account* page. This page provides an *overview* of the costs for your overall \n", + "account. You will see the *Amount due*, *Upcoming invoices* (For the Billing period), *past invoices*, *Spending rate and \n", + "forecast*, and *This months top product charges*.\n", + "![Overall-cost-analysis](images/azure-student-cost-analysis.png)\n", + "* In the left hand menu click the *Cost analysis* tab.\n", + "* Here you will see the actual and forecasted cost as well as a breakdown by *service name*, *Location (zone)*, and *subscription*. \n", + "* A time series graph is also provided to give a visual of curent and forecasted cost for the end of \n", + "the billing period.\n", + "![cost-analysis](images/azure-cost-analysis-time-doughnut.png)\n", + "* Note: These values may all be zero if there are no resources allocated yet in this account. Also, in this example there\n", + "is only one item under service name.\n", + "## Costs analysis for Resource Groups\n", + "* Similarly, you can see a cost breakdown for a Resouce Group and resources contained in it by navigating to\n", + "the *Resource Groups* tab in the hamburger menu. \n", + "* Once in the Resource Group page, click on the Resource Group you are interested in.\n", + "* In the left hand menu of the *Resource Group* page, click on the *cost analysis* tab. \n", + "* Here you will see the *actual* and *forcasted* cost of the resources in your Resource Group. \n", + "* You will also see a breakdown of costs by *Service name*, *Location*, and *Resource* in doughnut charts. \n", + "* The doughnut charts are interactive and by moving your curser over the chart you can drilling down to look \n", + "at costs for individual resources.\n", + "* A time series graph is provided to give a visual of curent and forecasted costs through the end of the billing period.\n", + "* The forecasted information in the time series graph will help plan adjustments to your resource allocation to meet \n", + "your cost requirements.\n", + "![rg-cost-analysis](images/azure-rg-cost-analysis.png)\n", + "* Note: These values may all be zero if there are no resources allocated yet in this account. Also, in this example there\n", + "is only one resource listed.\n" ] + }, + { + "cell_type": "code", + "execution_count": null, + "id": "ae56bbd1", + "metadata": {}, + "outputs": [], + "source": [] } ], "metadata": { "kernelspec": { - "display_name": "Python 3", + "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, @@ -53,7 +83,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.8.8" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/content/Azure/glossary.ipynb b/content/Azure/glossary.ipynb index f7501e9..74b2892 100644 --- a/content/Azure/glossary.ipynb +++ b/content/Azure/glossary.ipynb @@ -2,7 +2,7 @@ "cells": [ { "cell_type": "markdown", - "id": "efd09804", + "id": "6e2c69ff", "metadata": {}, "source": [ "# Glossary\n", @@ -10,16 +10,8 @@ "* **Active Directory** - This is were your identity is defined. This is typically setup by the institution that you belong to.\n", "* **Subscription** - Resources and services in Azure are created within a Subsrciption and this acts as your billing account. \n", "* **Account** - The Azure account (email) associated with an individual. This is the identity that you use to access console.\n", - "* **Resource Group** - A resource group is a *container* (in the literal sense not to be confused with a Docker container for example) that holds related resources that you want to manage as a group." + "* **Resource Group** - A resource group is a *container* (in the literal sense not to be confused with a Docker container for example) that holds related resources that you want to manage as a group. Resources are deployed in a Resource Group. " ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "471d2fe5", - "metadata": {}, - "outputs": [], - "source": [] } ], "metadata": { diff --git a/content/Azure/images/Azure-services-menu.png b/content/Azure/images/Azure-services-menu.png index 416acdc..fecba57 100644 Binary files a/content/Azure/images/Azure-services-menu.png and b/content/Azure/images/Azure-services-menu.png differ diff --git a/content/Azure/images/azure-cost-analysis-time-doughnut.png b/content/Azure/images/azure-cost-analysis-time-doughnut.png new file mode 100644 index 0000000..3b8a944 Binary files /dev/null and b/content/Azure/images/azure-cost-analysis-time-doughnut.png differ diff --git a/content/Azure/images/azure-rg-cost-analysis.png b/content/Azure/images/azure-rg-cost-analysis.png new file mode 100644 index 0000000..cf8c5ee Binary files /dev/null and b/content/Azure/images/azure-rg-cost-analysis.png differ diff --git a/content/Azure/images/azure-student-cost-analysis.png b/content/Azure/images/azure-student-cost-analysis.png new file mode 100644 index 0000000..ee2bffa Binary files /dev/null and b/content/Azure/images/azure-student-cost-analysis.png differ diff --git a/content/Azure/images/azure_intro_console.png b/content/Azure/images/azure_intro_console.png new file mode 100644 index 0000000..dd545d4 Binary files /dev/null and b/content/Azure/images/azure_intro_console.png differ diff --git a/content/Azure/images/welcome-to-cloud-shell-bash.png b/content/Azure/images/welcome-to-cloud-shell-bash.png new file mode 100644 index 0000000..468cb29 Binary files /dev/null and b/content/Azure/images/welcome-to-cloud-shell-bash.png differ diff --git a/content/Azure/images/welcome-to-cloud-shell-storage.png b/content/Azure/images/welcome-to-cloud-shell-storage.png new file mode 100644 index 0000000..da936a2 Binary files /dev/null and b/content/Azure/images/welcome-to-cloud-shell-storage.png differ diff --git a/content/GCP/01_intro_to_cloud_console.ipynb b/content/GCP/01_intro_to_cloud_console.ipynb index 60e21b6..cde498b 100644 --- a/content/GCP/01_intro_to_cloud_console.ipynb +++ b/content/GCP/01_intro_to_cloud_console.ipynb @@ -59,7 +59,7 @@ }, { "cell_type": "markdown", - "id": "11f0cbb4-f68f-4525-a30b-02a3a4d251a1", + "id": "15bca7f9", "metadata": { "tags": [] }, @@ -101,7 +101,7 @@ }, { "cell_type": "markdown", - "id": "45e76bfd-9392-4905-b554-f0a0ad815274", + "id": "182e3a9a", "metadata": {}, "source": [ "```{admonition} Exercise\n", @@ -141,7 +141,7 @@ }, { "cell_type": "markdown", - "id": "4da0bd01-47f7-40bd-a929-985f63bb1810", + "id": "d47d160b", "metadata": { "tags": [] }, @@ -253,7 +253,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.9.7" } }, "nbformat": 4, diff --git a/content/GCP/02_intro_to_compute.ipynb b/content/GCP/02_intro_to_compute.ipynb index f210727..815c971 100644 --- a/content/GCP/02_intro_to_compute.ipynb +++ b/content/GCP/02_intro_to_compute.ipynb @@ -340,7 +340,7 @@ "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", - "version": "3.7.3" + "version": "3.9.7" } }, "nbformat": 4,