-
create.sh
- use ssh key to deploy server into Public Subnets, helps with troubleshooting.
-
network-infrastructure.yml
network-parameters.json
- contains network resources to be deployed
- includes VPC, two pairs of public and private subnets, Internet Gateway, NAT Gateways and Routing Tables for public and private subnets with associations
-
server-infrastructure.yml
server-parameters.json
- contains app resources to be deployed
- includes Application services. In particular, Load Balancer, web servers and corresponding autoscaling, target and security groups.
-
update.sh
- stack updates
- Bastion hosts (Optional). EC2 instances for troubleshooting of application web servers.
- TODO
Use AWS console or AWS ClI to create:
- an IAM profile and AMI Role
- security Key pair for your Instance.
- an EC2 Instance to connect its public DNS to your keypair
- s3 bucket - to downloading the application archive
Configure security groups:
- inbound port open at
Http Port:80
to use it with Load balancer and Load balancer health checks - allow all public traffic
(0.0.0.0/0)
onport:80
inbound - outbound default
HTTP port:80
to reach internal servers.
Deploy network
Infrastructure:
- Run: the shell script
create.sh
using EC2 instance public DNS
- create network infrastructure cloudformation stacks:
- Run:
./create.sh networkinfrastructure network-infrastructure.yml network-parameters.json
Deploying servers
Infrastructure:
- Run: the shell script
create.sh
using EC2 instance public DNS
- create servers infrastructure cloudformation stacks:
- Run:
./create.sh serverinfrastructure server-infrastructure.yml server-parameters.json
Check cloud formation stack creation status:
- Run the shell script
create.sh
using EC2 instance public DNS
- Run:
aws cloudformation list-stacks --stack-status-filter CREATE_COMPLETE
Update Infrastructure Cloud Formation stack:
- Run the shell script
update.sh
using EC2 instance public DNS
- update network infrastructure cloudformation stacks:
- Run:
./update.sh networkinfrastructure network-infrastructure.yml network-parameters.json
Update Infrastructure Cloud Formation stack:
- Run the shell script
update.sh
using EC2 instance public DNS
- update server infrastructure cloudformation stacks:
- Run:
./update.sh serverinfrastructure server-infrastructure.yml server-parameters.json
Access Application with LoadBalancer public DNS url: Udagram.