You are required to deploy the ealen/echo-server container to a Kubernetes cluster using Helm and Terraform's Helm provider. The task involves containerizing the application with a minor modification, creating a Helm chart, deploying it using Terraform, and setting up a CI/CD pipeline for automated deployments.
This task is expected to take 60 minutes and will be conducted via screen sharing.
- Complete the
Dockerfilewith a minor change:- Update the
global.jsonconfiguration to change theportfrom 80 to 8080.
- Update the
- Build and push the modified image to Docker Hub or GitHub Container Registry (GHCR).
- Write a Helm chart to deploy
ealen/echo-server. - Include a
values.yamlfile for configuration (e.g., setting environment variables, replica count, service type, etc.). - Ensure the Helm chart is reusable and configurable.
- Use Terraform's Helm provider to deploy the Helm chart to a Kubernetes cluster.
- Parameterize the deployment (e.g., image tag, number of replicas, namespace).
- Output the service URL after deployment.
- Organize your repository with the following structure:
repo-root/
│── helm/
│ ├── Chart.yaml
│ ├── values.yaml
│ ├── templates/
│ │ ├── deployment.yaml
│ │ ├── service.yaml
│── terraform/
│ ├── main.tf
│ ├── variables.tf
│ ├── outputs.tf
│── .github/
│ ├── workflows/
│ │ ├── ci-cd.yaml
│── Dockerfile
│── README.md
- Create a GitHub Actions pipeline (
.github/workflows/ci-cd.yaml) that:- Builds the Docker image and pushes it to a registry when a feature branch is merged to
main. - Deploys to staging when changes are merged into
main. - Deploys to production when a release is published.
- Builds the Docker image and pushes it to a registry when a feature branch is merged to
- A GitHub repository containing:
- Helm chart (
helm/directory) - Terraform files (
terraform/directory) - A GitHub Actions pipeline (
.github/workflows/ci-cd.yaml) - A modified Dockerfile
- A structured
README.md
- Helm chart (
- ArgoCD application manifest (argo-cd/applications/echo-server.yaml)
- Code quality & organization: Clean and structured repository.
- AI Usage: Usage of AI tools is allowed, and actually encouraged.
- git commit messages: Commit messages should be concise and descriptive.
- Infrastructure as Code (IaC): Proper use of Terraform & Helm.
- CI/CD implementation: A working pipeline that follows best practices.
- Completeness: Successful deployment of
ealen/echo-server.