Skip to content

Commit

Permalink
(SIMP-9665) HOWTO Enable Client Reporting (#440)
Browse files Browse the repository at this point in the history
- Add HOWTO for enabling client reports
- Removed obsolete references to Travis CI

SIMP-9665 #comment Add HOWTO for enabling client reporting
  • Loading branch information
trevor-vaughan committed Sep 3, 2021
1 parent 35dec03 commit 5b05e15
Show file tree
Hide file tree
Showing 15 changed files with 134 additions and 79 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
* Wed Sep 01 2021 Trevor Vaughan <tvaughan@onyxpoint.com>
- Add HOWTO for enabling client reports
- Removed obsolete references to Travis CI

* Wed Jul 14 2021 Trevor Vaughan <tvaughan@onyxpoint.com>
- Correct SSL recovery documentation
- Convert all instances of 'puppet master' to 'puppet server'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ restart the :program:`puppetserver` process without the connection.
mv /etc/puppetlabs/puppet/routes.yaml /etc/puppetlabs/puppet/routes.yaml.backup
puppet config set --section server storeconfigs false
puppet config set --section server reports store
puppet config set --section main storeconfigs false
puppet resource service puppetserver ensure=stopped
Expand Down
72 changes: 72 additions & 0 deletions docs/HOWTO/20_Puppet/Enable_Client_Reporting.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
.. _ht-enable-client-reporting:

HOWTO Enable Client Reporting
=============================

Puppet has the ability to send run status reports back to the server at the
conclusion of each client run.

SIMP natively supports the `store` (default) and `puppetdb` report storage
endpoints and can be configured as shown below.

Enable Client Reporting
-----------------------

Set the following in :term:`Hiera` to enable client reporting:

.. code-block:: yaml
---
pupmod::report: true
Once puppet applies this setting, clients will start sending reports to the
server at the conclusion of each puppet run.

Filesystem Reports
------------------

By default, the puppet sever will enable the `store` reports target which will
store the client reports on the local filesystem.

To view the raw reports, you can navigate to the directory output by
``puppet config print reportdir``.

If the system has been set up for `puppetdb` reports and you need to change it
back to `store`, set the following in :term:`Hiera`:

.. code-block:: yaml
---
puppetdb::master::config::manage_report_processor: true
puppetdb::master::config::enable_reports: false
PuppetDB Reports
----------------

If you want to use a :term:`GUI` application like `Puppetboard`_ to connect to
:program:`puppetdb` for reports, then you will need to ensure that the reports
are being sent to :program:`puppetdb` by the server.

To do this, set the following in :term:`Hiera`:

.. code-block:: yaml
---
puppetdb::master::config::manage_report_processor: true
puppetdb::master::config::enable_reports: true
CLI Reporting
-------------

You can use the `PuppetDB API`_ to get node reporting using :program:`curl` or
any other application that connect to a web endpoint and process :term:`JSON`
output.

SIMP provides a tool called :program:`puppetlast` that can read from both the
`PuppetDB API`_ as well as the locally stored :term:`YAML` reports for a simple
view of your environment.

The :program:`puppetlast` command is provided by the :package:`simp-utils` RPM.

.. _Puppetboard: https://github.com/voxpupuli/puppetboard
.. _PuppetDB API: https://puppet.com/docs/puppetdb/latest/api/index.html
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,6 @@ def setup(app):
r'^https?:\/\/.*\.tar(\..{2,3})?$',
# links that the resolver has trouble with
r'^https?:\/\/groups\.google\.com\/forum\/.+',
r'^https?:\/\/travis-ci\.org(/.*|$)',
r'^https?:\/\/bundler\.io/rationale\.html',
# Puppet redirects everything everywhere
r'^https?:\/\/.*\.puppet\.com(/.*|$)',
Expand Down
3 changes: 1 addition & 2 deletions docs/contributors_guide/Contribution_Procedure.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ done to maintain a more legible commit history on `master`.
'`Allow edits from maintainers`_' checkbox checked to let a team member add
commits to your pull request.

#. `TravisCI`_ will run the spec tests for the branch and a member of the SIMP
#. GitHub Actions will run the spec tests for the branch and a member of the SIMP
team will `review`_ your submission. You should receive emails from GitHub as
code reviews progress.

Expand Down Expand Up @@ -203,7 +203,6 @@ the future.
.. _JIRA issues can be referenced: https://support.atlassian.com/bitbucket-cloud/docs/use-smart-commits/
.. _SIMP JIRA: https://simp-project.atlassian.net
.. _Squash and Merge: https://github.blog/2016-04-01-squash-your-commits/
.. _TravisCI: https://travis-ci.com/simp
.. _feature branch: https://www.atlassian.com/git/tutorials/comparing-workflows#feature-branch-workflow
.. _pull request: https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
.. _review: https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/reviewing-proposed-changes-in-a-pull-request
Expand Down
5 changes: 0 additions & 5 deletions docs/contributors_guide/Resources.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,15 @@ Useful Resources

* `GitHub Guides`_

* `TravisCI`_

* SIMP Project Status Links

* `Open Changes`_
* `Changes that need attention`_
* `Failing Changes in TravisCI`_
* `Pending Changes`_
* `Merged Changes`_

.. _GitHub Guides: https://guides.github.com
.. _TravisCI: https://travis-ci.com/simp
.. _Open Changes: https://github.com/search?utf8=%E2%9C%93&q=org%3Asimp+is%3Apr+is%3Aopen&type=Issues&ref=searchresults
.. _Changes that need attention: https://github.com/search?utf8=%E2%9C%93&q=org%3Asimp+is%3Apr+is%3Aopen+comments%3A%3E1&type=Issues&ref=searchresults
.. _Failing Changes in TravisCI: https://github.com/search?utf8=%E2%9C%93&q=org%3Asimp+is%3Apr+is%3Amerged+status%3Afailure&type=Issues&ref=searchresults
.. _Pending Changes: https://github.com/search?utf8=%E2%9C%93&q=org%3Asimp+is%3Apr+is%3Aopen+status%3Apending&type=Issues&ref=searchresults
.. _Merged Changes: https://github.com/search?utf8=%E2%9C%93&q=org%3Asimp+is%3Apr+is%3Amerged&type=Issues&ref=searchresults
Original file line number Diff line number Diff line change
Expand Up @@ -160,18 +160,18 @@ This check verifies that the ``simp-core`` unit and acceptance test
have succeeded.

To verify that the ``simp-core`` unit tests have succeeded, examine
the test results in `TravisCI`_.
the test results in GitHub Actions.

* Navigate to the project's TravisCI results page and verify the
* Navigate to the project's GitHub Actions results page and verify the
tests for the development branch to be tagged and released have
passed. For our project, this page is
https://travis-ci.com/simp/simp-core/branches
https://github.com/simp/simp-core/actions

.. IMPORTANT::

If the tests in TravisCI fail, you **must** fix them before
proceeding. The automated release procedures will only
succeed, if the unit tests succeed in TravisCI.
If the tests in GitHub Actions fail, you **must** fix them before
proceeding. The automated release procedures will only succeed, if the
tests succeed.

To verify that the ``simp-core`` acceptance tests have succeeded

Expand Down Expand Up @@ -502,5 +502,4 @@ tests pass`_.

.. _Docker: https://www.docker.com
.. _GitHub: https://github.com
.. _TravisCI: https://travis-ci.com
.. _simp-packer: https://github.com/simp/simp-packer
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
Release ``simp-core`` to GitHub and PuppetForge
===============================================

``simp-core`` is configured to automatically create a `GitHub`_
release and push the (meta-module) release to `PuppetForge`_, when an
annotated tag is created for the `GitHub`_ project **and** the
`TravisCI`_ tests for the annotated tag push succeed.
``simp-core`` is configured to automatically create a `GitHub`_ release and push
the (meta-module) release to `PuppetForge`_, when an annotated tag is created
for the `GitHub`_ project **and** the GitHub Actions tests for the annotated tag push
succeed.

To create the releases from an annotated tag:

Expand All @@ -26,17 +26,17 @@ To create the releases from an annotated tag:
git tag -a 6.0.2 -F Changelog.rst --cleanup--whitespace
git push origin 6.0.2
#. Verify `TravisCI`_ completes successfully
#. Verify GitHub Actions tests complete successfully

.. IMPORTANT::
If any of the required TravisCI builds for the project fail, for
example due to intermittent connectivity problems with `GitHub`_,
you can complete the release process by manually restarting the
failed build on the Travis page for that build.

If any of the required GitHub Actions builds for the project fail, for example
due to intermittent connectivity problems, you can complete the release
process by manually restarting the failed build on the GitHub Actions page
for that build.

#. Verify release exists on `GitHub`_. This release will have been
created by ``simp-auto``.

.. _GitHub: https://github.com
.. _PuppetForge: https://forge.puppet.com
.. _TravisCI: https://travis-ci.com
Original file line number Diff line number Diff line change
Expand Up @@ -108,19 +108,17 @@ This check verifies that an RPM can be generated for this module from
Verify unit tests pass
----------------------

This check verifies that the component's unit tests have succeeded
in `TravisCI`_:
This check verifies that the component's unit tests have succeeded.

* Navigate to the project's `TravisCI`_ results page and verify the
* Navigate to the project's GitHub Actions results page and verify the
tests for the development branch to be tagged and released have
passed. For our project, this page is
https://travis-ci.com/simp/simp-adapter/branches
https://github.com/simp/simp-adapter/actions

.. IMPORTANT::

If the tests in TravisCI fail, you **must** fix them before
proceeding. The automated release procedures will only
succeed, if the unit tests succeed in TravisCI.
If the tests are failing, you **must** fix them before proceeding. The
automated release procedures will only succeed if the unit tests succeed.

Verify acceptance tests pass
----------------------------
Expand Down Expand Up @@ -243,4 +241,3 @@ CentOS 7:
.. _GitHub: https://github.com
.. _simp-packer: https://github.com/simp/simp-packer
.. _`RPM spec file template`: https://raw.githubusercontent.com/simp/rubygem-simp-rake-helpers/master/lib/simp/rake/helpers/assets/rpm_spec/simpdefault.spec
.. _TravisCI: https://travis-ci.com
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@ Automated Release Steps

All SIMP ISO-related project are configured to automatically create a
`GitHub`_ release, when an annotated tag is created for the `GitHub`_
project **and** the `TravisCI`_ tests for the annotated tag push succeed.
Each project contains a deploy step for the ``releases`` provider
in its ``.travis.yml`` file.
project.

To create the a release from an annotated tag:

Expand Down Expand Up @@ -47,15 +45,6 @@ To create the a release from an annotated tag:
git tag -a 4.0.4 -F foo
git push origin 4.0.4

#. Verify `TravisCI`_ completes successfully

.. IMPORTANT::
If any of the required TravisCI builds for the project fail, for
example due to intermittent connectivity problems with `GitHub`_,
you can complete the release process by manually restarting the
failed build on the Travis page for that build. However, if the
build fails due to deploy key issues skip to the next section.

#. Verify release exists on `GitHub`_. This release will have been created by
``simp-auto``.

Expand All @@ -76,4 +65,3 @@ correct the issue:
notes.

.. _GitHub: https://github.com
.. _TravisCI: https://travis-ci.com
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,18 @@ Verify unit tests pass
----------------------

This check verifies that the component's unit tests have succeeded
in `TravisCI`_:
in GitHub Actions.

* Navigate to the project's `TravisCI`_ results page and verify the
* Navigate to the project's GitHub Actions results page and verify the
tests for the development branch to be tagged and released have
passed. For our project, this page is
https://travis-ci.com/simp/rubygem-simp-rake-helpers/branches
https://github.com/simp/rubygem-simp-rake-helpers/actions

.. IMPORTANT::

If the tests in TravisCI fail, you **must** fix them before
proceeding. The automated release procedures will only
succeed, if the unit tests succeed in TravisCI.
If the tests in GitHub Actions fail, you **must** fix them before
proceeding. The automated release procedures will only succeed, if the
unit tests succeed.

Verify acceptance tests pass
----------------------------
Expand Down Expand Up @@ -155,4 +155,3 @@ and test tasks.
.. _GitHub: https://github.com
.. _RubyGems.org: https://rubygems.org/
.. _TravisCI: https://travis-ci.com
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Common Release Steps
Most of the SIMP Ruby gems are configured to automatically create a
`GitHub`_ release and push the release to `RubyGems.org`_, when an
annotated tag is created for the `GitHub`_ project **and** the
`TravisCI`_ tests for the annotated tag push succeed.
GitHub Actions tests for the annotated tag push succeed.

To create the releases from an annotated tag:

Expand Down Expand Up @@ -50,20 +50,19 @@ To create the releases from an annotated tag:
For markdown-style changelogs, you will need to specify
``--cleanup=whitespace`` so comment headers are not stripped.

#. Verify `TravisCI`_ completes successfully
#. Verify GitHub Actions completes successfully

.. IMPORTANT::

If any of the required TravisCI builds for the project fail, for
example due to intermittent connectivity problems with `GitHub`_,
you can complete the release process by manually restarting the
failed build on the Travis page for that build.
If any of the required GitHub Actions builds for the project fail, for
example due to intermittent connectivity problems, you can complete the
release process by manually restarting the failed build on the GitHub
Actions page for that build.

Automated Release Steps
-----------------------

This section applies to gems that have a ``deploy`` stage with a ``releases``
provider in their ``.travis.yml`` file.
This section applies to gems that have a ``release`` GitHub Action configured.

#. Verify release exists on `GitHub`_. This release will have been created by
``simp-auto``.
Expand Down Expand Up @@ -100,4 +99,3 @@ To create the releases from an annotated tag:

.. _GitHub: https://github.com
.. _RubyGems.org: https://rubygems.org/
.. _TravisCI: https://travis-ci.com
Original file line number Diff line number Diff line change
Expand Up @@ -130,18 +130,18 @@ Verify unit tests pass
----------------------

This check verifies that the component's unit tests have succeeded
in `TravisCI`_:
in GitHub Actions.

* Navigate to the project's TravisCI results page and verify the
* Navigate to the project's GitHub Actions results page and verify the
tests for the development branch to be tagged and released have
passed. For our project, this page is
https://travis-ci.com/simp/pupmod-simp-iptables/branches
https://github.com/simp/pupmod-simp-iptables/actions

.. IMPORTANT::

If the tests in TravisCI fail, you **must** fix them before
proceeding. The automated release procedures will only
succeed, if the unit tests succeed in TravisCI.
If the tests in GitHub Actions fail, you **must** fix them before proceeding.
The automated release procedures will only succeed, if the unit tests
succeed.

Verify acceptance tests pass
----------------------------
Expand Down Expand Up @@ -364,4 +364,3 @@ development environment:
.. _PuppetForge: https://forge.puppet.com
.. _simp-packer: https://github.com/simp/simp-packer
.. _`RPM spec file template`: https://raw.githubusercontent.com/simp/rubygem-simp-rake-helpers/master/lib/simp/rake/helpers/assets/rpm_spec/simpdefault.spec
.. _TravisCI: https://travis-ci.com

0 comments on commit 5b05e15

Please sign in to comment.