In order to the build process, you have to have these tools installed:
- AWS CLI (with at least default profile configured)
- git
- Terraform
- nodejs
- cdktf
- Docker
(I'll skip aws cli and git as a most obvious ones)
For that example, I used Amazon Linux, but for other os, find instructions here https://learn.hashicorp.com/tutorials/terraform/install-cli
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://rpm.releases.hashicorp.com/AmazonLinux/hashicorp.repo
sudo yum -y install terraform
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
node -e "console.log('Running Node.js ' + process.version)"
npm install --global cdktf-cli@latest
sudo yum install docker -y
sudo systemctl start docker.service
Note: Make sure you can run sudo docker <cdm>
without request for sudo password!
Note - main code entrypoint is main.ts
Check with Prerequisites section, if everything is in order, run the following script:
./startScript.sh
then - select Approve
As outputs you'll get next details:
- ALB endpoint
- pgAdmin username
- pgAdmin password
To destroy the stack, run the following script:
./destroyScript.sh