How devopsprojects05/devsecops-end-to-end-project works
Project type and purpose
• This is an End-to-End DevSecOps reference implementation. It bundles:
• A small Node.js web application
• A Jenkins-centric CI/CD pipeline
• Infrastructure-as-Code (Terraform)
• Configuration management (Ansible)
• Security tooling (SonarQube, Trivy, TFSec, Snyk)
• Secrets management (HashiCorp Vault)
• Artifact management (Nexus)
• Observability & monitoring (OpenTelemetry Collector, Prometheus, Grafana)
File structure
• Top-level:
• Jenkinsfile/Jenkinsfile – pipeline definition
• terraform/ – sets up EC2 and other cloud resources
• ansible/ – playbook to configure or deploy the app
• src/ – Node.js app, Dockerfile, OpenTelemetry config, test suite
• Prometheus/prometheus.yaml – monitoring scrape config
• Patterns:
• “src” contains the application (MVC-style Node.js server.js + public/)
• “terraform” for provisioning
• “ansible” for post-provisioning configuration
• A single EC2 instance running Jenkins plus multiple tool containers
Key insights from the README
• All DevSecOps tools are co-hosted on the Jenkins server to cut costs
• The pipeline:
1. Checks out code
2. Builds and tests (Jest, SonarQube, Snyk)
3. Lints and scans infrastructure (TFSec)
4. Builds Docker image and scans with Trivy
5. Pushes image to Nexus or Docker registry
6. Provisions infra via Terraform
7. Deploys application via Ansible
8. Monitors runtime with Prometheus/Grafana and traces via OpenTelemetry
a. Main components
• CI/CD Server (Jenkins)
• Source Control (GitHub)
• Build & Test Tools (Jest, SonarQube, Snyk)
• IaC Provisioning (Terraform)
• Configuration Management (Ansible)
• Container Registry (Nexus or Docker Hub)
• Secrets Manager (Vault)
• Application (Node.js) in Docker
• Observability: OTel Collector, Prometheus, Grafana
• Notification channel (Slack)
b. Relationships & interactions
• Developer commits → GitHub → Jenkins pipeline triggers
• Jenkins orchestrates:
• SonarQube scanner
• Snyk & Jest tests
• Terraform plan/apply
• Docker build & Trivy scan → push to Nexus
• Ansible deployment to target VM/container
• Node.js app emits traces/metrics → OTel Collector → Prometheus
• Scanner outputs (Trivy, TFSec) → custom metrics → Prometheus
• Grafana queries Prometheus → dashboards
• Alerts from Grafana → Slack
• Jenkins and Ansible pull secrets from Vault via plugin
c. Architectural patterns & design principles
• Pipeline Orchestration: Jenkins as control plane
• Infrastructure as Code: Terraform + TFSec validation
• Immutable artifacts: Docker image baked once, scanned, versioned in Nexus
• Configuration as Code: Ansible playbooks
• Centralized observability: OTel → Prometheus → Grafana
• Single-server cost optimization: co-hosting tools but logically separated by containers
d. Key technologies
• Jenkins (CI/CD), Docker (containers), Node.js/Express, Terraform (IaC), Ansible, HashiCorp Vault, SonarQube & Scanner, Snyk, TFSec, Trivy, Nexus Repository, OpenTelemetry Collector, Prometheus, Grafana
Detail & separation
• Scanner feeding outputs into Prometheus (via exporter scripts)
• Service ports (e.g., Jenkins:8080, SonarQube:9000, Grafana:3001)