-
Notifications
You must be signed in to change notification settings - Fork 9
Infrastructure
Artem Chubchenko edited this page Feb 11, 2021
·
1 revision
- AWS as a cloud provider
- Terraform Cloud provides remote operations for Terraform
- Terraform HCL infrastructure as code (IaC)
- ECR - storage for all Docker images
- ECS - service for running containers on EC2 instances
- EC2 - instance for running application
- RDS - instance for running a cloud database (PostgreSQL)
- ElastiCache - instance for running a key-value database (Redis)
- ALB - tool for balancing all the requests pushed
- S3 - object service storage
- CloudWatch - storage for logs
- Setup
[Terraform CLI 12.X](https://learn.hashicorp.com/tutorials/terraform/install-cli) - Add next credentials (
REGION,ACCESS_KEY,ACCESS_SECRET_KEY) to~/.aws/credentials~/.aws/config
- Override all
boilerplatename in.terraform - Sign up to Terraform Cloud
-) Create two workspaces
stagingandproduction. In each workspace add terraform variables:DB_PASSWORDDB_USERNAMEAWS_DEFAULT_REGIONAWS_SERCET_ACCESS_KEYAWS_ACCESS_KEY_ID
Attention!
Add your ssh public key to the
.terraform/staging/ssh_keys/boilerplate-api-staging.pub-
.terraform/staging/ssh_keys/boilerplate-api-production.pub. - Move to
.terraform/stagingperformterraform loginterraform init-
terraform applay- to raiseSTAGINGserver
- Move to
.terraform/productionperformterraform loginterraform init-
terraform applayto raisePRODUCTIONserver
- Check AWS resources and terraform state on terraform cloud!
RubyGarage is a leading software development and consulting company in Eastern Europe. Our main expertise includes Ruby and Ruby on Rails, but we successfully employ other technologies to deliver the best results to our clients. Check out our portfolio for even more exciting works!
