Skip to content

Commit

Permalink
Release version 2.4.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lbetz committed Nov 5, 2021
1 parent bad71da commit 92b5227
Show file tree
Hide file tree
Showing 5 changed files with 209 additions and 22 deletions.
18 changes: 17 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# Change Log

## [v2.4.0](https://github.com/icinga/puppet-icinga/tree/v2.4.0) (2021-11-05)
[Full Changelog](https://github.com/icinga/puppet-icinga/compare/v2.3.3...v2.4.0)

**Implemented enhancements:**

- Remove listen from icinga::web [\#40](https://github.com/Icinga/puppet-icinga/issues/40)
- Extend icinga::database with a parameter to set database encoding [\#39](https://github.com/Icinga/puppet-icinga/issues/39)
- Add director support [\#38](https://github.com/Icinga/puppet-icinga/issues/38)

## [v2.3.3](https://github.com/icinga/puppet-icinga/tree/v2.3.3) (2021-09-03)
[Full Changelog](https://github.com/icinga/puppet-icinga/compare/v2.3.2...v2.3.3)

**Fixed bugs:**

- Namespace function postgresql::postgresql\_password does not work on Puppet 5 [\#36](https://github.com/Icinga/puppet-icinga/issues/36)

## [v2.3.2](https://github.com/icinga/puppet-icinga/tree/v2.3.2) (2021-08-17)
[Full Changelog](https://github.com/icinga/puppet-icinga/compare/v2.3.1...v2.3.2)

Expand Down Expand Up @@ -121,4 +137,4 @@
## [v0.1.0](https://github.com/icinga/puppet-icinga/tree/v0.1.0) (2020-04-20)


\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*
168 changes: 167 additions & 1 deletion REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@
* [`icinga::server`](#icingaserver): Setup a Icinga server.
* [`icinga::web`](#icingaweb): Setup Icinga Web 2 including a database backend for user settings.
* [`icinga::web::database`](#icingawebdatabase): Setup Icinga Web 2 database for user settings.
* [`icinga::web::director`](#icingawebdirector): Setup Director module for Icinga Web 2
* [`icinga::web::director::database`](#icingawebdirectordatabase): Setup Director database.
* [`icinga::worker`](#icingaworker): Setup a Icinga worker (aka satellite).

#### Private Classes
Expand Down Expand Up @@ -160,7 +162,7 @@ Default value: `'icinga2'`

Data type: `Boolean`

Create database.
Create database and import schema.

Default value: ``false``

Expand Down Expand Up @@ -379,6 +381,22 @@ Icinga API user password.

Default value: ``undef``

##### `director_api_user`

Data type: `String`

Icinga API director user to connect Icinga 2.

Default value: `'director'`

##### `director_api_pass`

Data type: `Optional[String]`

Icinga API director user password.

Default value: ``undef``

##### `logging_type`

Data type: `Enum['file', 'syslog']`
Expand Down Expand Up @@ -567,6 +585,154 @@ Database user name.

Default value: `'icingaweb2'`

### `icinga::web::director`

Setup Director module for Icinga Web 2

#### Parameters

The following parameters are available in the `icinga::web::director` class.

##### `service_ensure`

Data type: `Stdlib::Ensure::Service`

Manages if the Director service should be stopped or running.

Default value: `'running'`

##### `service_enable`

Data type: `Boolean`

If set to true the Director service will start on boot.

Default value: ``true``

##### `db_type`

Data type: `Enum['mysql', 'pgsql']`

Type of your database. Either `mysql` or `pgsql`.

Default value: `'mysql'`

##### `db_host`

Data type: `Stdlib::Host`

Hostname of the database.

Default value: `'localhost'`

##### `db_port`

Data type: `Optional[Stdlib::Port]`

Port of the database.

Default value: ``undef``

##### `db_name`

Data type: `String`

Name of the database.

Default value: `'director'`

##### `db_user`

Data type: `String`

Username for DB connection.

Default value: `'director'`

##### `db_pass`

Data type: `String`

Password for DB connection.

##### `endpoint`

Data type: `String`

Endpoint object name of Icinga 2 API.

##### `manage_database`

Data type: `Boolean`

Create database and import schema.

Default value: ``false``

##### `api_host`

Data type: `Stdlib::Host`

Icinga 2 API hostname.

Default value: `'localhost'`

##### `api_user`

Data type: `String`

Icinga 2 API username.

Default value: `'director'`

##### `api_pass`

Data type: `String`

Icinga 2 API password.

### `icinga::web::director::database`

Setup Director database.

#### Parameters

The following parameters are available in the `icinga::web::director::database` class.

##### `db_type`

Data type: `Enum['mysql','pgsql']`

What kind of database type to use.

##### `web_instances`

Data type: `Array[Stdlib::Host]`

List of Hosts to allow write access to the database. Usually an Icinga Web 2 instance.

##### `db_pass`

Data type: `String`

Password to connect the database.

##### `db_name`

Data type: `String`

Name of the database.

Default value: `'director'`

##### `db_user`

Data type: `String`

Database user name.

Default value: `'director'`

### `icinga::worker`

Setup a Icinga worker (aka satellite).
Expand Down
24 changes: 14 additions & 10 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,20 @@ Before starting any test, you should make sure you have installed the Puppet PDK
also Vagrant and VirtualBox have to be installed for acceptance tests.

Required gems are installed with `bundler`:
```
``` bash
cd puppet-icinga
pdk bundle install
```
Or if already installed do an update.
``` bash
pdk bundle update
```

## Validation tests
Validation tests will check all manifests, templates and ruby files against syntax violations and style guides .

Run validation tests:
```
``` bash
cd puppet-icinga
pdk bundle exec rake validate
```
Expand All @@ -23,7 +27,7 @@ pdk bundle exec rake validate
With puppet-lint we test if our manifests conform to the recommended style guides from Puppet.

Run lint tests:
```
``` bash
cd puppet-icinga
pdk bundle exec rake lint
```
Expand All @@ -32,13 +36,13 @@ pdk bundle exec rake lint
For unit testing we use [RSpec]. All classes, defined resource types and functions should have appropriate unit tests.

Run unit tests:
```
``` bash
cd puppet-icinga
pdk test unit
```
``` bash
Or dedicated tests:
```
``` bash
pdk test unit --tests=spec/classes/repos_spec.rb,spec/classes/redis_spec.rb
```

Expand All @@ -50,24 +54,24 @@ We define these tests with [Litmus] and run them on VMs by using [Vagrant].
All available acceptance tests are listed in the `spec/acceptance` directory.

Provision the virtual machines:
```
``` bash
cd puppet-icinga
pdk bundle exec rake litmus:provision_list[vagrant]
```

Install the Agent and the Modul itself:
```
``` bash
pdk bundle exec rake litmus:install_agent
pdk bundle exec bolt task run provision::fix_secure_path --modulepath spec/fixtures/modules -i inventory.yaml -t ssh_nodes
pdk bundle exec rake litmus:install_module
```

Run the acceptance tests:
```
``` bash
pdk bundle exec rake litmus:acceptance:parallel
```

Cleanup and remove the virtual machines:
```
``` bash
pdk bundle exec rake litmus:tear_down
```
16 changes: 8 additions & 8 deletions manifests/web/director.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,22 +10,22 @@
# @param [Enum['mysql', 'pgsql']] db_type
# Type of your database. Either `mysql` or `pgsql`.
#
# @param [Optional[Stdlib::Host]] db_host
# @param [Stdlib::Host] db_host
# Hostname of the database.
#
# @param [Optional[Stdlib::Port]] db_port
# Port of the database.
#
# @param [Optional[String]] db_name
# @param [String] db_name
# Name of the database.
#
# @param [Optional[String]] db_user
# @param [String] db_user
# Username for DB connection.
#
# @param [Optional[String]] db_pass
# @param [String] db_pass
# Password for DB connection.
#
# @param [Optional[String]] endpoint
# @param [String] endpoint
# Endpoint object name of Icinga 2 API.
#
# @param [Boolean] manage_database
Expand All @@ -34,10 +34,10 @@
# @param [Stdlib::Host] api_host
# Icinga 2 API hostname.
#
# @param [Optional[String]] api_user
# @param [String] api_user
# Icinga 2 API username.
#
# @param [Optional[String]] api_pass
# @param [String] api_pass
# Icinga 2 API password.
#
class icinga::web::director(
Expand All @@ -46,7 +46,7 @@
String $endpoint,
Stdlib::Ensure::Service $service_ensure = 'running',
Boolean $service_enable = true,
Enum['mysql','pgsql'] $db_type = 'mysql',
Enum['mysql', 'pgsql'] $db_type = 'mysql',
Stdlib::Host $db_host = 'localhost',
Optional[Stdlib::Port] $db_port = undef,
String $db_name = 'director',
Expand Down
5 changes: 3 additions & 2 deletions metadata.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "icinga-icinga",
"version": "2.3.3",
"version": "2.4.0",
"author": "Icinga",
"summary": "Puppet Module to manage Icinga repositories and provides a base class for Icinga Redis",
"license": "Apache-2.0",
Expand Down Expand Up @@ -59,7 +59,8 @@
"operatingsystemrelease": [
"8",
"9",
"10"
"10",
"11"
]
},
{
Expand Down

0 comments on commit 92b5227

Please sign in to comment.