infra-bootstrap-tools
infra-bootstrap-tools copied to clipboard
Set of scripts to setup a host with docker-swarm and caddy auth-portal
Startup Infra for Small Self-hosted Projects
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
Articles and Tutorials
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.)
Tools Introduction
- [ ] WIP: π 1: What is Terraform and why you might need it.
- [X] π 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.
Learn the Tools
- [X] π How to configure GitHub Environments with Terraform?
- [x] π How to provision VM on Digital Ocean with Terraform?
- [X] π How to create SSH keys with Terraform?
- [x] πΊοΈ How to create Ansible Inventory with Terraform?
- [x] π© How to run an Ansible playbook using GitHub Action?
Main Quest - Put it all together
- [X] π§° 1: Design and Test Ansible playbook with Vagrant
- Example code .articles/1_vagrant_101
- [X] π§° 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
Learn about the applications used in this setup
- [ ] 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.
Architecture

Handy tool chain
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:
- docker_tools_alias.sh
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
Scale Up
With docker swarm and portainer it because easy to manager multiple nodes.
