1.2 KiB
1.2 KiB
ContainerLab on AWS Automation
This project automates the deployment of ContainerLab tools on an AWS EC2 instance using Terraform for infrastructure provisioning and Ansible for software configuration and management.
Project Structure
- Terraform/: Contains Terraform configurations for AWS resources creation.
- Ansible/: Holds the Ansible playbook and roles for installing and configuring ContainerLab.
Prerequisites
- AWS Account
- Terraform installed
- Ansible installed
Usage
Terraform
Navigate to the terraform/ directory:
cd terraform/
Initialize Terraform:
terraform init
Apply the Terraform configuration:
terraform apply
Ansible
After the EC2 instance is up, navigate to the ansible/ directory:
cd ../ansible/
Run the Ansible playbook:
ansible-playbook -i ansible/inventory ansible/install_containerlab.yml -u admin --private-key terraform/tf-key-pair.pem
Customization
- Terraform Variables: Customize your deployment by updating
variables.tf. - Terraform Secret: Configure your AWS access by creating
terraform.tfvars.
License
Distributed under the MIT License. See LICENSE for more information.