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

Commit

Permalink
Merge pull request #46 from CLASS/azure-dev
Browse files Browse the repository at this point in the history
update into_console & setup
  • Loading branch information
jhicks authored Oct 28, 2022
2 parents 04d496e + a0db824 commit 1b99545
Show file tree
Hide file tree
Showing 11 changed files with 303 additions and 139 deletions.
155 changes: 30 additions & 125 deletions content/Azure/01_intro_to_cloud_console.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"cells": [
{
"cell_type": "markdown",
"id": "b3a74289",
"id": "1334c396",
"metadata": {},
"source": [
"# Introduction to the Azure Cloud Console\n",
"\n",
"```{admonition} Overview\n",
":class: tip\n",
"\n",
"**Teaching:**\n",
"**Teaching:** 15 mins\n",
"\n",
"**Exercises:**\n",
"**Exercises:** 5 mins\n",
"\n",
"**Questions:**\n",
"* How do I find things in the web console?\n",
Expand All @@ -22,7 +22,6 @@
"* Login to the Azure web console\n",
"* Find and verify important information about your cloud environment.\n",
"* Find and open the Cloud Shell\n",
"\n",
"```"
]
},
Expand Down Expand Up @@ -71,7 +70,7 @@
},
{
"cell_type": "markdown",
"id": "651055e4",
"id": "d8677292",
"metadata": {},
"source": [
"## Subscriptions\n",
Expand All @@ -97,7 +96,7 @@
},
{
"cell_type": "markdown",
"id": "d2e2654b",
"id": "ac7b88ff",
"metadata": {},
"source": [
"## Services\n",
Expand All @@ -107,14 +106,17 @@
"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",
"The Navigation Menu (number 1 below) is used to navigate to the various products, which are also called services. We can also use the \n",
"Search bar (number 2 below) is find services.\n",
"\n",
"Navigation Menu\n",
"\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"
"All the different products and services are the \"What\" of the cloud. \n"
]
},
{
Expand All @@ -132,7 +134,7 @@
},
{
"cell_type": "markdown",
"id": "842ad945",
"id": "3e93beab",
"metadata": {},
"source": [
"## Everything Else\n",
Expand All @@ -144,149 +146,52 @@
"\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",
"**1. Navigation Menu (sometimes called the hamburger)**\n",
": If you click on the hamburger (three horizontal lines) you will get a dropdown menu and see a list of frequently used services that are offered by Azure. Currently, Azure has over 200 services ranging from compute to machine learning to networking to data storage. The list grows frequently!\n",
"\n",
"**2. Search bar**\n",
": You can also use the search bar to find a particular service or offering that you are interested in. Cloud vendors have proprietary vocabulary or jargon, so it is often useful to be aware of those as you start exploring more in your cloud adoption journey. [Internet2's CLASS Core documentation](https://github.internet2.edu/pages/CLASS/CLASS-Essentials-AWS/vendor_vocabulary.html) provides a basic list of vendor specific cloud terminology. For example, if you wanted to provision or utilize a \"virtual server\", you can try using the search bar to search for \"Virtual Machines\". As you start typing the words starting with \"V\" will auto fill. Choose Virtual Machines from the options displayed.\n",
": You can also use the search bar to find a particular service or offering that you are \n",
"interested in. For example, if you wanted to provision or utilize a \"virtual machine\", \n",
"you can try using the search bar to search for \"Virtual Machines\". As you start typing \n",
"the words starting with \"V\" will auto fill. Choose Virtual Machines from the options displayed.\n",
"\n",
"**3. Cloud Shell**\n",
": The cloud shell button invokes an interactive shell environment for either bash or PowerShell. The first time you invoke cloud shell you will also creare persistent storage specifically for cloud shell. The cloud shell comes with linux tools like bash, sh, & dig as well as the Azure CLI. Cloud shell also has editors like VIM and emacs, and tools like git, make, and configuration tools like ansible & terraform already installed. Language support for python, go, java, & PowerShell are also preinstalled. Azure Cloud Shell runs on Ubuntu 16.04 LTS with persistent storage.\n",
": The cloud shell button invokes an interactive shell environment for either bash or PowerShell. The first time you invoke cloud shell you will also creare persistent storage specifically for cloud shell. The cloud shell comes with linux tools like bash, sh, & dig as well as the Azure CLI. Cloud shell also has editors like VIM and emacs, and tools like git, make, and configuration tools like ansible & terraform already installed. Language support for python, go, java, & PowerShell are also preinstalled. Azure Cloud Shell runs on Ubuntu with persistent storage.\n",
"\n",
"**4. Directories & Subscriptions**\n",
": This button will show the current Subsciption and Active Directory (cover later) associated with your account. The Subscription is your billing account. Using this dropdown to verify that are using the right subscription.\n",
": This button will show the current Subsciption and Active Directory (not covered) associated with your account. For these episodes you can think of a Subscription as your your billing account ((For more information on Active Directories and Subscriptions, see the *glossary of Azure terms* link above). You use this dropdown to verify that are using the right subscription.\n",
"\n",
"**5. IAM Username and Organization**\n",
": The menu bar on the console also lists your username and the current organization that you are logged into. IAM is short for Identity and Access Management. Identity is a mechanism to authenticate users (e.g. password) and Access is a mechanism for authorizing what kinds of services users have access to. In the creation of an IAM user, the administrator (overlord) of the account assigned a particular permission scope (in AWS this is known as roles) to control access to a particular set of services and also assigned a password to authenticate user login. IAM is a key component in managing security on the cloud.\n"
]
},
{
"cell_type": "markdown",
"id": "53c387b4",
"metadata": {},
"source": [
"## Open the 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 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",
"To use the Azure Cloud Shell:\n",
" \n",
" * Open up a Cloud Shell by clicking on the cloud shell icon (greater than sign followed by underscore) on the blue bar just to the right of search window. On first launch, Cloud Shell prompts to create a resource group, storage account, and Azure Files share on your behalf. This will open a cloud shell at the bottum of your browser window. You can choose a bash shell or Power shell.\n",
" * If you want a new cloud shell in a different window, click the new cloud shell button (file icon with + in upper right corner) on the cloud shell menu bar. This will create a new cloud shell window tab. **Note:** you may need to allow popups or enable popups for this website depending on the browser you use. You can also pull up the tab to increase the shell screen size.\n",
" * To quit cloud shell type exit at the prompt.\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/welcome-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",
"\n",
"![Azure-cloud-shell](images/Azure-cloud-shell.png)\n",
"\n",
"You will notice that in the upper left corner of the cloud shell there is a pull down menu. This should be set to **bash** (The other option is PowerShell). We will now prepare for the next lessons by creating an ssh key."
]
},
{
"cell_type": "markdown",
"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",
"\n",
"At the **$** prompt, enter **ssh-keygen** and follow the prompts."
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "be8b4eb8",
"metadata": {},
"outputs": [],
"source": [
"$ssh-keygen\n",
"Generating public/private rsa key pair.\n",
"Enter file in which to save the key (/home/john/.ssh/id_rsa):"
": The menu bar on the console also lists your username and the current organization that you are logged into. IAM is short for Identity and Access Management. Identity is a mechanism to authenticate users (e.g. password) and Access is a mechanism for authorizing what kinds of services users have access to. In the creation of an IAM user, the administrator (overlord) of the account assigns a particular permission scope (in Azure this is known as roles) to control access to a particular set of services and also assigned a password to authenticate user login. IAM is a key component in managing security on the cloud.\n"
]
},
{
"cell_type": "markdown",
"id": "1d7f2ca7",
"id": "a95358d0",
"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) 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",
"Generating public/private rsa key pair.\n",
"Enter passphrase (empty for no passphrase):\n",
"```\n",
"Here you should enter a passphrase (a series of words) to protect the key. You will be asked to re-enter the passphrase as shown below:\n",
"```\n",
"Enter same passphrase again:\n",
"```\n",
"\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/<username>/.ssh/id_rsa.\n",
"Your public key has been saved in /home/<username>/.ssh/id_rsa.pub.\n",
"The key fingerprint is:\n",
"SHA256:D9yj1nZEUigahirvjkIFoCP7RfjDu67Ku88M7nHQftI learner@cs-748001990186-default-boost-r9phq\n",
"The key's randomart image is:\n",
"+---[RSA 2048]----+\n",
"|o . .. |\n",
"|.. .. o . .. |\n",
"|+ o... o .. . |\n",
"|ooo= .. . o |\n",
"|.+..= S o . |\n",
"| o+..o = o |\n",
"|.+.+.E o + . |\n",
"|+.B o. . . . |\n",
"|=O**o |\n",
"+----[SHA256]-----+\n",
"```\n",
"```{admonition} Exercise\n",
":class: attention\n",
"\n",
"The ssh key generation is now complete. You will only need to do this once for your account. Later during the VM \n",
"create proces you will be asked to Cut & Paste the public key into a form. "
"* What is your IAM username? \n",
"* Why is IAM important?\n",
"* What are two ways you can find an Azure service on the console?\n",
"````"
]
},
{
"cell_type": "markdown",
"id": "4e58abb6",
"id": "e0b23f01",
"metadata": {},
"source": [
"## Overview of what we will create\n",
"## Overview of what we will do in this lesson\n",
"\n",
"We are now ready to move on with the rest of the Azure essentials lessons. Here is an overview of what we are \n",
"going to do. First we will create a Virtual Machine (VM) and in doing so create a Resource Group. Then we will \n",
"create a Storage Account and in that a blob storage container. After that we will create a blob and upload it to\n",
"the blob contaioner.\n",
"![Azure-essentails-outline](images/azure-essentials-outline.png)"
]
},
{
"cell_type": "markdown",
"id": "779c8715",
"metadata": {},
"source": [
"## Exercise\n",
"\n",
"Before we move on, do the following:\n",
"* Double check that you are in the correct account 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?"
]
},
{
"cell_type": "markdown",
"id": "c0706cc3",
"metadata": {},
"source": [
"Now let's move on the to next lession"
]
}
],
"metadata": {
Expand All @@ -305,7 +210,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.7"
"version": "3.9.10"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 1b99545

Please sign in to comment.