{"id":13416604,"url":"https://github.com/Thomvaill/tads-boilerplate","last_synced_at":"2025-03-15T00:31:10.277Z","repository":{"id":45847607,"uuid":"218020487","full_name":"thomvaill/tads-boilerplate","owner":"thomvaill","description":"Terraform + Ansible + Docker Swarm boilerplate = DevOps on :fire::fire::fire: | Infrastructure as Code","archived":true,"fork":false,"pushed_at":"2025-02-06T08:50:52.000Z","size":223,"stargazers_count":768,"open_issues_count":9,"forks_count":116,"subscribers_count":25,"default_branch":"master","last_synced_at":"2025-02-14T21:36:10.771Z","etag":null,"topics":["ansible","bash","boilerplate","devops","docker","docker-swarm","hacktoberfest","iac","infrastructure-as-code","noops","tads","terraform","vagrant"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/thomvaill.png","metadata":{"files":{"readme":"README.example.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null}},"created_at":"2019-10-28T10:22:42.000Z","updated_at":"2025-02-09T15:49:46.000Z","dependencies_parsed_at":"2023-01-19T03:00:59.290Z","dependency_job_id":null,"html_url":"https://github.com/thomvaill/tads-boilerplate","commit_stats":null,"previous_names":[],"tags_count":2,"template":true,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomvaill%2Ftads-boilerplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomvaill%2Ftads-boilerplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomvaill%2Ftads-boilerplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomvaill%2Ftads-boilerplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomvaill","download_url":"https://codeload.github.com/thomvaill/tads-boilerplate/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243667725,"owners_count":20328032,"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":["ansible","bash","boilerplate","devops","docker","docker-swarm","hacktoberfest","iac","infrastructure-as-code","noops","tads","terraform","vagrant"],"created_at":"2024-07-30T21:01:01.877Z","updated_at":"2025-03-15T00:31:09.829Z","avatar_url":"https://github.com/thomvaill.png","language":"Shell","funding_links":[],"categories":["Development with Docker","Dev env","Tools","Playbooks, Roles and Collections","Playbooks","Helpers / Tools"],"sub_categories":["Wrappers","Miscellaneous","French","German","Community providers"],"readme":"# YourCompany infrastructure repository\n\nThis repository implements [Infrastructure as Code](https://en.wikipedia.org/wiki/Infrastructure_as_code), and more globally the DevOps mindset.\nIt includes all the configuration and all the scripts needed to deploy YourCompany stacks either locally or remotely.\nThis repository should be considered as a single source of truth.\nYou should also use this repository to set up your development environment.\n\nThis project heavily uses Ansible. If you are not familiar with it, you should read the [Ansible Quickstart guide](https://docs.ansible.com/ansible/latest/user_guide/quickstart.html) before getting started.\n\nThis project was bootstrapped with [T.A.D.S. boilerplate](https://github.com/Thomvaill/tads-boilerplate).\n\n## Installation\n\n```bash\ngit clone \u003cYOUR_PROJECT_GIT_URL\u003e\ncd \u003cYOUR_PROJECT_NAME\u003e\n./tads install-dependencies\n```\n\n... this will install project dependencies: Ansible, Vagrant, Virtualbox, and Terraform.\n\n## Development environment\n\n### Commands\n\nThe `./tads` executable is a companion CLI which is a wrapper around Ansible, Vagrant and Terraform commands.\n\n```bash\n./tads ansible-playbook localhost provision\n```\n\n... this will configure your local machine to be able to run YourCompany stacks: it will install Docker and set up a Swarm cluster with one node: your localhost.\n\n```bash\n./tads ansible-playbook localhost deploy\n```\n\n... this will deploy all YourCompany's stacks. To deploy only specific stacks, use `--tags` option. Example: `./tads ansible-playbook localhost deploy --tags stack-traefik,stack-XXX`.\n\nYou should run this command every time you change the configuration of your stacks.\n\nYour application is now accessible on https://yourcompany.localhost/\n\n### Bind mounts\n\nTo be able to develop locally, you should bind mount your code into your containers. To do so:\n\n- Copy `ansible/groups_vars/localhost_bindmounts.sample.yml` to `ansible/groups_vars/localhost_bindmounts.yml`\n- Specify the correct paths in it\n- Run `./tads ansible-playbook localhost deploy` to update changes\n\nYou can also override some Ansible variables locally doing the same with the `ansible/groups_vars/localhost_overrides.sample.yml` file (useful for credentials and applicative environment variables).\n\n## Test in a production-like environment with Vagrant\n\nThis will deploy your stacks on a 3-nodes production like-environment, locally with Vagrant. To do so, this will create 3 virtual machines.\n\n1. Copy `vagrant/vagrant.sample.yml` to `vagrant/vagrant.yml` and adjust its settings\n2. Run `./tads vagrant up`\n3. Run `./tads ansible-playbook vagrant all`\n\nNow, you will be able to test your stacks deployed on Vagrant on https://yourcompany.test/\n\n**Tips:**\n\n- To destroy your cluster: `./tads vagrant destroy`\n- To SSH into the first node: `./tads vagrant ssh vagrant-1`\n\n## Deploy to production\n\n1. Make sure you have a correct SSH key pair\n2. Make sure you have the correct ansible-vault key in `ansible/vault_keys/production`\n3. To create the environment with Terraform: `./tads terraform production apply`\n4. To provision: `./tads ansible-playbook production provision`\n5. To deploy: `./tads ansible-playbook production deploy`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThomvaill%2Ftads-boilerplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FThomvaill%2Ftads-boilerplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FThomvaill%2Ftads-boilerplate/lists"}