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

Commit

Permalink
Merge branch 'main' into aws-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
amanda-tan committed Feb 8, 2022
2 parents 39f2799 + 9bd9e49 commit 3e40447
Show file tree
Hide file tree
Showing 31 changed files with 1,079 additions and 2,056 deletions.
25 changes: 19 additions & 6 deletions Build.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,27 @@ This copies the contents of `content/_build/html/` to `docs/` so GitHub Pages wi

## GCP

Using Jupyter launched from a remote Visual Code Studio session inside GCP Cloud-Shell requires some local settings stored in `local.sh`, use the following as a template replacing the project and email with the proper vaules:
```
gcloud config set account student31@class.internet2.edu
export GOOGLE_CLOUD_PROJECT=just-armor-301114
export DEVSHELL_PROJECT_ID=$GOOGLE_CLOUD_PROJECT
gcloud config set project $GOOGLE_CLOUD_PROJECT
Checkout the project so it is not seen by the students. Run `./scripts/gcp-cloudshell.sh` to open the shell with the agent and ports 8080 and 8081 forwarded and run the following commands (onetime setup). Be sure to check the project and account values.

```bash
git clone git@github.internet2.edu:/CLASS/CLASS-Essentials.git .essentials
cd .essentials/
git checkout -b gcp-dev --track origin/gcp-dev

ACCOUNT=learner@class.internet2.edu
PROJECT=essentials-learner
cat > .essentials/local.sh <<EOF
gcloud config set account $ACCOUNT
export GOOGLE_CLOUD_PROJECT=$PROJECT
export DEVSHELL_PROJECT_ID=$PROJECT
gcloud config set project $PROJECT
EOF
```

Then run the following from your local machine (Make sure to shutdown from the web-gui as ctrl-c is not managed properly):
```bash
./scripts/gcp-cloudshell-jupyter-lab.sh
```
## AWS

Expect that `aws` is installed locally. A ssh-key named 'learner' is required to access the account.
Expand Down
173 changes: 173 additions & 0 deletions LICENSE.md

Large diffs are not rendered by default.

23 changes: 20 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,21 @@
# CLASS-core
Curriculum development for Cloud for Researchers, A Primer
# CLASS-Essentials
This is the repository for the CLASS Essentials Curriculum material for AWS, GCP and Azure.

For development see the [build instructions](Build.md).
# Contribution Workflow
We use a `Feature` branch workflow: each user works on a specific Feature branch associated with a specific cloud provider. The core idea behind the `Feature` Branch Workflow is that all feature development should take place in a dedicated branch instead of the main branch. The Feature branches in this repository currently are `aws-dev`, `gcp-dev`, and `azure-dev`. More information can be found on [this Atlassian page](https://www.atlassian.com/git/tutorials/comparing-workflows/feature-branch-workflow).

Best Practices:
1. Do not edit directly in a branch that you did not create. Use Github issues or pull requests to suggest or request changes.
2. Make pull requests before merging to main.

# Maintainers
[John Hicks](jhicks@internet2.edu)

[Tim Middlekoop](tmiddelkoop@internet2.edu)

[Ananya Ravipati](aravipati@internet2.edu)

[Amanda Tan](atan@internet2.edu)

# License
<a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/"><img alt="Creative Commons License" style="border-width:0" src="https://i.creativecommons.org/l/by-nc-sa/4.0/80x15.png" /></a><br />This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-nc-sa/4.0/">Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License</a>.
145 changes: 97 additions & 48 deletions content/Azure/01_intro_to_cloud_console.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "b6f03192",
"id": "b3a74289",
"metadata": {},
"source": [
"# Introduction to the Azure Cloud Console\n",
Expand All @@ -28,41 +28,40 @@
},
{
"cell_type": "markdown",
"id": "abb35991",
"id": "7ba16e4b",
"metadata": {},
"source": [
"## The Who, What, and Where of the Cloud\n",
"\n",
"Before we get started we must first define, and find, a few key pieces of information about your environment that will be used throughout this lesson. This information is also important to ensure that this information is what you expect, otherwise you may use the wrong account or run or store things in the wrong place. It is important to be clear about these terms as they are often different in other cloud providers. \n",
"\n",
"(need glossary for Azure) We provide a [glossary of Azure terms](glossary.ipynb) for your reference."
"We provide a [glossary of Azure terms](glossary.ipynb) for your reference."
]
},
{
"cell_type": "markdown",
"id": "3e128379",
"id": "b8747e81",
"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",
"\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 4 below).\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",
"\n",
"You are now logged on. Welcome to the first step of your cloud journey!"
"You are now logged in. Welcome to the first step of your cloud journey!"
]
},
{
"cell_type": "markdown",
"id": "90066c19",
"id": "6f9af1ea",
"metadata": {},
"source": [
"### 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",
" * 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",
Expand All @@ -71,66 +70,50 @@
},
{
"cell_type": "markdown",
"id": "160353bd",
"id": "4901d3bb",
"metadata": {},
"source": [
"## Subscriptions\n",
" \n",
"Click on the *Directories & Subscriptions* buttton (#4).\n",
"Verify that you are in the right *Directory and Subscription* (briefly discribe D&S).\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",
"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",
" * What is the *Project ID* of that project?\n",
" * What is the *Project Number* of that project?\n",
" * 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."
]
},
{
"cell_type": "markdown",
"id": "6e3b3cbd",
"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",
" * 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",
"The Navigation Menu (number 1 above) is used to navigate to the various products, which are also sometimes called services.\n"
"If you are currently not using the correct subscription for this lesson, switch to the correct one."
]
},
{
"cell_type": "markdown",
"id": "ed7e581f",
"id": "d2611421",
"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",
"\n",
"The Navigation Menu (often called the hamburger) is used to navigate to the various products, which are also sometimes called services.\n",
"The Navigation Menu (number 1 below) is used to navigate to the various products, which are also called services.\n",
"\n",
"![hamburger-navigation](img/hamburger-navigation.png)\n",
"![hamburger-navigation](images/Azure-services-menu.png)\n",
"\n",
" * Click on a product to navigate the product page\n",
" * You can pin frequently used items on the top of this page by clicking on the pin icon. \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 *Google Compute Engine* in the next Episode. \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",
"\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."
"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"
]
},
{
"cell_type": "markdown",
"id": "4537d270",
"id": "13817be0",
"metadata": {},
"source": [
"## Everything Else\n",
Expand Down Expand Up @@ -160,7 +143,7 @@
},
{
"cell_type": "markdown",
"id": "e94b53e2",
"id": "5ab062d4",
"metadata": {},
"source": [
"## Open a Cloud Shell\n",
Expand All @@ -169,14 +152,80 @@
"\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",
" * Once the Cloud Shell is open, you should see \"Welcome to Azure Cloud Shell\".\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 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": "53d98252",
"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):"
]
},
{
"cell_type": "markdown",
"id": "af178e4d",
"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",
"\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 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",
"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",
"\n",
"The ssh key generation is now complete. This will only happen once for your account. Later during the VM create proces you will be asked to Cut & Paste the public key into a form. "
]
},
{
"cell_type": "markdown",
"id": "e17944ad",
"id": "779c8715",
"metadata": {},
"source": [
"## Exercise\n",
Expand All @@ -197,7 +246,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -211,7 +260,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.8"
"version": "3.9.7"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 3e40447

Please sign in to comment.