Skip to content

Latest commit

 

History

History
89 lines (58 loc) · 5.21 KB

cloud_readme.md

File metadata and controls

89 lines (58 loc) · 5.21 KB

AWS Setup Instructions

For performance testing, you will need to run this assignment on a VM instance on Amazon Web Services (AWS). We'll be providing (or have already sent) you student coupons that you can use for billing purposes. Here are the steps for how to get setup for running on AWS.

Note

Please don't forget to SHUT DOWN your instances when you're done for the day to avoid burning through credits overnight!

Creating a VM

  1. Now you're ready to create a VM instance. Log in to the AWS EC2 dashboard for the us-west-2 region and click on the button that says Launch instance. Launch instance

Tip

It is recommended to do most of your development locally / on myth, and only use your AWS machine for performance tuning.

  1. Choose the Ubuntu Server 24.04 LTS (HVM), SSD Volume Type AMI: AMI

  2. Choose the c7g.4xlarge instance type. Instance type

Tip

If you find that you really need to experiment on an AWS machine after developing most of your code on myth or locally, use a c7g.xlarge instance (which offers 4 CPU cores and is more cost-effective).

Important

c7g.4xlarge instances cost $0.58 / hour, so leaving one running for a whole day will consume $13.92 worth of your AWS coupon. Remember to shut off the instance when you're not using it!

  1. Change the size of the volume to 64 GB to accomodate the packages we will need to install to make the instance functional for the assignment: Storage

  2. You will need a key pair to access your instance. In Key pair (login) section, click Create a new key pair and give it whatever name you'd like. This will download a keyfile to your computer called <key_name>.pem which you will use to login to the VM instance you are about to create. Finally, you can launch your instance. Key Pair Step 1 Key Pair Step 2

  3. Confirm all details and lunch instance
    Lunch instance

  4. Now that you've created your VM, you should be able to SSH into it. You need the public IPv4 DNS name to SSH into it, which you can find by navigating to your instance's page and then clicking the Connect button, followed by selecting the SSH tab (note, it may take a moment for the instance to startup and be assigned an IP address): Connect

Make sure you follow the instructions to change the permissions of your key file by running chmod 400 path/to/key_name.pem. Once you have the IP address, you can login to the instance by running this command:

ssh -i path/to/key_name.pem ubuntu@<public_dns_name>

Warning

If you need to step away during setup after creating your instance, be sure to shut it down. Leaving it running could deplete your credits, and you may incur additional costs.

Setting up the VM environment

  1. Once you SSH into your VM instance, you'll want to install whatever software you need to make the machine a useful development environment for you. For example we recommend:
sudo apt update
sudo apt install make g++ python3 # Required
sudo apt install vim
  1. Download starter code to your local computer, initiate your Git (or another VCS of your choice) repo and be sure to keep it in private, then clone your repo on the VM.

Fetching your code from AWS

You can retrieve files on your VM by running the following if needed:

scp -i path/to/key_name.pem ubuntu@<public_dns_name>:/path/to/file /path/to/local_file

You are highly encouraged to keep your code version controlled and accessible through VSC on your local computer. It's not a good practice to use scp for code transferring.

Stopping the VM

  1. You can stop the VM by navigating to the instance page, clicking "Instance state", and then selecting "Stop instance". Stop instance

Note that terminating the instance will delete the instance and all associated files. Instances can be stopped in the AWS web console or by running sudo shutdown -P now while logged in.

If you're confused about any of the steps, having problems with setting up your account or have any additional questions, reach out to us on Ed!

Caution

For one last time, please DO NOT FORGET TO SHUT OFF THE INSTANCE WHEN UNUSED.

We may not be able to provide additional AWS credits / reimburse any cost if you go over allocated credits for any reason.

Performance leaderboard

We may release a leaderboard for you to submit your code to which will compare the top-performing solutions. For assignment 2 this will just be for fun, but stay tuned for more updates on Ed!