-
Create an EC2 instance using the AMI (Team 5 Food Insight AMI)
-
SSH into the “ec2-user” account on the EC2 instance
-
Run
aws configureto login to your aws account from this instance using a security key pair if you do not already have a key pair follow these instructions to create new ones. -
Run
git clone git@github.com:SWEN-514-FALL-2024/term-project-2241-swen-514-05-team5.git -
Run
cd term-project-2241-swen-514-05-team5/ -
Run
git checkout <branch/commit>(This should be changed to a working commit tag on main that we want to grade instead of latest) -
If you are a developer at this point you can switch to your branch to test that branch instead
-
Run
cd deployment -
Use Vim/vi/nano or your text editor of choice to change the security key and github token to match your account's security key and your github access token in
terraform.tfvars -
Run
terraform init -
Run
terraform plan -
Run
terraform apply -
Enter "yes" to allow terraform to launch the new instance
-
To shutdown the instance started by terraform run
terraform destroy
To get the necessary key and secret after running aws configure in the ec2 instance
-
Run
aws configurein ec2 instance, if you do not have the credentials do the following -
Go to IAM console
-
Click "Create User"
- Provide a name, Hit "Next"
- Attach policies directly and choose "AdministratorAccess", then hit "Next"
- "Create User"
- Select Newly Created User
- Go to Security Credentials. Hit "Create access key"
- Select "Command Line Interface (CLI)", Confirm confirmation, hit "Next"
- Enter a description and hit "Create Access Key"
- Save the access key and secret access key in very very safe place or download csv. The key and secret key is what you will use as answers to the prompt after running aws configure in the ec2 instance.








