Skip to content

Latest commit

 

History

History
73 lines (45 loc) · 3.42 KB

README.md

File metadata and controls

73 lines (45 loc) · 3.42 KB

The BIG infrastructure for tiny DevOps teams or startups

Be UP and ready for releases in less than a week! This example infrastructure is ready to run your docker images, it is easy to use in your CI/CD pipelines and much more...

Sometimes does not make sense to split logic betwean two automatization tools (like an ansible and a terraform) especialy if you need fast results and small complexity. This repository is an template/example of how to manage the whole infrastructure for companies with tiny DevOps team, low budget and huge plans. This repository comes from my experience from multiple infrastructure kickoffs for independent projects, startups or established companies trying to reach GitOps, IaaC etc. It is strongly focused on simplicity and small maintanance requirements but allows to grow across the borders of single datacenter or cloud provider. During last 5 years I rewrited this manytimes to be able publish it, but It wasn't enought perfect for me and still it isn't, but the projects that have been builded on this base could be started in a day and than grow fast without issues and major changes, so I've decided to publish only core part which I repeate almost everytime.

Schema generated by python diagrams

Important - don't use this template as is in production environment. It could cause problems due the lack of implemented security.

The multi-stage infrastructure deployment using:

All the tools/providers above is not required. I'll publish deployments with AWS and GCP in future releases. On bare metal you can use only deploy.yml playbook

Before start

  • Register vultr account
  • Enable vultr API
  • Place your api key to file ~/.vultr.ini (echo -e "[default]\nkey = YOUR_API_KEY\n" > ~/.vultr.ini)
  • Now use ansible as usual

The key parts are:

  • env/devel/hosts is inventory used to for deploy servers in vultr infrastructure

  • env/devel/vultr.yaml file tell to ansible to get inventory from vultr api (especuialy IP addresses etc)

  • ~/.vultr.ini is the right place where api key should be placed

  • files/jobs/ directory contains working jobs that helps you to reach usable environment faster

  • files/acl/ directory contains basic acls (Read more about ACL)

Documentation

In path ./docs is documentation build on top of the mkdocs tool. So for nice experience run

mkdocs serve 

command inside the repository and go to http://localhost:8000

Monitoring

There are available grafana dashboards, specialy created for this infrastructure:

The grafana cloud is used by this infrastructure, to change it, modify monitoring jobs in path ./files/lobs/.

ToDO:

  • write deployment for GCP, AWS and Linode too...
  • more documentation (how to monitor it with grafana cloud, backuping with a restic to s3, ...)
  • keep it update