Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
update console, setup, compute
  • Loading branch information
jhicks committed Oct 31, 2022
1 parent 1b99545 commit cd2a470
Show file tree
Hide file tree
Showing 3 changed files with 130 additions and 274 deletions.
45 changes: 26 additions & 19 deletions content/Azure/01_intro_to_cloud_console.ipynb
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "1334c396",
"id": "a13f1d28",
"metadata": {},
"source": [
"# Introduction to the Azure Cloud Console\n",
Expand Down Expand Up @@ -38,23 +38,23 @@
},
{
"cell_type": "markdown",
"id": "f1a257c4",
"id": "50435734",
"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 (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",
" * Fill in your username and password (assigned to you in the an email from CLASS or perhap from your institution). \n",
" * Fill in your username and password (assigned to you in the email from CLASS or perhaps from your institution). \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": "888bdfdc",
"id": "4890c114",
"metadata": {},
"source": [
"```{admonition} Exercise\n",
Expand All @@ -81,7 +81,7 @@
},
{
"cell_type": "markdown",
"id": "bc064a57",
"id": "9da5a232",
"metadata": {},
"source": [
"```{admonition} Exercise\n",
Expand All @@ -96,7 +96,7 @@
},
{
"cell_type": "markdown",
"id": "ac7b88ff",
"id": "0ba10e1f",
"metadata": {},
"source": [
"## Services\n",
Expand All @@ -107,7 +107,7 @@
"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. We can also use the \n",
"Search bar (number 2 below) is find services.\n",
"Search bar (number 2 below) to find services.\n",
"\n",
"Navigation Menu\n",
"\n",
Expand All @@ -121,7 +121,7 @@
},
{
"cell_type": "markdown",
"id": "880a3b4d",
"id": "c6f395df",
"metadata": {},
"source": [
"```{admonition} Exercise\n",
Expand All @@ -134,7 +134,7 @@
},
{
"cell_type": "markdown",
"id": "3e93beab",
"id": "5a852547",
"metadata": {},
"source": [
"## Everything Else\n",
Expand All @@ -152,17 +152,17 @@
"**2. Search bar**\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",
"you can try using the search bar to search for \"Virtual Machines\". As you start typing, \n",
"the words starting with \"V\" it 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 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 create 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 (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",
": This button will show the current Subscription 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 you 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 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"
": 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 assign a password to authenticate user login. IAM is a key component in managing security on the cloud.\n"
]
},
{
Expand All @@ -181,17 +181,24 @@
},
{
"cell_type": "markdown",
"id": "e0b23f01",
"id": "1d9aa8b9",
"metadata": {},
"source": [
"## 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",
"We are now ready to move on with the rest of the Azure essentials lesson. Here is an overview of what we are \n",
"going to do. First we will create a Resource Group. Then we will \n",
"create a virtual machine (VM), a Storage Account, and a blob \n",
"storage contianer. After that we will create a blob and upload it to\n",
"the blob contianer.\n",
"![Azure-essentails-outline](images/azure-essentials-outline.png)"
]
},
{
"cell_type": "markdown",
"id": "66dfaa3a",
"metadata": {},
"source": []
}
],
"metadata": {
Expand Down
72 changes: 37 additions & 35 deletions content/Azure/02_intro_cloudshell_sshkey.ipynb
Expand Up @@ -30,7 +30,7 @@
},
{
"cell_type": "markdown",
"id": "411b2b06",
"id": "5accf0bf",
"metadata": {},
"source": [
"# Resource Group\n",
Expand All @@ -39,49 +39,48 @@
"logical container that associates multiple resources so you can manage them as a \n",
"single entity. The resource group collects metadata from each individual resource \n",
"to facilitate granular management. This not only has advantages for administration \n",
"and cost management, but also for applying role-based access controls."
"and cost management but also for applying role-based access controls."
]
},
{
"cell_type": "markdown",
"id": "8baedfad",
"id": "5df56e70",
"metadata": {},
"source": [
"# Create a Ressource Group\n",
"# Create a Resource Group\n",
"\n",
"To create a Resource Group from the console we will click on the pull down menu on the \n",
"To create a Resource Group from the console, click the pull down menu on the \n",
"left (you can also type \"resource group\" in the search bar to find this service). Click on \"Resource Groups\" from the menu. This will bring you to the \n",
"\"Resource Groups\" page. Click the \"+ Create\" button. Under the \"Basic\" tab you \n",
"should see your \"Subscription\" (verify that you are using the correct subscription) \n",
"and under that \"Resource group\". In the \"Resource group\" window, enter \"essentials-RG\". \n",
"Under \"Resource details\" verify that you are in \"(US) East US\". If not, use the pull down \n",
"menu on the right side of the \"Region\" window and scroll down untill you find \n",
"\"(US) East US\". Now click the \"Review + create\" button. Once you see a green check mark \n",
"and under that you will see \"Resource group\". In the \"Resource group\" window, enter **essentials**. \n",
"Under \"Resource details\", choose \"(US) East US\" for the region. We will put all of \n",
"our resources in the \"(US) East US\" region. Now click the \"Review + create\" button. Once you see a green check mark \n",
"with \"Validation passed\", click create. We will use this resource group for the remainder \n",
"of the lessons."
"of the lesson."
]
},
{
"cell_type": "markdown",
"id": "0e8cc984",
"id": "8d4a9865",
"metadata": {},
"source": [
"## 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."
"The cloud shell button invokes an interactive shell environment for either bash or PowerShell. The first time you invoke cloud shell you will also create 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."
]
},
{
"cell_type": "markdown",
"id": "8d22f790",
"id": "597fab30",
"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",
" * 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, the Cloud Shell will prompt you to create a resource group, storage account, and Azure Files share on your behalf. This will open a cloud shell at the bottom of your browser window. Make sure to choose bash shell from the options if not already chosen.\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 in a new tab in your browser. **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 Cloude Shell bar to increase the shell screen size.\n",
" * To quit cloud shell type exit at the prompt.\n",
"\n",
"To use the Cloud Shell:\n",
Expand All @@ -91,24 +90,24 @@
" * 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",
" * Click create storage (The storage will incur a nominal 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",
" * Note: You can open the Cloud Shell in a new browser 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."
"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 episode by creating an ssh key."
]
},
{
"cell_type": "markdown",
"id": "5c503ac8",
"id": "96fcff2a",
"metadata": {},
"source": [
"## Generate ssh keys\n",
"\n",
"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",
"Now we will create a ssh key pair to use with some of the other episodes (e.g. we need a ssh key when creating a VM in order to securely login).\n",
"\n",
"At the **$** prompt, enter **ssh-keygen** and follow the prompts."
]
Expand All @@ -122,7 +121,7 @@
"source": [
"$ssh-keygen\n",
"Generating public/private rsa key pair.\n",
"Enter file in which to save the key (/home/john/.ssh/id_rsa):"
"Enter file in which to save the key (/home/<username>/.ssh/id_rsa):"
]
},
{
Expand Down Expand Up @@ -168,14 +167,14 @@
},
{
"cell_type": "markdown",
"id": "d318911c",
"id": "1fd46460",
"metadata": {},
"source": [
"Later during the VM (Virtual Machine) creation process we will use this key to provide \n",
"secure login access to your VM.\n",
"\n",
"First, you will need to Cut & Paste the public key you just created. To Cut (copy) your \n",
"public key to your edit buufer, run the following command."
"public key to your clipboard, run the following command."
]
},
{
Expand All @@ -190,33 +189,36 @@
},
{
"cell_type": "markdown",
"id": "24fa2f52",
"id": "458dfc14",
"metadata": {},
"source": [
"Highlight the output string with your cursor starting with ssh-rsa until the end of the \n",
"string (white test) and before you come to the green command prompt. With the public key \n",
"highlighted, use the copy command (depending on OS) to put it in your edit buffer \n",
"string (white text) and before you come to the green command prompt. With the public key \n",
"highlighted, use the copy command (depending on OS) to put it in your clipboard \n",
"(i.e. for mac use command c)."
]
},
{
"cell_type": "markdown",
"id": "5bd9e57b",
"id": "46db1f1e",
"metadata": {},
"source": [
"Now go back to the console and in the search bar type \"ssh\". Under Services, click on the \n",
"\"SSH keys\" service. This will bring you to the SSH key service page. Click Create to go \n",
"to the \"SSH key\" creation page. First, verify the you are using the correct subsciption. \n",
"to the \"SSH key\" creation page. First, verify that you are using the correct subscription. \n",
"In the \"Resource group\" window, use the pull down menu to the right and choose the \n",
"\"essentials-RG\" that we created earlier. Under Region, make sure you are in \"(US) East US\". \n",
"Next, in the \"Key pair name\" window enter \"essentials-public-key\". Under the \n",
"\"essentials\" Resource Group that we created earlier. Under Region, make sure you are in \"(US) East US\". \n",
"Next, in the \"Key pair name\" window enter **essentials-public-key**. Under the \n",
"\"SSH public key source\" window, click the pull down menu and choose\"Upload existing public key\". \n",
"In the \"Upload key\" box, paste the key that we cut (copied into the edit buffer) earlier by \n",
"clicking in the box and paste it using the paste command supported by the your OS (i.e \n",
"for mac use command v). Make sure there are no extra white spaces. Click \"Review + create\" \n",
"and after validation click create.\n",
"In the \"Upload key\" box, paste the key that we cut (copied into your clipboard) earlier by \n",
"clicking in the box and paste it using the paste command supported by your OS (i.e \n",
"for mac use command v). Make sure there are no extra white spaces on either end of the \n",
"string. Click \"Review + create\" and after validation click create.\n",
"\n",
"We will use this key when we create a VM."
"We will use this key when we create a VM.\n",
"\n",
"You can now close the cloud shell by clicking on the X in the upper \n",
"right of the cloud shell window."
]
},
{
Expand Down

0 comments on commit cd2a470

Please sign in to comment.