How techiescamp/devops-projects works
Project Type and Purpose
• Notice that each top-level directory (e.g., “01-jenkins-setup”, “02-consul-sevice-discovery”, “03-scalable-java-app”, etc.) represents a stand-alone project. Each project is focused on provisioning and automating different infrastructure elements using technologies such as Ansible, Terraform, Packer, Docker-Compose, etc.
• For example, “01-jenkins-setup” focuses on building a High-Availability Jenkins infrastructure that includes controller and agent setup, “02-consul-sevice-discovery” demonstrates setting up Consul-based service discovery (plus load balancing), and “03-scalable-java-app” covers a scalable app deployment with CI/CD (Jenkinsfile) integration.
File Structure and Architectural Choices
• Each project directory is structured with clear separation between automation scripts (Ansible), infrastructure provisioning (Terraform), and image building (Packer files for Jenkins, Java app, or Prometheus components).
• In “01-jenkins-setup”, for example, the “ansible” folder includes roles for different components (controller and agent), while the “terraform” folder is broken down into modules (ec2, efs, iam, lb-asg). Similar separation is seen in other project directories.
• The projects use templating (Jinja2 templates in Ansible roles) and configuration modules to define infrastructure resources consistently. This hints at a modular design philosophy.
Main Components and Their Interactions
○ Jenkins Controller: Represented by its Packer build file (jenkins-controller.pkr.hcl) and Ansible playbooks/roles (jenkins-controller tasks and templates).
○ Jenkins Agent: Shown with its respective Packer file, Ansible roles (including tasks for Java, SSH, and tools installation), and connectivity to the controller.
○ Infrastructure Provisioning: Terraform modules for EC2 (instances), EFS (file storage), IAM (permissions), and LB-ASG (load balancer and autoscaling group). These modules indicate the AWS resources provisioned to support Jenkins.
○ Automation Tools: Ansible (used for configuration management and installation tasks) and Packer (for creating application machine images).
• For “02-consul-sevice-discovery”:
○ Consul Server: Deployed via Ansible roles with its configuration templates.
○ Backends and Load Balancer: Represented through additional roles and templating, including Nginx configurations.
○ Terraform provisioning: A more straightforward Terraform file (provision.tf, variable.tf) for resource creation.
• Similarly, for “03-scalable-java-app”, add elements for:
○ The Java Application itself.
○ The Jenkins pipeline (Jenkinsfile) that automates builds and deployments.
○ Integration with AWS RDS and ALB/ASG infrastructure (illustrated by Terraform modules).
Important Architectural Patterns and Design Principles
• Modularity: Each service or component (controller, agent, load balancer, database, etc.) is encapsulated in its own Terraform module or Ansible role.
• Automation and IaC (Infrastructure-as-Code): The heavy use of Terraform and Ansible indicates a design centered on reproducibility and automated deployments.
• Template Driven Configuration: Use of templating (Jinja2 .j2 files) indicates dynamic configuration management based on environment variables or parameters.
• Scalability & High-Availability: Projects like “01-jenkins-setup” and “03-scalable-java-app” emphasize HA (via autoscaling groups and load balancers) and separation of concerns (controller vs. agent, web app vs. database layers).
Technologies, Frameworks, and Tools to Highlight
• Ansible: For configuration management and automation scripts.
• Terraform: For provisioning AWS resources (EC2, EFS, IAM, VPCs, ALB/ASG, RDS, etc.)
• Packer: For creating machine images used by Jenkins and other services.
• Docker Compose: In “04-prometheus-observability-stack”, which uses Docker for container orchestration of Prometheus and Alertmanager.
• Various templates and configuration management practices using Jinja2.
Specific Elements
• External services such as DNS, external APIs, or monitoring systems (e.g., Prometheus, Grafana) as needed.