Skip to content

An Ansible Role to install and configure Performance Co-Pilot.

License

Notifications You must be signed in to change notification settings

while-true-do/ansible-role-srv_pcp

Repository files navigation

Github (tag) Github (license) Github (issues) Github (pull requests)

Travis (com)

Ansible (min. version) Ansible (platforms) Ansible (tags)

Ansible Role: srv_pcp

An Ansible Role to install and configure Performance Co-Pilot.

Motivation

Performance Co-Pilot is a system performance analysis toolkit. The tool can be used for multiple purposes and supports lot's of software via "Performance Metrics Domain Agents (pmda)".

Description

This Role installs Performance Co-Pilot and configures it.

  • configure pmcd to collect logs as a "Collector Host"
  • configure pmlogger to fetch logs as a "Monitoring Host"

Requirements

Used Modules:

Installation

Install from Ansible Galaxy

ansible-galaxy install while_true_do.srv_pcp

Install from Github

git clone https://github.com/while-true-do/ansible-role-srv_pcp.git while_true_do.srv_pcp

Usage

Role Variables

---
# defaults file for while_true_do.srv_pcp

## Package Management
wtd_srv_pcp_package:
  - pcp
  - pcp-system-tools
# Extra pmda packages, to be installed
# Enabling the metrics is currently not supported.
wtd_srv_pcp_package_pmda: []
# State can be present|latest|absent
wtd_srv_pcp_package_state: "present"

## Configuration Management
# "pmcd_local: 0" permits remote connections, 1 forbids remote connections
wtd_srv_pcp_conf_pmcd_local: 1
wtd_srv_pcp_conf_pmcd_maxpending: 5
wtd_srv_pcp_conf_pmcd_root_agent: 1
wtd_srv_pcp_conf_pmcd_restart_agents: 1
wtd_srv_pcp_conf_pmcd_wait_timeout: 60

wtd_srv_pcp_conf_pmlogger_control_d: []
# Simple example with hostname
# - name: "labrat01"
#   host: "labrat01"
# IP example
# - name: "labrat01"
#   host: "192.168.0.100"
# FQDN Example
# - name: "labrat01.while-true-do.io"
#   host: "labrat01.while-true-do.io"
# Full Example
# - name: "labrat01"
#   host: "labrat01"
#   primary: "n"
#   socks: "n"
#   endtime: "24h10m"

## Service Management
wtd_srv_pcp_service:
  - pmcd
  - pmlogger
# State can be started|stopped
wtd_srv_pcp_service_state: "started"
# Enabled can be true|false
wtd_srv_pcp_service_enabled: true

## Firewalld Management
wtd_srv_pcp_fw_mgmt: true
wtd_srv_pcp_fw_service: "pmcd"
# State can be enabled|disabled
wtd_srv_pcp_fw_service_state: "enabled"
# Zone can be according to defined zones on your machine.
wtd_srv_pcp_fw_service_zone: "public"

Example Playbook

Running Ansible Roles can be done in a playbook.

Simple

---
- hosts: all
  roles:
    - role: while_true_do.srv_pcp

Configure a Collector Host (remote accessible)

- hosts: all
  roles:
    - role: while_true_do.srv_pcp
      wtd_srv_pcp_conf_pmcd_local: 0

Configure a Monitor Host (to fetch from other hosts)

- hosts: all
  roles:
    - role: while_true_do.srv_pcp
      wtd_srv_pcp_conf_pmcd_local: 0
      wtd_srv_pcp_conf_pmlogger_control_d:
        - name: "labrat01"
          host: "labrat01.wtd.local"
        - name: "labrat02"
          host: "192.168.122.10"
        - name: "labrat03"
          host: "labrat03"

Known Issues

  1. RedHat Testing is currently not possible in public, due to limitations in subscriptions.
  2. Some services and features cannot be tested properly, due to limitations in docker.

Testing

Most of the "generic" tests are located in the Test Library.

Ansible specific testing is done with Molecule.

Infrastructure testing is done with testinfra.

Automated testing is done with Travis CI.

Contribute

Thank you so much for considering to contribute. We are very happy, when somebody is joining the hard work. Please fell free to open Bugs, Feature Requests or Pull Requests after reading the Contribution Guideline.

See who has contributed already in the kudos.txt.

License

This work is licensed under a BSD-3-Clause License.

Contact