From 5d378a2f0ed6ec4744e0d3b8e916593194fe85be Mon Sep 17 00:00:00 2001 From: Hunter Long Date: Sun, 24 Jun 2018 20:14:32 -0700 Subject: [PATCH] AWS install --- AWS-EC2-Installation.md | 57 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 AWS-EC2-Installation.md diff --git a/AWS-EC2-Installation.md b/AWS-EC2-Installation.md new file mode 100644 index 0000000..94c19d1 --- /dev/null +++ b/AWS-EC2-Installation.md @@ -0,0 +1,57 @@ +# Install on EC2 +Running Statup on the smallest EC2 server is very quick using the AWS AMI Image. + +### Current AMI Image ID: `ami-7be8a103` + +### Create Security Groups +```bash +aws ec2 create-security-group --group-name StatupPublicHTTP --description "Statup HTTP Server on port 80 and 443" +# will response back a Group ID. Copy ID and use it for --group-id below. +aws ec2 authorize-security-group-ingress --group-id sg-7e8b830f --protocol tcp --port 80 --cidr 0.0.0.0/0 +aws ec2 authorize-security-group-ingress --group-id sg-7e8b830f --protocol tcp --port 443 --cidr 0.0.0.0/0 +``` +### Create EC2 without SSL +```bash +aws ec2 run-instances \ + --image-id ami-7be8a103 \ + --count 1 --instance-type t2.nano \ + --key-name MYKEYHERE \ + --security-group-ids sg-7e8b830f +``` +### Create EC2 with Automatic SSL Certification +```bash +wget https://raw.githubusercontent.com/hunterlong/statup/master/servers/ec2-ssl.sh +``` +Edit ec2-ssl.sh and insert your domain you want to use, then run command below. Use the Security Group ID that you used above for --security-group-ids +``` +aws ec2 run-instances \ + --user-data file://ec2-ssl.sh \ + --image-id ami-7be8a103 \ + --count 1 --instance-type t2.nano \ + --key-name MYKEYHERE \ + --security-group-ids sg-7e8b830f +``` + +#### EC2 Server Specs +- t2.nano ($4.60 monthly) +- 8gb SSD Memory +- 0.5gb RAM +- Docker with Docker Compose installed +- Running Statup, NGINX, and Postgres +- boot scripts to automatically clean unused containers. + + +## AWS EC2 (`ami-1f7c3567`) +Running Statup on the smallest EC2 server is very quick using the AWS AMI Image: `ami-1f7c3567`. +``` +aws ec2 run-instances \ + --image-id ami-1f7c3567 \ + --count 1 \ + --instance type t2.micro \ + --region us-west-2 + --key-name \ + --security-group-ids \ + --subnet-id \ + --region +``` +