mirror of
https://github.com/CivMC/Civ.git
synced 2026-07-15 15:18:04 +00:00
CivAnsible
This project is a hybrid gradle/ansible project that is designed to provision and deploy services to a server.
Vendored plugins are located in src/ (gradle), since they are used to build the end plugin directory (/build/)
Configs are located in files/, since they are purely copied by ansible
Prerequisites
- Create a user on the server named
actionswith sudo privileges - Create Environments in Github settings with the following environment secrets:
- SSH_KNOWN_HOSTS
- SSH_PRIVATE_KEY
- SUDO_PASSWORD
- Create a repo scoped secret with the contents of your secrets.yml called SECRETS_YML
- Create an ansible inventory named after the environment
Usage
- Build dependencies with
gradle :ansible:build - Use an ansible playbook with
ansible-playbook -i inventories/<inventory> playbooks/<playbook>
TODOs
- Private Config
- Mount backups location and configure params, setup
Provisioned Layout
/
└── opt/
├── backup-and-restart.sh
└── stacks/
└── <stack>/
├── <stack>.yml
└── ...<service-data>
Deployable Services
graph TD;
subgraph Exposed Ports;
port_http((80));
port_https((443));
port_mc((25565));
port_vote((8192));
end;
subgraph Minecraft;
mc_waterfall[Waterfall];
mc_paper[Paper];
mc_kira[Kira];
mc_mariadb[(MariaDB)];
mc_postgres[(Postgres)];
mc_rabbitmq[(RabbitMQ)];
port_mc-->mc_waterfall;
port_vote-->mc_paper;
mc_waterfall-->mc_paper;
mc_waterfall-->mc_postgres;
mc_paper-->mc_postgres;
mc_paper-->mc_mariadb;
mc_paper-->mc_rabbitmq;
mc_kira-->mc_postgres;
mc_kira-->mc_rabbitmq;
end;
subgraph Auth;
auth_keycloak[Keycloak];
auth_postgres[(Postgres)];
auth_keycloak-->auth_postgres;
end;
subgraph Monitoring;
mon_grafana[Grafana];
mon_loki[Loki];
mon_grafana-->mon_loki;
mon_grafana-->mc_postgres;
mon_grafana-->mc_mariadb;
mon_grafana-.->auth_keycloak;
end;
subgraph Portainer;
por_portainer[Portainer];
por_agent[Portainer Agent];
por_portainer-->por_agent;
por_portainer-.->auth_keycloak;
end;
subgraph Traefik;
tfk_traefik[Traefik];
port_http-->tfk_traefik;
port_https-->tfk_traefik;
tfk_traefik-->mon_grafana;
tfk_traefik-->por_portainer;
end;