aboutsummaryrefslogtreecommitdiffstats
path: root/docker
diff options
context:
space:
mode:
Diffstat (limited to 'docker')
-rw-r--r--docker/ansible/collectd_build.yml22
-rw-r--r--docker/ansible/roles/build_collectd/tasks/main.yml71
2 files changed, 93 insertions, 0 deletions
diff --git a/docker/ansible/collectd_build.yml b/docker/ansible/collectd_build.yml
new file mode 100644
index 00000000..d5cad076
--- /dev/null
+++ b/docker/ansible/collectd_build.yml
@@ -0,0 +1,22 @@
+# Copyright 2021 Anuket and others
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+# ansible-playbook collectd_build.yml
+#
+- hosts: localhost
+ become: true
+ become_user: root
+ gather_facts: true
+ roles:
+ - name: build_collectd
diff --git a/docker/ansible/roles/build_collectd/tasks/main.yml b/docker/ansible/roles/build_collectd/tasks/main.yml
new file mode 100644
index 00000000..b8d5f4b9
--- /dev/null
+++ b/docker/ansible/roles/build_collectd/tasks/main.yml
@@ -0,0 +1,71 @@
+# Copyright 2021 Anuket and others
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+---
+- name: Build stable container
+ docker_image:
+ name: opnfv/barometer-collectd
+ build:
+ path: "{{ playbook_dir }}/../barometer-collectd/"
+ source: build
+ tags:
+ - stable
+
+- name: Build the latest container
+ docker_image:
+ name: opnfv/barometer-collectd-latest
+ build:
+ path: "{{ playbook_dir }}/../../"
+ dockerfile: "docker/barometer-collectd-latest/Dockerfile"
+ source: build
+ tags:
+ - latest
+
+- name: Build collectd-experimental
+ docker_image:
+ name: opnfv/barometer-collectd-experimental
+ build:
+ path: "{{ playbook_dir }}/../../"
+ dockerfile: "docker/barometer-collectd-experimental/Dockerfile"
+ args:
+ COLLECTD_FLAVOR: experimental
+ COLLECTD_TAG: "{{ COLLECTD_TAG | default('main') }}"
+ COLLECTD_PULL_REQUESTS: "{{ COLLECTD_PULL_REQUESTS | default() }}"
+ source: build
+ tags:
+ - experimental
+
+- name: Build collectd-6
+ docker_image:
+ name: "opnfv/barometer-collectd-6{{ ( '-' + COLLECTD_PULL_REQUESTS ) if COLLECTD_PULL_REQUESTS is defined else '' }}"
+ build:
+ path: "{{ playbook_dir }}/../../"
+ dockerfile: "docker/barometer-collectd-experimental/Dockerfile"
+ args:
+ COLLECTD_FLAVOR: collectd-6
+ COLLECTD_TAG: "{{ COLLECTD_TAG | default('collectd-6.0') }}"
+ COLLECTD_PULL_REQUESTS: "{{ COLLECTD_PULL_REQUESTS | default(omit) }}"
+ source: build
+ tags:
+ - collectd-6
+
+- name: Build test_app for write_http
+ docker_image:
+ name: test-collectd-write_http
+ build:
+ path: "{{ playbook_dir }}/../flask_app/"
+ source: build
+ tags:
+ - flask_test
+ - never
+