Skip to content

Commit 3baa41d

Browse files
authored
Merge pull request #216 from Icinga/docs/databases
Adds docs on database setup
2 parents b96d50d + 0a37c99 commit 3baa41d

File tree

3 files changed

+49
-2
lines changed

3 files changed

+49
-2
lines changed

doc/getting-started.md

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
11
### Getting Started
22

3-
The collection includes two roles in the current version.
3+
The collection includes six roles in the current version.
44

55
* icinga.repos: Role to manage repositories
66
* [Documentation: doc/role-repos](role-repos/role-repos.md)
77
* icinga.icinga2: Role to install and manage Icinga 2 instances.
88
* [Documentation: doc/role-icinga2](role-icinga2/role-icinga2.md)
9+
* icinga.icingadb: Role to install and manage IcingaDB, Icinga2's new data backend.
10+
* [Documentation: doc/role-icingadb](role-icingadb/role-icingadb.md)
11+
* icinga.icingadb_redis: Role to install and manage Redis, IcingaDB's cache backend.
12+
* [Documentation: doc/role-icingadb_redis](role-icingadb_redis/role-icingadb_redis.md)
13+
* icinga.icingaweb2: Role to install and manage Icinga Web 2.
14+
* [Documentation: doc/role-icingaweb2](role-icingaweb2/role-icingaweb2.md)
15+
* icinga.monitoring_plugins: Role to install and manage Icinga2 compatible monitoring plugins.
16+
* [Documentation: doc/role-monitoring_plugins](role-monitoring_plugins/role-monitoring_plugins.md)
917

1018

1119
---
@@ -39,6 +47,36 @@ ansible-galaxy collection build ansible-collection-icinga
3947
ansible-galaxy collection install icinga-icinga-0.3.0.tar.gz
4048
```
4149

50+
## Databases
51+
52+
Icinga2 relies on relational databases for many parts of its functionality. **None** of those databases get installed by the roles. You need to install and configure them yourself. For doing so, there are many ways available, e.g. the Ansible role [geerlingguy.mysql](https://galaxy.ansible.com/geerlingguy/mysql) for MySQL flavours (both MySQL and MariaDB) or [geerlingguy.postgresql](https://galaxy.ansible.com/geerlingguy/postgresql) for PostGresQL:
53+
54+
```yaml
55+
- name: Configure databases for Icinga2
56+
hosts: database
57+
vars:
58+
mysql_databases:
59+
- name: icingadb
60+
- name: icingaweb
61+
- name: vspheredb
62+
encoding: utf8mb4
63+
collation: utf8mb4_unicode_ci
64+
- name: director
65+
mysql_users:
66+
- name: icingadb-user
67+
host: localhost
68+
password: icingadb-password
69+
priv: "icingadb.*:ALL"
70+
[...]
71+
roles:
72+
- role: geerlingguy.mysql
73+
```
74+
75+
> [!NOTE]
76+
> Schema migrations needed for the respective Icinga components to work will be handled either by the respective roles or by the Icinga components themselves.
77+
78+
79+
4280
## Example Playbooks
4381
4482
This is an example on how to install an Icinga 2 server/master instance.

doc/role-icingadb/role-icingadb.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ This role installs and configures the IcingaDB daemon. In addition it can also i
55
It serves as the official, more performant successor to Icinga IDO. More information about its purpose and design can be found [in the official documentation](https://icinga.com/docs/icinga-db/latest/doc/01-About/).
66

77

8-
> :information_source: In many scenarios you want to install the [icingadb_redis role](../role-icingadb_redis/) together with this role. It is part of this collection, too.
8+
> [!TIP]
9+
> In many scenarios you want to install the [icingadb_redis role](../role-icingadb_redis/) together with this role. It is part of this collection, too.
10+
11+
## Database
12+
13+
IcingaDB relies on a relational database to persist received data. This database **won't** be created by this role - you need to deploy and configure one in advance. For more information, see the [Databases](../getting-started.md#databases) section in the getting started guide.
914

1015
## Variables
1116

doc/role-icingaweb2/role-icingaweb2.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ The role icingaweb2 installs and configures Icinga Web 2 and its modules.
77
* [IcingaDB](./module-icingadb.md)
88
* [Monitoring](./module-monitoring.md)
99

10+
## Databases
11+
12+
Icingaweb2 and some of its modules rely on a relational database to persist data. These databases **won't** be created by this role - you need to deploy and configure them in advance. For more information, see the [Databases](../getting-started.md#databases) section in the getting started guide.
13+
1014
## Variables
1115

1216
### Icinga Web 2 DB Configuration

0 commit comments

Comments
 (0)