This is my submission for the test. This project automates infrastructure provisioning and remote deployment using Terraform and shell scripts.
- Provision EC2 instances using Terraform
- SSH key-based authentication
- Remote provisioning with shell scripts
- Dynamic environment setup
- Clean separation of infrastructure and app logic
autodeploy-bot/
deployments/ # Terraform configurations
main.tf
variables.tf
scripts/ # Shell scripts for remote execution
deploy.sh
.gitignore
requirement.txt # Python dependencies (if any)
README.md
git clone https://github.com/Jainparas99/autodeploy-bot.git cd autodeploy-bot
python3 -m venv .venv source .venv/bin/activate
pip install -r requirement.txt
Make sure you’ve set your AWS credentials either in ~/.aws/credentials or by exporting them:
export AWS_ACCESS_KEY_ID=your_access_key export AWS_SECRET_ACCESS_KEY=your_secret_key
cd deployments terraform init
terraform apply
This will provision the infrastructure and run remote scripts as defined in your provisioners.
python3 main.py "Deploy this flask app on AWS" --repo https://github.com/Arvo-AI/hello_world
aws_access_key = "YOUR_ACCESS_KEY" aws_secret_key = "YOUR_SECRET_KEY" key_name = "your-ec2-keypair-name" private_key_path = "/key path" ami_id = "ami-xxxxxxxxxxxxxxxxx"
Paras Jain
GitHub: https://github.com/Jainparas99