Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/aws-dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
tmiddelkoop committed Jan 10, 2022
2 parents b186d21 + b1858a3 commit e6c8348
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 154 deletions.
23 changes: 19 additions & 4 deletions content/AWS/02_intro_to_compute_part1.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "dc57021c",
"metadata": {},
"source": [
"# Introduction to Elastic Cloud Compute (EC2)\n",
"# Introduction to Elastic Cloud Compute (EC2) - Part 1\n",
"\n",
"\n",
"```{admonition} Overview\n",
Expand All @@ -23,6 +23,7 @@
"**Objectives:**\n",
"* Understand the concept of virtual servers.\n",
"* Understand what an Elastic Cloud Compute (EC2) instance is.\n",
"* Understand how to launch an EC2 instance. \n",
"\n",
"```"
]
Expand Down Expand Up @@ -124,7 +125,7 @@
"Select ```Next: Configure Instance Details```.\n",
"\n",
"## Step 3: Configure Instance Details\n",
"Step 3 in creating an EC2 instance involves a rudimentary understanding of several key AWS and cloud jargon (Figure 4). While delving deeper into some of the terminology is outside of the scope of CLASS Essentials, we go will through these terms in brief as we learn how to configure your EC2 instance. \n",
"Step 3 in creating an EC2 instance involves a rudimentary understanding of several key AWS and cloud jargon (Figure 4). While delving deeper into some of the terminology is outside of the scope of CLASS Essentials, we go will through these terms in brief as we learn how to configure your EC2 instance. For the most part, we will **leave the settings as default**. CLASS Intermediate offers a more in depth discussion on cloud concepts. \n",
"\n",
"![Configure Instance Details](images/ec2-configure.png)\n",
"\n",
Expand All @@ -150,11 +151,25 @@
"* How do Spot Instances help you optimize costs?\n",
"````"
]
},
{
"cell_type": "markdown",
"id": "1b8642f4",
"metadata": {},
"source": []
},
{
"cell_type": "code",
"execution_count": null,
"id": "fff35db8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -168,7 +183,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
96 changes: 40 additions & 56 deletions content/AWS/03_intro_to_compute_part2.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"id": "dc57021c",
"metadata": {},
"source": [
"# Instance Storage, Tags & Security Groups\n",
"# Introduction to Elastic Cloud Compute (EC2) - Part 2\n",
"\n",
"\n",
"```{admonition} Overview\n",
Expand All @@ -16,13 +16,14 @@
"**Exercises:** 10 mins\n",
"\n",
"**Questions:**\n",
"* What is an EC2 instance?\n",
"* When would I use an EC2 instance?\n",
"* How do I launch an EC2 instance?\n",
"* How do I allocate storage to an instance?\n",
"* Why should I attached tags to an instance?\n",
"* What are security groups?\n",
"\n",
"**Objectives:**\n",
"* Understand the concept of virtual servers.\n",
"* Understand the concept of storage, tags and security groups.\n",
"* Understand what an Elastic Cloud Compute (EC2) instance is.\n",
"* Understand how to launch an EC2 instance. \n",
"\n",
"```"
]
Expand All @@ -32,32 +33,8 @@
"id": "502f2360",
"metadata": {},
"source": [
"Recall that the two fundamental components of cloud computing is compute and storage. On AWS, a \"virtual server\" or \"virtual computer\" is known as an **Elastic Cloud Compute (EC2) instance**; sometimes it's called \"EC2\", sometimes it's called an \"instance\" to denote that the ability to build and terminate this server instantaneously, but they all mean the same thing. An EC2 instance is no different from a server that sits under your desk, or your local departmental cluster, or even your local HPC cluster. You even boot up an EC2 instance through the web console, install software and then shut down your instance just like you would a real computer, except that Amazon takes care of the physical machinery while you are in charge of process of creating the computer. In some sense, you can think of utilizing an EC2 instance as renting a server or computer from Amazon! \n",
"In the previous lesson we learned how to launch a virtual machine from the AWS console. We selected an Amazon Machine Image (AMI), Chose an Instance and Configured Launch Settings. Recall that there are 7 steps to walk through to create a new EC2 instance; we will go through each in detail: \n",
"\n",
"In cloud jargon, the term **elasticity** denotes the ability to quickly expand or decrease computer processing, memory, and storage resources to meet changing demands. In that way, you can expand the size of your CPU, RAM and disk size on your EC2 instance almost instantenously. Since EC2 forms the backbone of most of AWS's core infrastructure, it is an important part of your cloud journey. \n",
" \n",
"\n",
"Let's walk through some of the steps on getting an EC2 instance up and running. \n"
]
},
{
"cell_type": "markdown",
"id": "bc5d082d",
"metadata": {},
"source": [
"We begin with the AWS console again. Under the \"Build a Solution\" panel, select `Launch a Virtual Machine`\n",
"\n",
"![Figure 1: Start page for the AWS console](images/console_ec2.png)\n",
"\n",
"This will then lead you through a series of steps to get a **Free Tier** EC2 instance up and running. \n",
"\n",
"```{admonition} Note\n",
":class: note\n",
"\n",
"AWS Free Tier refers to several of the services that AWS offers to help users gain more hands on experience on the AWS platform without being charged. [Click here](https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&all-free-tier.sort-order=asc&awsf.Free%20Tier%20Types=*all&awsf.Free%20Tier%20Categories=*all) for more info about the AWS Free Tier [external link] . \n",
"```\n",
"\n",
"There are 7 steps to walk through to create a new EC2 instance; we will go through each in detail: \n",
"1. Select an AMI\n",
"2. Choose Instance Type\n",
"3. Configure Instance \n",
Expand All @@ -72,56 +49,63 @@
"id": "b9809503",
"metadata": {},
"source": [
"## 1. Select an AMI\n",
"\n",
"An Amazon Machine Image (AMI) is a template that Amazon uses to describe the operating system, disk type and all the software configuration that is needed to make sure a computer runs smoothly. Imagine that you are purchasing a new laptop; fresh out of the box, the laptop is pre-configured with an operating system (e.g. Windows, Mac OS, Ubuntu etc.), configuration files that tells the laptop what peripherals are attached, and pre-installed software like Adobe PDF reader. An AMI contains all this information so that your EC2 instance runs exactly like it would a new laptop out of the box! There is much more to learn about AMIs and how they can used for collaboration and data sharing but that is not within the scope of CLASS Essentials. \n",
"\n",
"As you scroll through the AMI list shown below you will notice that the list contains offerings from various vendors (e.g. Amazon, RedHat, Windows, etc.). We will be choosing the Ubuntu operating system for flexibility and versatility (can be used outside of the AWS ecosystem). \n",
"\n",
"To list all the Free Tier AMIs, check the box on the right that says ```Free tier only```.\n",
"## Step 4. Add Storage\n",
"\n",
"![Step 1 - Select an AMI - Free Tier Only](images/ec2-ami.png)\n",
"Storage on an EC2 instance is akin to a hard drive. Here we will leave the default settings but it is important to know that a hard drive on an EC2 instance is known as [Elastic Block Storage](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AmazonEBS.html). EBS volumes behave like raw, unformatted block devices.\n",
"\n",
"Scroll to ```Ubuntu Server 20.04 LTS(HVM), SSD Volume Type``` shown below. Select ```64-bit(x86)```. \n",
"\n",
"![Step 1 - Select an AMI - Operating System Selection](images/ec2-ubuntu.png)"
"<img src=\"./images/ec2-storage.png\" width=720 align=\"center\">"
]
},
{
"cell_type": "markdown",
"id": "17597535",
"metadata": {},
"source": [
"## Step 2: Choose an Instance Type\n",
"\n",
"Choosing an instance type is choosing the hardware for your computing system: you get to pick the number of CPUs and memory size for your instance. \n",
"## Step 5: Add Tags\n",
"\n",
"Instance types are group by [**families**](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-types.html) and denotes whether, for example, an instance is optimized for batch processing (compute-optimized, C-family), optimized for databases (memory-optimized, R-family) or has accelerated hardware (GPUs) for AI or Machine Learning pipelines. \n",
"[Tags](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/Using_Tags.html) are labels that you assign to an AWS resource. Each tag consists of a key and an optional value, both of which you define.Tags enable you to categorize your AWS resources in different ways, for example, by purpose, owner, or environment. e\n",
"\n",
"When you choose an Instance Type (Figure 3), the screen show additional information about the selected instance type including the number of CPUs, the memory size, the type of storage and information about networking. \n",
"<img src=\"./images/ec2-tags.png\" width=720 align=\"center\">\n"
]
},
{
"cell_type": "markdown",
"id": "4ee655a3",
"metadata": {},
"source": [
"## Step 6: Configure Security Group\n",
"\n",
"In the Instance Storage (GB) column, you will notice a term called **EBS**. EBS is the acronym for **Elastic Block Storage** and is analogous to the hard disk or boot drive on your personal computer or laptop. More details about EBS and different kinds of disk storage on EC2 instances are beyond the scope of CLASS Essentials. \n",
"A [security group](https://docs.aws.amazon.com/vpc/latest/userguide/VPC_SecurityGroups.html) acts as a virtual firewall for your EC2 instances to control inbound and outbound traffic. Again, we will not delve too much into networking protocols in CLASS Essentials. We will leave the default values of opening port 22 so that we can securely log in to the EC2 instance that we create. \n",
"\n",
"```{admonition} Note\n",
":class: note\n",
"The four most common types of storage you will encounter on AWS are: Elastic Block Storage (EBS), Elastic File Storage (EFS), Simple Storage Service (s3) and s3 Glacier. In the simplest terms, EBS is analogous to a computer hard drive and EFS is analogous to a network file system (NFS) or shared file system. s3 is AWS's object storage which is discussed [here](05_intro_to_cloud_storage). s3 Glacier is a cost-effective way of storing s3 files that you do not need to access frequently. \n",
"```\n"
"<img src=\"./images/ec2-sg.png\" width=720 align=\"center\">"
]
},
{
"cell_type": "markdown",
"id": "4ee655a3",
"id": "5235bac7",
"metadata": {},
"source": [
"![Step 2 - Choose an Instance Type](images/ec2-type.png)\n",
"## Step 7: Review Instance Launch\n",
"\n",
"<img src=\"./images/ec2-launch.png\" width=720 align=\"center\">\n",
"\n",
"<img src=\"./images/ec2-sshkey.png\" width=720 align=\"center\">\n",
"\n",
"Select ```Next: Configure Instance Details``` and we'll move on to the next chapter. "
"<img src=\"./images/ec2-confirm.png\" width=720 align=\"center\">"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "113ba95a",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
Expand All @@ -135,7 +119,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.10"
"version": "3.9.5"
}
},
"nbformat": 4,
Expand Down
47 changes: 0 additions & 47 deletions content/AWS/04_intro_to_cli.ipynb

This file was deleted.

47 changes: 0 additions & 47 deletions content/AWS/05_intro_to_cloud_storage.ipynb

This file was deleted.

0 comments on commit e6c8348

Please sign in to comment.