prometheus-formula icon indicating copy to clipboard operation
prometheus-formula copied to clipboard

Support for SUSE packages

Open tacerus opened this issue 3 years ago • 1 comments

PR progress checklist (to be filled in by reviewers)

  • [x] Changes to documentation are appropriate (or tick if not required)
  • [x] Changes to tests are appropriate (or tick if not required)
  • [ ] Reviews completed

What type of PR is this?

Add support for openSUSE Leap and SUSE Linux Enterprise.

Primary type

  • [ ] [build] Changes related to the build system
  • [ ] [chore] Changes to the build process or auxiliary tools and libraries such as documentation generation
  • [ ] [ci] Changes to the continuous integration configuration
  • [x] [feat] A new feature
  • [ ] [fix] A bug fix
  • [ ] [perf] A code change that improves performance
  • [ ] [refactor] A code change that neither fixes a bug nor adds a feature
  • [ ] [revert] A change used to revert a previous commit
  • [ ] [style] Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc.)

Secondary type

  • [ ] [docs] Documentation changes
  • [ ] [test] Adding missing or correcting existing tests

Does this PR introduce a BREAKING CHANGE?

No.

Related issues and/or pull requests

Describe the changes you're proposing

  • add correct package names and configuration file paths to map
  • add logic to prevent formula from changing users and groups managed by system packages

Pillar / config required to test the proposed changes

prometheus:
  wanted:
    component:
      - prometheus
      - alertmanager
      - node_exporter
      - blackbox_exporter
      - hacluster_exporter
      - postgres_exporter
      - saptune_exporter
      - webhook_snmp
  exporters:
    node_exporter:
      textfile_collectors:
        ipmitool:
          enable: true

  pkg:
    component:
      alertmanager:
        config:
          global:
            smtp_smarthost: foo:465
      node_exporter:
        environ:
          args:
            web.listen-address: ':9220'
      prometheus:
        environ:
          args:
            web.listen-address: ':9330'
        config:
          global:
            scrape_interval: 30s
      webhook_snmp:
        environ:
          args:
            snmp-port: ':1234'
      hacluster_exporter:
        environ:
          args:
            web.listen-address: ':9330'
      postgres_exporter:
        environ:
          args:
            web.listen-address: ':9330'

Debug log showing how the proposed changes work

GitHub blocks me from adding such long output. You can find it for three months on https://paste.opensuse.org/pastes/4007f64cfce4.

Documentation checklist

  • [ ] Updated the README (e.g. Available states).
  • [ ] Updated pillar.example.

Testing checklist

  • [ ] Included in Kitchen (i.e. under state_top).
  • [ ] Covered by new/existing tests (e.g. InSpec, Serverspec, etc.).
  • [ ] Updated the relevant test pillar.

Additional context

Used the opportunity to remove the trailing %} characters from the environment file template.

tacerus avatar Feb 15 '23 01:02 tacerus

How/where should I define a separate Inspec profile containing the packaged file permissions ?

tacerus avatar Feb 15 '23 02:02 tacerus