aboutsummaryrefslogtreecommitdiffstats
path: root/docker/ansible/roles
diff options
context:
space:
mode:
authorEmma Foley <efoley@redhat.com>2021-07-13 19:23:12 +0100
committerEmma Foley <efoley@redhat.com>2021-12-17 09:48:20 +0000
commit5cc8e3c94bdf62c5fd9838e4987d4e670d36f9ed (patch)
tree10fa2f20c7e537836e99ce3ba9bfda6edc554d8f /docker/ansible/roles
parentf3051b17dfc6e45f6cec50940c560e4cbb1d3774 (diff)
Add a playbook that tests collectd 6 vs collectd5
The playbook will: * build collectd-6, collectd-latest and flask app containers * generate a set of collectd configs * launch the collectd-6, collectd-latest with the generated configs * run the flask app which has a http_server that receives metrics from collectd v5 and collectd v6 * display the received metrics from both versions of collectd Collectd v5 shows PUTVAL Collectd v6 shows PUTMETRIC The playbook takes the following parameters: * PR (optional) The PRID for an upstream collectd pull request that will be passed to the collectd 6 container build * plugin (optional) The name of the plugin that is bneing ported This will filter the received metrics to show the value passed. Additional updates to existing roles include: * run_collectd parameterises the collectd container name so that the role can be reused for launching multiple collectd containers by passing distinct names. Change-Id: Ia62196c347387d380aae69e14ed0dd8e2c76d9c9 Signed-off-by: Emma Foley <efoley@redhat.com>
Diffstat (limited to 'docker/ansible/roles')
-rw-r--r--docker/ansible/roles/build_collectd/tasks/main.yml2
-rw-r--r--docker/ansible/roles/run_collectd/tasks/main.yml4
-rw-r--r--docker/ansible/roles/run_collectd/vars/main.yml1
3 files changed, 4 insertions, 3 deletions
diff --git a/docker/ansible/roles/build_collectd/tasks/main.yml b/docker/ansible/roles/build_collectd/tasks/main.yml
index b8d5f4b9..2ab92296 100644
--- a/docker/ansible/roles/build_collectd/tasks/main.yml
+++ b/docker/ansible/roles/build_collectd/tasks/main.yml
@@ -54,7 +54,7 @@
args:
COLLECTD_FLAVOR: collectd-6
COLLECTD_TAG: "{{ COLLECTD_TAG | default('collectd-6.0') }}"
- COLLECTD_PULL_REQUESTS: "{{ COLLECTD_PULL_REQUESTS | default(omit) }}"
+ COLLECTD_CONFIG_CMD_ARGS: "{{ COLLECTD_CONFIG_CMD_ARGS if COLLECTD_CONFIG_CMD_ARGS is defined }}"
source: build
tags:
- collectd-6
diff --git a/docker/ansible/roles/run_collectd/tasks/main.yml b/docker/ansible/roles/run_collectd/tasks/main.yml
index 2c5d0e67..bf5aabf5 100644
--- a/docker/ansible/roles/run_collectd/tasks/main.yml
+++ b/docker/ansible/roles/run_collectd/tasks/main.yml
@@ -15,7 +15,7 @@
- name: remove bar-collectd container
docker_container:
- name: bar-collectd
+ name: "{{ collectd_container_name }}"
state: absent
tags:
- rm_containers
@@ -52,7 +52,7 @@
- name: launch collectd container
docker_container:
- name: bar-collectd
+ name: "{{ collectd_container_name }}"
image: "{{ collectd_image_name }}"
volumes: "{{ volumes_list }}"
entrypoint: "/run_collectd.sh"
diff --git a/docker/ansible/roles/run_collectd/vars/main.yml b/docker/ansible/roles/run_collectd/vars/main.yml
index 96c9032e..26007ecf 100644
--- a/docker/ansible/roles/run_collectd/vars/main.yml
+++ b/docker/ansible/roles/run_collectd/vars/main.yml
@@ -13,6 +13,7 @@
# limitations under the License.
---
+collectd_container_name: "bar-collectd"
default_flavor: "{{ flavor|default('stable')|string }}"
flavor_image_name: "{{
'barometer-collectd-latest' if (default_flavor == 'master' or default_flavor == 'latest') else