From 05c9ac4021704857c6e5fc38f79b4ed5fc2db24d Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Sun, 14 Jul 2024 15:38:33 +0200 Subject: [PATCH] chore: go on a quest for better ansible uis than awx --- containers/rundeck/Makefile | 15 +++++++ containers/rundeck/docker-compose.yml | 23 +++++++++++ containers/semaphore/Makefile | 19 +++++++++ containers/semaphore/docker-compose.yml | 21 ++++++++++ knowledge base/ansible.md | 17 ++++++-- knowledge base/rundeck.md | 54 +++++++++++++++++++++++++ knowledge base/self-hosting.md | 34 ++++++++++------ 7 files changed, 168 insertions(+), 15 deletions(-) create mode 100644 containers/rundeck/Makefile create mode 100644 containers/rundeck/docker-compose.yml create mode 100644 containers/semaphore/Makefile create mode 100644 containers/semaphore/docker-compose.yml create mode 100644 knowledge base/rundeck.md diff --git a/containers/rundeck/Makefile b/containers/rundeck/Makefile new file mode 100644 index 0000000..414d521 --- /dev/null +++ b/containers/rundeck/Makefile @@ -0,0 +1,15 @@ +#!/usr/bin/env make + +firewalld-open: override service_name ?= rundeck +firewalld-open: override port ?= ${shell yq -r '.services.${service_name}.ports[0]|split(":")|first' docker-compose.yml} +firewalld-open: override firewall_cmd_executable ?= ${shell which 'firewall-cmd'} +firewalld-open: ${firewall_cmd_executable} + @sudo ${firewall_cmd_executable} --permanent --new-service '${service_name}' + @sudo ${firewall_cmd_executable} --permanent --service '${service_name}' --set-description 'FIXME' + @sudo ${firewall_cmd_executable} --permanent --service '${service_name}' --set-short 'FIXME' + @sudo ${firewall_cmd_executable} --permanent --service '${service_name}' --add-port '${port}/tcp' + @sudo ${firewall_cmd_executable} --permanent --add-service '${service_name}' + @sudo ${firewall_cmd_executable} --reload + +composition-go-brrr: ${shell which 'docker-compose'} pre-flight + @docker-compose up -d diff --git a/containers/rundeck/docker-compose.yml b/containers/rundeck/docker-compose.yml new file mode 100644 index 0000000..18e1733 --- /dev/null +++ b/containers/rundeck/docker-compose.yml @@ -0,0 +1,23 @@ +--- + +# Sources: +# - https://docs.rundeck.com/docs/administration/install/docker.html#open-source-rundeck +# - https://github.com/rundeck/docker-zoo/blob/master/basic/docker-compose.yml + +# Default user and password: admin:admin +# On localhost, it requires RUNDECK_GRAILS_URL=http://localhost:4440 or login will appear to not work +# See https://github.com/rundeck/docs/issues/217 for details + +services: + rundeck: + image: rundeck/rundeck:5.4.0 + tty: true + volumes: + - data:/home/rundeck/server/data + - ${RUNDECK_LICENSE_FILE:-/dev/null}:/home/rundeck/etc/rundeckpro-license.key + ports: + - 4440:4440 + environment: + RUNDECK_GRAILS_URL: http://localhost:4440 +volumes: + data: diff --git a/containers/semaphore/Makefile b/containers/semaphore/Makefile new file mode 100644 index 0000000..d3c75db --- /dev/null +++ b/containers/semaphore/Makefile @@ -0,0 +1,19 @@ +#!/usr/bin/env make + +pre-flight: + @mkdir -pv 'data' + @docker compose run --rm --user 'root' 'semaphore' chown -Rv 'semaphore' '/etc/semaphore' '/var/lib/semaphore' + +firewalld-open: override service_name ?= semaphore +firewalld-open: override port ?= ${shell yq -r '.services.${service_name}.ports[0]|split(":")|first' docker-compose.yml} +firewalld-open: override firewall_cmd_executable ?= ${shell which 'firewall-cmd'} +firewalld-open: ${firewall_cmd_executable} + @sudo ${firewall_cmd_executable} --permanent --new-service '${service_name}' + @sudo ${firewall_cmd_executable} --permanent --service '${service_name}' --set-description 'FIXME' + @sudo ${firewall_cmd_executable} --permanent --service '${service_name}' --set-short 'FIXME' + @sudo ${firewall_cmd_executable} --permanent --service '${service_name}' --add-port '${port}/tcp' + @sudo ${firewall_cmd_executable} --permanent --add-service '${service_name}' + @sudo ${firewall_cmd_executable} --reload + +composition-go-brrr: ${shell which 'docker-compose'} pre-flight + @docker-compose up -d diff --git a/containers/semaphore/docker-compose.yml b/containers/semaphore/docker-compose.yml new file mode 100644 index 0000000..7596d5e --- /dev/null +++ b/containers/semaphore/docker-compose.yml @@ -0,0 +1,21 @@ +--- + +# Sources: +# - https://github.com/semaphoreui/semaphore +# - https://docs.semaphoreui.com/administration-guide/installation#docker + +services: + semaphore: + ports: + - 3000:3000 + image: semaphoreui/semaphore:latest + environment: + SEMAPHORE_DB_DIALECT: bolt + SEMAPHORE_ADMIN_PASSWORD: changeme + SEMAPHORE_ADMIN_NAME: admin + SEMAPHORE_ADMIN_EMAIL: admin@localhost + SEMAPHORE_ADMIN: admin + TZ: Europe/Berlin + volumes: + - ./data/home:/etc/semaphore # config.json location + - ./data/lib:/var/lib/semaphore # database.boltdb location (Not required if using mysql or postgres) diff --git a/knowledge base/ansible.md b/knowledge base/ansible.md index 521c757..984330d 100644 --- a/knowledge base/ansible.md +++ b/knowledge base/ansible.md @@ -108,14 +108,20 @@ ansible-galaxy role init --type 'container' --init-path 'path/to/role' 'name' ansible-galaxy remove 'namespace.role' ``` -
- Galaxy collections and roles worth a check +Galaxy collections and roles worth a check: | ID | Type | Description | | ---------------------------------------------- | ---------- | --------------------- | | [sivel.toiletwater][galaxy sivel.toiletwater] | collection | Extra filters, mostly | -
+UIs: + +| UI | Static inventories | Dynamic inventories | +| ----------- | ------------------ | ------------------- | +| [AWX] | ✓ | ✓ | +| [Rundeck] | ✓ | ? | +| [Semaphore] | ✓ | ✗ | +| [Zuul] | ? | ? | ## Configuration @@ -840,6 +846,7 @@ See [Integrate with AWS SSM]. - [Integrate with AWS SSM] - [Mitogen for Ansible] - [Debugging tasks] +- [AWX] ### Sources @@ -881,7 +888,9 @@ See [Integrate with AWS SSM]. --> +[awx]: awx.md [integrate with aws ssm]: cloud%20computing/aws/ssm.md#integrate-with-ansible +[rundeck]: rundeck.md [examples]: ../examples/ansible/ @@ -934,9 +943,11 @@ See [Integrate with AWS SSM]. [mitogen for ansible]: https://mitogen.networkgenomics.com/ansible_detailed.html [only do something if another action changed]: https://raymii.org/s/tutorials/Ansible_-_Only-do-something-if-another-action-changed.html [removing empty values from a list and assigning it to a new list]: https://stackoverflow.com/questions/60525961/ansible-removing-empty-values-from-a-list-and-assigning-it-to-a-new-list#60526774 +[semaphore]: https://semaphoreui.com/ [unique filter of list in jinja2]: https://stackoverflow.com/questions/44329598/unique-filter-of-list-in-jinja2 [what is the exact list of ansible setup min?]: https://stackoverflow.com/questions/71060833/what-is-the-exact-list-of-ansible-setup-min#71061125 [why ansible and python fork break on macos high sierra+ and how to solve]: https://ansiblepilot.medium.com/why-ansible-and-python-fork-break-on-macos-high-sierra-and-how-to-solve-d11540cd2a1b [windows playbook example]: https://geekflare.com/ansible-playbook-windows-example/ [working with versions]: https://docs.ansible.com/ansible/latest/collections/community/general/docsite/filter_guide_working_with_versions.html [yes and no, true and false]: https://chronicler.tech/red-hat-ansible-yes-no-and/ +[zuul]: https://zuul-ci.org/ diff --git a/knowledge base/rundeck.md b/knowledge base/rundeck.md new file mode 100644 index 0000000..b8be9f2 --- /dev/null +++ b/knowledge base/rundeck.md @@ -0,0 +1,54 @@ +# Rundeck + +TODO + +1. [Integrations](#integrations) + 1. [Ansible](#ansible) +1. [Further readings](#further-readings) + 1. [Sources](#sources) + +## Integrations + +### Ansible + +Refer [Integrate with Ansible]. + +## Further readings + +- [Website] +- [Main repository] +- [Documentation] +- Basic [`docker-compose.yml`][docker-compose.yml] +- [Ansible] + +### Sources + +- [Installation] +- [Docker configuration reference] +- [Basic exhibit] +- [What is the username and password for the rundeck/rundeck docker image? It says its admin/admin but that does not work] +- [Integrate with Ansible] + + + + + +[ansible]: ansible.md + + +[docker-compose.yml]: ../containers/rundeck/docker-compose.yml + + +[basic exhibit]: https://github.com/rundeck/docker-zoo/blob/master/basic/ +[docker configuration reference]: https://docs.rundeck.com/docs/administration/configuration/docker.html +[documentation]: https://docs.rundeck.com/docs/ +[installation]: https://docs.rundeck.com/docs/administration/install/ +[integrate with ansible]: https://docs.rundeck.com/docs/learning/howto/using-ansible.html +[main repository]: https://github.com/rundeck/rundeck +[website]: https://www.rundeck.com/ +[what is the username and password for the rundeck/rundeck docker image? it says its admin/admin but that does not work]: https://github.com/rundeck/docs/issues/217 + + diff --git a/knowledge base/self-hosting.md b/knowledge base/self-hosting.md index a3e32c1..00a1a8f 100644 --- a/knowledge base/self-hosting.md +++ b/knowledge base/self-hosting.md @@ -9,18 +9,23 @@ The _art_ of hosting and managing applications on one's own servers instead of c ## Software -| Name | Description | Alternatives | -| ---------------- | -------------------------- | ------------------------------- | -| [Baikal] | CalDAV and CardDAV server | [Radicale] | -| [Gitea] | Git server | [Gitlab], [Gogs] | -| [Gitlab] | Git server | [Gitea], [Gogs] | -| [Gogs] | Git server | [Gitea], [Gitlab] | -| [Home Assistant] | Home automation platform | | -| [NextCloud] | File sharing platform | [OwnCloud] | -| [OpenMediaVault] | NAS solution | [TrueNAS] | -| [Paperless-ngx] | Document management system | | -| [PhotoPrism] | Google Photos replacement | | -| [Uptime Kuma] | Status page | [Gatus], [Statping-ng], [Vigil] | +| Name | Description | Alternatives | +| ---------------- | -------------------------- | ----------------------------------------- | +| [AWX] | Task runner | [CTFreak], [Rundeck], [Semaphore], [Zuul] | +| [Baikal] | CalDAV and CardDAV server | [Radicale] | +| [CTFreak] | Task runner | [AWX], [Rundeck], [Semaphore], [Zuul] | +| [Gitea] | Git server | [Gitlab], [Gogs] | +| [Gitlab] | Git server | [Gitea], [Gogs] | +| [Gogs] | Git server | [Gitea], [Gitlab] | +| [Home Assistant] | Home automation platform | | +| [NextCloud] | File sharing platform | [OwnCloud] | +| [OpenMediaVault] | NAS solution | [TrueNAS] | +| [Paperless-ngx] | Document management system | | +| [PhotoPrism] | Google Photos replacement | | +| [Rundeck] | Task runner | [AWX], [CTFreak], [Semaphore], [Zuul] | +| [Semaphore] | Task runner | [AWX], [CTFreak], [Rundeck], [Zuul] | +| [Uptime Kuma] | Status page | [Gatus], [Statping-ng], [Vigil] | +| [Zuul] | Task runner | [AWX], [CTFreak], [Rundeck], [Semaphore] | ## Further readings @@ -35,6 +40,7 @@ The _art_ of hosting and managing applications on one's own servers instead of c --> +[awx]: awx.md [baikal]: baikal.md [gitea]: gitea.md [gitlab]: gitlab/README.md @@ -42,16 +48,20 @@ The _art_ of hosting and managing applications on one's own servers instead of c [openmediavault]: openmediavault.md [paperless-ngx]: paperless-ngx.md [photoprism]: photoprism.md +[rundeck]: rundeck.md [uptime kuma]: uptime%20kuma.md [awesome-selfhosted]: https://awesome-selfhosted.net/ +[ctfreak]: https://ctfreak.com/ [gatus]: https://github.com/TwiN/gatus [gogs]: https://github.com/gogs/gogs [home assistant]: https://www.home-assistant.io/ [owncloud]: https://owncloud.com/ [radicale]: https://radicale.org/ +[semaphore]: https://semaphoreui.com/ [service as a software substitute]: https://www.gnu.org/philosophy/who-does-that-server-really-serve.html [statping-ng]: https://statping-ng.github.io/ [truenas]: https://www.truenas.com/ [vigil]: https://github.com/valeriansaliou/vigil +[zuul]: https://zuul-ci.org/