Skip to content

Commit 8c8361f

Browse files
committed
fix: latest influxdb2 and saltstack-formula format
BREAKING CHANGE: This breaks previous formula for v1 that is unsupported
1 parent 4dbfaf8 commit 8c8361f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+2346
-995
lines changed

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,8 @@ default-ubuntu-2004-master-py3: {extends: '.test_instance'}
152152
default-ubuntu-1804-master-py3: {extends: '.test_instance'}
153153
default-centos-stream8-master-py3: {extends: '.test_instance_failure_permitted'}
154154
default-centos-7-master-py3: {extends: '.test_instance'}
155-
default-fedora-36-master-py3: {extends: '.test_instance_failure_permitted'}
156-
default-fedora-35-master-py3: {extends: '.test_instance'}
155+
default-fedora-38-master-py3: {extends: '.test_instance'}
156+
default-fedora-37-master-py3: {extends: '.test_instance'}
157157
default-opensuse-leap-153-master-py3: {extends: '.test_instance'}
158158
default-opensuse-tmbl-latest-master-py3: {extends: '.test_instance_failure_permitted'}
159159
default-amazonlinux-2-master-py3: {extends: '.test_instance'}

.travis.yml

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,17 @@ jobs:
8383
## Define the rest of the matrix based on Kitchen testing
8484
# Make sure the instances listed below match up with
8585
# the `platforms` defined in `kitchen.yml`
86+
# NOTE: Please try to select up to six instances that add some meaningful
87+
# testing of the formula's behaviour. If possible, try to refrain from
88+
# the classical "chosing all the instances because I want to test on
89+
# another/all distro/s" trap: it will just add time to the testing (see
90+
# the discussion on #121). As an example, the set chosen below covers
91+
# the most used distros families, systemd and non-systemd and the latest
92+
# three supported Saltstack versions with python2 and 3.
93+
# As for `kitchen.yml`, that should still contain all of the platforms,
94+
# to allow for comprehensive local testing
95+
# Ref: https://github.com/saltstack-formulas/template-formula/issues/118
96+
# Ref: https://github.com/saltstack-formulas/template-formula/issues/121
8697
# - env: INSTANCE=default-debian-11-tiamat-py3
8798
# - env: INSTANCE=default-debian-10-tiamat-py3
8899
# - env: INSTANCE=default-debian-9-tiamat-py3
@@ -111,9 +122,9 @@ jobs:
111122
- env: INSTANCE=default-amazonlinux-2-master-py3
112123
- env: INSTANCE=default-oraclelinux-8-master-py3
113124
- env: INSTANCE=default-oraclelinux-7-master-py3
114-
# - env: INSTANCE=default-arch-base-latest-master-py3
115-
# - env: INSTANCE=default-gentoo-stage3-latest-master-py3
116-
# - env: INSTANCE=default-gentoo-stage3-systemd-master-py3
125+
- env: INSTANCE=default-arch-base-latest-master-py3
126+
- env: INSTANCE=default-gentoo-stage3-latest-master-py3
127+
- env: INSTANCE=default-gentoo-stage3-systemd-master-py3
117128
- env: INSTANCE=default-almalinux-8-master-py3
118129
- env: INSTANCE=default-rockylinux-8-master-py3
119130
# - env: INSTANCE=default-debian-11-3004-1-py3
@@ -172,15 +183,3 @@ jobs:
172183
edge: true
173184
# Run `semantic-release`
174185
script: 'npx [email protected]'
175-
176-
# Notification options: `always`, `never` or `change`
177-
notifications:
178-
webhooks:
179-
if: 'repo = saltstack-formulas/influxdb-formula'
180-
urls:
181-
- https://saltstack-formulas.zulipchat.com/api/v1/external/travis?api_key=HsIq3o5QmLxdnVCKF9is0FUIpkpAY79P&stream=CI&topic=saltstack-formulas%2Finfluxdb-formula&ignore_pull_requests=true
182-
on_success: always # default: always
183-
on_failure: always # default: always
184-
on_start: always # default: never
185-
on_cancel: always # default: always
186-
on_error: always # default: always

AUTHORS.md

Lines changed: 0 additions & 26 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 0 additions & 136 deletions
This file was deleted.

_modules/toml_lang.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# -*- coding: utf-8 -*-
22

3-
import toml
3+
try:
4+
import pytoml as toml
5+
except:
6+
import toml
47

58
def dumps(data):
6-
return toml.dumps(data)
9+
return toml.dumps(data)

docs/README.rst

Lines changed: 36 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -47,29 +47,47 @@ Available states
4747

4848
``influxdb``
4949
^^^^^^^^^^^^
50-
Installs InfluxDB from [provided packages](http://influxdb.com/download/).
50+
Installs and configures the influxdb package from upstream repository.
5151

52-
At the moment you **have** to specify the InfluxDB version in the
53-
``influxdb:version`` pillar.
52+
``influxdb.dependencies``
53+
^^^^^^^^^^^^^^^^^^^^^^^^^
54+
Installs any dependencies that may be needed to support the install of influxdb.
5455

55-
``influxdb.cli``
56-
^^^^^^^^^^^^^^^^
57-
Installs the [influxdb-cli](https://github.com/phstc/influxdb-cli) gem system wide.
56+
``influxdb.repo``
57+
^^^^^^^^^^^^^^^^^
58+
Installs the influxdb repository. See `InfluxDB doc <https://portal.influxdata.com/downloads/>`_ for more details.
59+
60+
``influxdb.package``
61+
^^^^^^^^^^^^^^^^^^^^
62+
Installs the influxdb package.
5863

5964
``influxdb.config``
6065
^^^^^^^^^^^^^^^^^^^
61-
Renders the InfluxDB configuration from data provided in the ``influxdb:conf``
62-
pillar.
63-
64-
It requires the installation of the
65-
[toml Python module](https://github.com/hit9/toml.py) via pip.
66-
67-
The formula ships with default configuration settings for various minor versions
68-
of InfluxDB. That means that, if you define configuration settings in your
69-
``influxdb.conf`` pillar, your settings will be merged with the default ones of
70-
that minor version. You can set ``influxdb:no_conf_defaults`` in your pillar if
71-
you want to completely specify the configuration yourself, without falling back
72-
to defaults.
66+
This state manages the file ``influxdb.conf`` under ``/etc/influxdb`` (template found in "influxdb/files"). The configuration is populated by values in "influxdb/map.jinja" based on the package's default values (and RedHat, Debian, Suse and Arch family distribution specific values), which can then be overridden by values of the same name in pillar.
67+
68+
``influxdb.service``
69+
^^^^^^^^^^^^^^^^^^^^
70+
Manages the startup and running state of the influxdb service.
71+
72+
``influxdb.clean``
73+
^^^^^^^^^^^^^^^^^^
74+
uninstalls and removes configs for the influxdb package from upstream repository.
75+
76+
``influxdb.repo.clean``
77+
^^^^^^^^^^^^^^^^^^^^^^^
78+
Uninstalls the influxdb repository.
79+
80+
``influxdb.package.clean``
81+
^^^^^^^^^^^^^^^^^^^^^^^^^^
82+
Uninstalls the influxdb package.
83+
84+
``influxdb.config.clean``
85+
^^^^^^^^^^^^^^^^^^^^^^^^^
86+
remoe the influxdb config files
87+
88+
``influxdb.service.clean``
89+
^^^^^^^^^^^^^^^^^^^^^^^^^^
90+
disables and stops the influxdb service
7391

7492
Testing
7593
-------

0 commit comments

Comments
 (0)