A complete ansible infrastructure for my personal server. Hosts a variety of FOSS applications through docker deployments within individual ansible roles.
Find a file
Marty Oehme f2e709590b
Add basic nextcloud deployment
Uses php-fpm image and is served through a simple caddy server.
Automatically deploys by default and can be automatically deployed with
smtp e-mail sending and s3 primary object storage optionally if desired.

Utilizes some necessary hackery for container ordering and startup so
startup is relatively slow (takes around 2-5 minutes at least) but once
running should be stable and uninterrupted.

Implements health-checks for all involved containers.

Switch apache for php-fpm image
2021-11-20 14:23:57 +01:00
group_vars Add basic nextcloud deployment 2021-11-20 14:23:57 +01:00
host_vars Add testing inventory and group variables 2021-07-29 15:11:28 +02:00
roles Add basic nextcloud deployment 2021-11-20 14:23:57 +01:00
.gitignore Add miniflux deployment 2021-10-22 13:17:50 +02:00
ansible.cfg Add miniflux deployment 2021-10-22 13:17:50 +02:00
inv-dev.yml Add miniflux deployment 2021-10-22 13:17:50 +02:00
inv-staging.yml Add staging and development environments 2021-10-21 14:23:26 +02:00
README.md Update README 2021-10-26 18:12:33 +02:00
site-dev.yml Add basic nextcloud deployment 2021-11-20 14:23:57 +01:00
site.yml Add basic nextcloud deployment 2021-11-20 14:23:57 +01:00
Vagrantfile Fix docker python module installation for sudo 2021-07-27 12:54:32 +02:00

Cloudserve infrastructure

Testing

This repository comes with a test-ready setup to try out the complete site setup locally. It uses vagrant to accomplish this and create a pretend target host. Install vagrant on your system and to make tests repeatable also install the vagrant plugins vagrant-hosts and vagrant-hostsupdater, which will set a static IP for the vagrant host to be reachable under.

vagrant plugin install vagrant-hosts vagrant-hostsupdater

Then you are ready to run the complete infrastructure setup locally, simply by executing ansible-playbook site.yml. You can of course pick and choose what should be executed with host limits, tags, group variables, and so on, but this should provide an easy way to see if a) the playbook is working as intended and b) what it does is useful.

Deployment

Most variables to be changed should be set either through group_variables or host_variables. For my deployment I have a production group under group_variables which houses both a vars.yml containing basic variables (like server_domain, caddy_email, etc.) and a vault.yml which houses everything that should ideally not be lying around in plain-text (individual container and database passwords for the various roles etc).

To create such a file you can do ansible-vault create group_vars/<group-name>/vault.yml or do ansible-vault edit group_vars/<group-name>/vault.yml to edit it.

Look into the default/main.yml files of the various roles to see which variables should be set or can be overridden. The README.md files of the roles should also carry enough information about the individual variables to make sense.