Wiki › Project
Node.js service on EC2 with IaC
Article
ReadAll pages
From Chaipat's knowledge graph
Node.js service on EC2 with IaC solves roadmap.sh's Node.js deployment challenge. It combines two infrastructure tools: Terraform creates the server, and Ansible configures it and deploys the app.
Layers
- Infrastructure (
infra): Terraform creates an EC2 instance on AWS EC2 and restricts SSH to known addresses. - Configuration (
ansible): roles and playbooks install Node.js, deploy the service and run it, using Jinja2 templates for its configuration. - Delivery (
.github/workflows): a GitHub Actions workflow redeploys the service on every push.
A Makefile ties the three together, with targets for Terraform, Ansible and connecting over SSH.