MLH-Fellowship / cinder-benchmarks

Cinder is Meta's internal performance-oriented production version of CPython.
https://trycinder.com
Other
0 stars 0 forks source link

Update workflow to provision an EC2 instance using Terraform #10

Open emilyllim opened 1 year ago

emilyllim commented 1 year ago

Overview

This issue will include an overview of how to use GitHub Actions to automate provisioning an AWS EC2 instance using Terraform.

Resources

emilyllim commented 1 year ago

Changes related to this issue are committed to pull request #7

emilyllim commented 1 year ago

SSH into provisioned EC2 instance

In an attempt to SSH into the instance provisioned by Terraform, I discovered that additional information must be added to the Terraform configuration file.

ISSUE: I could not SSH into the instance because there was no associated key pair created when the instance was provisioned

Resources

emilyllim commented 1 year ago

ERROR MESSAGE:

sign_and_send_pubkey: no mutual signature supported
[instance-user-name@instance-public-dns-name]: Permission denied (publickey).

To address this issue of being unable to SSH to the instance, I tried these steps:

Unfortunately, it seems that this method is not recommended for security reasons, so as a better approach, I added a new key pair using ed25519 instead of rsa

Resources

emilyllim commented 1 year ago

The next thing I tried to do was update the Terraform configuration file:

I went back to the previous (deprecated?) method of creating an rsa key pair, and adding the previous rsa config, and then running terraform apply. SSH'ing still works this way.