Setup up your Mac

· 3 min read
cloud genius workstation

Our programs are collaborative hands-on experiences that help you comprehend concepts and guide you in trying out many of the latest tools, techniques, environments, and resources used by professionals managing production-grade cloud deployments for corporations, governments, and not-for-profit organizations. This lesson will walk you through the steps to get your workstation ready for the explorations to come.

macOS users: Cloud Genius Workstation in AWS Cloud

Please use zsh not bash

macOS default terminal uses zsh so let us stick to it since Apple expects everyone to use by default.

Windows users: Skip since you already completed previous step.

Setup Cloud Genius Workstation in the AWS cloud FREE TIER.

https://aws.amazon.com/free

Start the terminal and setup homebrew

https://brew.sh if you haven't already.

$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

update brew

if you have https://brew.sh already

$ brew update

Start the terminal and run these steps

This would install just the bare minimum things needed on your mac to connect to Cloud Genius workstation in the AWS cloud.

$ bash <(curl -s https://s3-us-west-2.amazonaws.com/cloudgeniuscode/install.sh)

This step installs awscli@1, jq, wget, visual-studio-code, ms-vscode-remote.remote-ssh, and related settings.

Please work in OREGON region in AWS

Create Company Keypair with AWS Free Tier https://aws.amazon.com/free

This account gives you access to a micro sized machine for 12 months for free. AWS calls it AWS Access Key and Secret but I like to call it Company Keys.

I like to call it a Company Keypair because this pair lets you access the AWS cloud company resources programmatically.

Read this AWS blog post on how to quickly find your access and secret keys from AWS.

https://aws.amazon.com/blogs/security/how-to-find-update-access-keys-password-mfa-aws-management-console#attachment_9874

Do not share your AWS Access Key and Secret Access Key with anyone.

Create credentials Access Key and Secret from AWS and make a note of those for use in the next step.

Restart terminal

$ exec $SHELL

Configure awscli with AWS credentials

$ aws configure

Provide the values for access and secret key, and select us-west-2 as your region.

aws configure
AWS Access Key ID [None]: ****************IHHI
AWS Secret Access Key [None]: ****************EnKa
Default region name [None]: us-west-2
Default output format [None]:

This step preserves your credentials in ~/.aws folder.

Setup a Machine keypair and a Security Group for the Cloud Genius Workstation

A Machine keypair is typically known as an RSA keypair.

I prefer to call it a Machine keypair because they let you access machines in any cloud you set up.

$ bash <(curl -s https://s3-us-west-2.amazonaws.com/cloudgeniuscode/keypair-and-sg.sh)

Create Cloud Genius Workstation in the AWS Cloud

$ bash <(curl -s https://s3-us-west-2.amazonaws.com/cloudgeniuscode/create-instance.sh)

This creates a file named config and saves in ~/.ssh That lets you use VScode to connect to the Cloud Genius Workstation in the AWS Cloud

Now you can use VScode to connect to the Cloud Genius Workstation in the AWS Cloud

Note that the 28 GiB EBS SSD disk /dev/sda1 is mounted at / mountpoint

28GiB Gibibyte is approximately equal to 30GB Gigabyte.

Read more about the details of binary (Gibibyte) and decimal (Gigabyte) measurements of disk size.
https://en.wikipedia.org/wiki/Gigabyte

ubuntu@CloudGenius:~$ df -H
Filesystem      Size  Used Avail Use% Mounted on
/dev/root        30G  3.0G   27G  11% /
devtmpfs        492M     0  492M   0% /dev
tmpfs           498M     0  498M   0% /dev/shm
tmpfs           100M  852k   99M   1% /run
tmpfs           5.3M     0  5.3M   0% /run/lock
tmpfs           498M     0  498M   0% /sys/fs/cgroup
/dev/loop0       27M   27M     0 100% /snap/amazon-ssm-agent/4046
/dev/loop1       65M   65M     0 100% /snap/core20/1081
/dev/loop3       34M   34M     0 100% /snap/snapd/13170
/dev/loop2       59M   59M     0 100% /snap/core18/2128
/dev/loop4       71M   71M     0 100% /snap/lxd/21545
tmpfs           100M     0  100M   0% /run/user/1000

Get a bigger size machine LATER.

NOT TODAY but when later you need more RAM for certain exercises in the future.

$ bash <(curl -s https://s3-us-west-2.amazonaws.com/cloudgeniuscode/create-bigger-instance.sh)