Going to the Cloud

Session Overview

  • Becoming Cloud Native
  • AWS Cloud Shell
  • AWS Cloud9

Becoming Cloud Native

Cloud Native: Doing everything you could do on your local machine but better, faster, and much, much more on the Cloud.


Requires a paradigm shift to connecting services, not lift and shifting servers.

AWS Cloud Shell

Your Portal to the Cloud!

  1. Log on via SSO and Open the Management Console
  2. Select the Terminal/CloudShell button near the top right.

Session Overview

  • What is Coder
  • Setting up your Coder Instances
  • Using Coder

What is Coder?

  • Manages EC2 instances for you.

These Instances are: * YOUR development environment in the Cloud * Linux box where you are admin * Preconfigured with lots of Goodies! * Git * Docker * AWS CLI * Python * Networking

Diving into Coder

  1. Log into http://esds.ncics.org

Create another Coder Environment

  • Name: esds--module-2
  • Disk Size: 100GB
  • Instance Type: 4 vCPUs, 16 GB RAM
  • Region: US East (N. Virginia)

Coder Walk Through…

Using EC2 Instances

For fun:

Create a new directory, isntall the python speedtest-cli tool using UV, and run the speedtest.


What internet speed are you getting?

Using EC2 Instances

mkdir speedtest
cd speedtest
uv init
uv add speedtest-cli
source .venv/bin/activate
speedtest-cli

AWS Credentials

Installing the AWS CLI.

sudo snap install aws-cli --classic


Let’s try looking at S3 Buckets.

aws s3 ls


What about the credentials?

AWS Credentials

  1. Log into AWS SSO

  2. View the NCICS-DEV Account

  3. Find the AWS CLI Credentials

  4. Add to ~/.aws/credentials.

  5. Try out the AWS CLI again

Using Cloud9 | Jupyter Lab

For more fun, let’s launch Jupyter Lab!

Jupyter Stack

docker run -it \
  --rm -p 8080:8888 \
  -v "${PWD}":/home/jovyan/work \
  jupyter/datascience-notebook \
  jupyter lab --ip 0.0.0.0 --NotebookApp.token=''  

Note, we are:

  • Allocating psuedo-TTY with -it
  • Making it ephemeral with --rm
  • Mapping port 8080 on the instance to container port 8888 with -p
  • Mounting local working directory to working directory in container with -v
  • Using Jupyter’s datascience-notebook
  • Telling Jupyter that we can log into its server instance without a passtoken

Connecting to Jupyter Lab

  1. Go back to the Coder Workspace Page

  2. Locate the appropriate port (8080)

  3. Click on the Port Number

  4. Your Jupyter Lab instance should pop up in a new browser tab.

Congratulations!

You are well on your way to being Cloud Native!