AWS install

master
Hunter Long 2018-06-24 20:14:32 -07:00
commit 5d378a2f0e
1 changed files with 57 additions and 0 deletions

57
AWS-EC2-Installation.md Normal file

@ -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 <key name> \
--security-group-ids <your security group id here> \
--subnet-id <your subnet id here> \
--region <your region here>
```