This repository provides Ansible playbooks to set up a minimal infrastructure for a simple self-hosted application. Ideal for small hobby projects. I made this repository a place to Learn about DevOps and Cloud Infrastructure. You have all the tutorial you need to get started.
Features:
- docker-swarm
- Caddy
- Portainer
- Prometheus
- Graphana
The article / tutorial are splited into sections.
- Introduction -> What are the tools to use to manager infrastructure. Perfect to learn the basis.
- How-tos -> Good take away fron this project - Answers many questions you could encounter in the future
- Main quest -> Deploy the Infrastructure using Ansible, Terraform and Github Action
- Deepening Understanding -> learn more about each applicaton used in this setup (Portainer, Graphana, Caddy, etc.)
- WIP: 📚 1: What is Terraform and why you might need it.
- 📚 2: What is Terraform Cloud and why you might need it.
- WIP: 📚 3: What is Github Action and why you might need it.
- WIP: 📚 4: What is Ansible and why you might need it.
- WIP: 📚 5: What is Ansible AWX and why you might need it.
- 🌍 How to configure GitHub Environments with Terraform?
- 🏭 How to provision VM on Digital Ocean with Terraform?
- 🔏 How to create SSH keys with Terraform?
- 🗺️ How to create Ansible Inventory with Terraform?
- 👩 How to run an Ansible playbook using GitHub Action?
- 🧰 1: Design and Test Ansible playbook with Vagrant
- Example code .articles/1_vagrant_101
- 🧰 2 Experimenting on Docker Swarm with Vagrant and Ansible
- Example code .articles/2_docker_swarm_101
- WIP: 🧰 3: Automate Infrastructure provisionning with Ansible and Github action
- WIP: ☸️ 1: What is Portainer and why you might need it.
- WIP: ☸️ 2: What is Prometheus and why you might need it.
- WIP: ☸️ 3: What is Caddy and why you might need it.
Wanna go fast? Too lazy to setup your local env?
Then use the the tools from a docker container. I included a simple toochain in this repository and usefull alias to use it.
Use common infrastructure tools in docker with:
source ./bin/docker_tools_alias.sh
use dasb for ansible in docker
use dap for ansible-playbook in docker
use daws for awscli in docker
use dpk for packer in docker
use dtf for terraform in docker
use dbash for bash in docker
With docker swarm and portainer it because easy to manager multiple nodes.