{"id":22537591,"url":"https://github.com/langburd/devops-assignment","last_synced_at":"2026-03-19T23:05:05.058Z","repository":{"id":212687214,"uuid":"731989693","full_name":"langburd/devops-assignment","owner":"langburd","description":"The example of 'Infrastructure as a code' approach for deploying simple Python application.","archived":false,"fork":false,"pushed_at":"2024-09-13T07:44:43.000Z","size":103,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-09-13T20:29:47.451Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"HCL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/langburd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-15T11:11:43.000Z","updated_at":"2024-09-08T19:11:04.000Z","dependencies_parsed_at":"2024-09-13T20:29:58.993Z","dependency_job_id":"09567ba5-7e61-4b57-be13-4961f7d5b8ba","html_url":"https://github.com/langburd/devops-assignment","commit_stats":null,"previous_names":["langburd/makor-lavan-devops-assignment","langburd/devops-assignment"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fdevops-assignment","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fdevops-assignment/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fdevops-assignment/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/langburd%2Fdevops-assignment/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/langburd","download_url":"https://codeload.github.com/langburd/devops-assignment/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245984559,"owners_count":20704794,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-07T11:07:41.054Z","updated_at":"2026-01-07T01:49:05.902Z","avatar_url":"https://github.com/langburd.png","language":"HCL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DevOps Assignment\n\nThe requirements of the project are described in [REQUIREMENTS.md](REQUIREMENTS.md)\n\n- The application is running in AWS EKS and Azure AKS clusters.  \n- The clusters are installed using IaC approach and managed by Terragrunt in `environments` directory.  \n- Terraform modules used by Terragrunt are located in `modules` directory.  \n- The application itself is located in `app` directory and deployed using the Helm chart located in `helm` directory.  \n- Since CI/CD processes are outside the scope of the current project, creating the image and pushing it to the container registry is done manually.\n  As well as all infrastructure changes in Terraform and Terragrunt.\n\n## Pre-commit Hooks\n\nThis repo uses [pre-commit hooks](https://pre-commit.com/) for linting, formatting and docs creation before the commit.\n\n### `Setup`\n\n- Install `pre-commit` using instructions [here](https://pre-commit.com/#installation)\n- Install required tools\n\n```shell\nbrew install tflint\nbrew install terraform-docs\n```\n\n- Install the hooks\n\n```shell\npre-commit install\n```\n\n### `Usage`\n\nThe hooks will run automatically before every commit.  \nUpdates the docs in each module's `README.md` and fixes formatting and linting with commands such as `terraform fmt`.  \nIf you want to run the checks manually without committing, use the command\n\n```shell\npre-commit run -a\n```\n\n## Build the image and push it to the container registry\n\n```shell\nexport CR_PAT=\u003cgithub-token\u003e\necho $CR_PAT | docker login ghcr.io -u langburd --password-stdin\nREGISTRY=ghcr.io/langburd/devops-assignment\nVERSION=$(cat helm/Chart.yaml| yq -r '.appVersion')\ndocker build --platform linux/amd64 -t $REGISTRY:$VERSION .\ndocker push $REGISTRY:$VERSION\n```\n\n## Authenticate to AWS EKS and Azure AKS\n\n```shell\ntouch $(pwd)/kubeconfig.yaml\nchmod 600 $(pwd)/kubeconfig.yaml\nexport KUBECONFIG=$(pwd)/kubeconfig.yaml\n# EKS\nexport AWS_PROFILE=devops-assignment\naws eks update-kubeconfig \\\n  --name \"$(yq .inputs.cluster_name environments/aws/eks/tf_source_vars.yaml)\"\n# AKS\naz login\naz aks get-credentials \\\n  --resource-group \"$(yq .resource_group_name environments/azure/env.yaml)\" \\\n  --name \"$(yq .inputs.cluster_name environments/azure/aks/tf_source_vars.yaml)\" \\\n  --admin\n```\n\n## Deploy all infrastructure and application resources\n\n```shell\nterragrunt run-all init --working-dir=environments\nterragrunt run-all plan --working-dir=environments\nterragrunt run-all apply --working-dir=environments\n```\n\n## Deploy single resource\n\n```shell\nterragrunt apply --working-dir=environments/\u003cenv\u003e/\u003cresource\u003e\n```\n\n## Deploy application only\n\n```shell\nterragrunt apply --working-dir=environments/aws/app\nterragrunt apply --working-dir=environments/azure/app\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangburd%2Fdevops-assignment","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flangburd%2Fdevops-assignment","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flangburd%2Fdevops-assignment/lists"}