AWS EC2 Linux Cloud VM Setup - RobokopU24/qgraph GitHub Wiki
- Login to AWS Management Console
- Click on EC2 service
- "Launch instance"
- I choose "Amazon Linux 2 AMI (HVM), SSD Volume Type : 64-bit (x86). We don't need anything extra really.
- I chose t3.medium. 4G RAM, 2 CPUs, EBS (Elastic Block Store) for persistent storage
- On-demand pricing seems to be the cheapest
- Extra storage: 64 gigs of general purpose SSD (gp2)
- When creating the instance, make a keypair for SSH access
- You need to change the pem file permissions:
chmod 400 <pathtopemfile> - To SSH:
ssh -i <pathtopemfile> ec2-user@<ipaddress>
- You need to change the pem file permissions:
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
sudo yum update -ysudo amazon-linux-extras install dockersudo service docker startsudo usermod -aG docker ec2-user- log out and then back in to check that docker is set up successfully
docker info
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose- Change permissions so we can run it:
sudo chmod +x /usr/local/bin/docker-compose
- If you didn't run the docker commands yet:
sudo yum update -y sudo yum install git -y
git clone https://github.com/NCATS-Gamma/qgraph.gitcd qgraphdocker-compose -f docker-compose.base.yml -f docker-compose.dev.yml up --build- Back in AWS, go to main instance page, click on the security tab, and click on the security groups list item
- Down in inbound rules, click on "Edit inbound rules"
- Click "Add rule" and choose "HTTP", source "Anywhere"
- Click "Save rules"