Browse Source

Merge branch 'wip-fixes' into 'master'

minor documentation improvements and cleanups

See merge request main/infrastructure!410
keep-around/027fed6759d0d8348d3b7d5bd0c3d6061006194d
Loïc Dachary 7 months ago
parent
commit
027fed6759
  1. 13
      docs/community/contribute.rst
  2. 19
      docs/index.rst
  3. 8
      enough/common/libvirt.py
  4. 2
      inventory/group_vars/icinga-service-group.yml
  5. 2
      playbooks/api/inventory/group_vars/icinga-service-group.yml
  6. 2
      playbooks/backup/inventory/group_vars/icinga-service-group.yml
  7. 2
      playbooks/bind/inventory/group_vars/icinga-service-group.yml
  8. 2
      playbooks/chat/inventory/group_vars/icinga-service-group.yml
  9. 2
      playbooks/cloud/inventory/group_vars/icinga-service-group.yml
  10. 2
      playbooks/enough/inventory/group_vars/icinga-service-group.yml
  11. 2
      playbooks/forum/inventory/group_vars/icinga-service-group.yml
  12. 2
      playbooks/gitlab/inventory/group_vars/icinga-service-group.yml
  13. 1
      playbooks/icinga/icinga-playbook.yml
  14. 2
      playbooks/openedx/inventory/group_vars/icinga-service-group.yml
  15. 2
      playbooks/openvpn/inventory/group_vars/icinga-service-group.yml
  16. 2
      playbooks/packages/inventory/group_vars/icinga-service-group.yml
  17. 2
      playbooks/pad/inventory/group_vars/icinga-service-group.yml
  18. 2
      playbooks/postfix/inventory/group_vars/icinga-service-group.yml
  19. 2
      playbooks/psono/inventory/group_vars/icinga-service-group.yml
  20. 2
      playbooks/wazuh/inventory/group_vars/icinga-service-group.yml
  21. 2
      playbooks/weblate/inventory/group_vars/icinga-service-group.yml
  22. 2
      playbooks/website/inventory/group_vars/icinga-service-group.yml
  23. 2
      playbooks/wekan/inventory/group_vars/icinga-service-group.yml
  24. 2
      playbooks/wordpress/inventory/group_vars/icinga-service-group.yml

13
docs/community/contribute.rst

@ -209,19 +209,20 @@ Upgrade testing
---------------
To verify that a service (`icinga` for instance) can be upgraded from
a given Enough version (`2.0.7` for instance), use:
a given Enough version (`2.1.14` for instance), use:
::
$ export ENOUGH_API_TOKEN=XXXXXXX
$ tests/run-upgrade-tests.sh 2.0.7 icinga
$ tests/run-upgrade-tests.sh 2.1.14 icinga -- \
--enough-no-destroy \
--enough-driver=libvirt playbooks/icinga/tests
...
`run-upgrade-tests.sh` performs the following steps:
* checkout the ``2.0.7`` tag into ``../infrastructure-versions/2.0.7/infrastructure``
* run ``tox -e icinga`` from the ``2.0.7`` directory and keep the hosts
* run ``tox -e icinga`` from the current version, re-using the hosts with the icinga version installed from ``2.0.7``
* checkout the ``2.1.14`` tag into ``../infrastructure-versions/2.1.14/infrastructure``
* run ``tox -e icinga`` from the ``2.1.14`` directory and keep the hosts because of ``--enough-no-destroy``
* run ``tox -e icinga`` from the current version, re-using the hosts with the icinga version installed from ``2.1.14``
ssh to a host under test
------------------------

19
docs/index.rst

@ -2,19 +2,18 @@ enough.community documentation
==============================
The `Enough infrastructure
<http://lab.enough.community/main/infrastructure>`_ are a set of
services (Forum, chat, shared storage, monitoring, backups, IDS, DNS,
etc.) to support the work of `the Enough community
<https://enough.community>`_. It is maintained by :doc:`individuals
<community/team>` organized `horizontally
<http://lab.enough.community/main/infrastructure>`_ is a set of
services (forum, chat, shared storage, monitoring, backups, intrusion detection,
etc.) tailored to help journalists and human rights defenders. It is designed
to be `self-hosted <https://en.wikipedia.org/wiki/Self-hosting_(web_services)>`__
but there also exist a `publicly available instance <https://enough.community>`__.
It is maintained by :doc:`individuals <community/team>` organized
`horizontally
<https://enough.community/blog/2020/01/20/manifesto/>`__. Anyone is
welcome to contribute: learn more in the :doc:`contribution guide
<community/contribute>`.
Enough is also suitable for organizations with a focus on human right
defenders and journalists. It can be used to create and maintain an
independant infrastructure.
.. toctree::
:caption: Infrastructure guide
:name: Infrastructure guide
@ -22,6 +21,6 @@ independant infrastructure.
introduction
user-guide
release-notes
services/index
community/index
release-notes

8
enough/common/libvirt.py

@ -70,7 +70,13 @@ class Libvirt(object):
def _create_or_update(self, definition):
name = definition['name']
if self.get(name) is not None:
return None
info = {
'ipv4': self.get_ipv4(name),
'port': definition['port'],
}
Hosts(self.config_dir).create_or_update(
definition['name'], info['ipv4'], info['port'])
return info
log.info(f"{name}: building image")
self.image_builder()
sh.cp('--sparse=always', self.image_name(), self.host_image_name(name))

2
inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: true

2
playbooks/api/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/backup/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/bind/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/chat/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/cloud/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/enough/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/forum/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/gitlab/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

1
playbooks/icinga/icinga-playbook.yml

@ -2,4 +2,5 @@
- import_playbook: icinga-firewall-playbook.yml
- import_playbook: icinga-master-playbook.yml
- import_playbook: icinga-grafana-playbook.yml
when: icinga_grafana
- import_playbook: icinga-client-playbook.yml

2
playbooks/openedx/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/openvpn/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/packages/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/pad/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/postfix/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/psono/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/wazuh/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/weblate/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/website/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/wekan/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false

2
playbooks/wordpress/inventory/group_vars/icinga-service-group.yml

@ -0,0 +1,2 @@
---
icinga_grafana: false
Loading…
Cancel
Save