IJM deployment - Development environment
Prerequrements
Please check next items before starting deployment:
- You have correct credentials set up
- You have installed
Terraform v0.12
- You have a registered domain, hosted zone and alias
- This is not mandatory. please skip step 12 from deployment procedure in case you don`t have them
- You have access to code or docker images
- You have VPC and subnets set up on your AWS account
- Please note Terraform loads information about subnets based on it`s name.
- You have AWS EC2 Key pair
- Please note that default Availability zone was set to
us-east-1
- Don`t forget to update it and AMI ID
- Please do check and update variables in
variables.tf
and modeles/ijm/variables.tf
- Please don`t forget to update
allowed_input_cidr
as this controls application access by IP addresses
Deployment steps
- From root module - run
terraform init
- From root module - run
terraform plan -target=module.ijm_sg
- From root module - run
terraform apply -target=module.ijm_sg
- From root module - run
terraform plan -target=module.ijm
- From root module - run
terraform apply -target=module.ijm
- From root module - run
terraform plan -target=module.ijm_elb
- From root module - run
terraform apply -target=module.ijm_elb
- Connect to the EC2 instanse from step 3 with SSH key
- Get code with git/zip or pull images from docker registry
- Run
docker-compose up -d
- Run
docker ps
in order to check containers are up
- From AWS Console - Go to
Route 53
-> Hosted Zones
and assign A-type record with ELB form step 5
Checks
- Check application access in your web browser:
- If you skipped step 12, please use the ALB DNS record
- If you executed step 12, please use created A record and port 80
Documentation
You can find full project documentation here