{"id":17678667,"url":"https://github.com/karambir/devops-kata","last_synced_at":"2025-03-30T18:20:46.623Z","repository":{"id":147040024,"uuid":"142220131","full_name":"karambir/devops-kata","owner":"karambir","description":"Some exercises and examples in devops","archived":false,"fork":false,"pushed_at":"2018-10-17T15:07:01.000Z","size":52,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-24T10:07:47.075Z","etag":null,"topics":["ami","ansible","aws","cd","ci","devops","load-balancer","packer","terraform"],"latest_commit_sha":null,"homepage":null,"language":"HCL","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karambir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-07-24T22:45:05.000Z","updated_at":"2023-03-23T12:41:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"32135250-b99b-4b7b-807b-ec8069889680","html_url":"https://github.com/karambir/devops-kata","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karambir%2Fdevops-kata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karambir%2Fdevops-kata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karambir%2Fdevops-kata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karambir%2Fdevops-kata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karambir","download_url":"https://codeload.github.com/karambir/devops-kata/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246358850,"owners_count":20764461,"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":["ami","ansible","aws","cd","ci","devops","load-balancer","packer","terraform"],"created_at":"2024-10-24T08:05:26.523Z","updated_at":"2025-03-30T18:20:46.590Z","avatar_url":"https://github.com/karambir.png","language":"HCL","readme":"# Devops katas\n[![Build Status](https://travis-ci.org/karambir/devops-kata.svg?branch=master)](https://travis-ci.org/karambir/devops-kata)\n\nBasic infra setup and provisioning using ansible, packer and terraform.\n\n## For now, we do:\n\n- Ansible\n  1. Create a remote `ubuntu` user and group.\n    a. This user has sudo access\n    b. The current user's ssh key(typically `~/.ssh/id_rsa`) is copied to remote user.\n  2. Add some helpful dotfiles.\n  3. A basic nginx installation. Use `--skip-tags web` to not install it.\n- Packer\n  1. Make an AMI using above ansible playbook\n  2. Print ami_id in `packer_manifest.json` and `terraform/packer.auto.tfvars`\n- Terraform\n  1. Pick `ami_id` from `terraform/packer.auto.tfvars`\n  2. Create a VPC, Internet Gateway, Route and Subnet\n  3. Create ELB, Auto-scaling groups and Launch configuration using above ami.\n  4. Add separate security groups for ELB and our web server and print elb address to visit at the end.\n\n## To start just with ansible\n\nChange hosts in `hosts` file and run:\n\n    ansible-playbook -i hosts site.yml\n\n## To test out packer and terraform\n\n- Configure AWS cli so that `~/.aws/credentials` has aws keys or use env vars.\n- Build AMI `packer build packer.json`\n- Verify an AMI is created `cat terraform/packer.auto.tfvars`\n- Provision infrastructure using terraform `terraform plan` and `terraform apply`\n- Run `terrafomr destroy` to delete everything unless you to keep all of that infra running\n\n## Help and Documentation\n\n- [Ansible docs](https://docs.ansible.com/)\n- [Packer docs](https://www.packer.io/docs/index.html)\n- [Terraform docs](https://www.terraform.io/docs/index.html)\n- Started terraform templates with this [official example](https://github.com/terraform-providers/terraform-provider-aws/tree/master/examples/two-tier)\n- Took configuration around Auto-scaling groups from [here](https://medium.com/@I_M_Harsh/build-and-deploy-using-jenkins-packer-and-terraform-40b2aafedaec)\n\n----\n\nHappy Devops\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarambir%2Fdevops-kata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarambir%2Fdevops-kata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarambir%2Fdevops-kata/lists"}