make configurable the kubeburner indexing period
Change-Id: I56aaf32fecb11ae260a89817fc7e77bf69b7991d
This commit is contained in:
parent
e4b3d6d619
commit
77c5a5ed92
@ -17,6 +17,7 @@ python_interpreter: /usr/bin/python3.6
|
|||||||
kubeconfig_path: /home/kni/clusterconfigs/auth/kubeconfig
|
kubeconfig_path: /home/kni/clusterconfigs/auth/kubeconfig
|
||||||
kube_burner_path: https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.7.12/kube-burner-V1.7.12-linux-x86_64.tar.gz
|
kube_burner_path: https://github.com/cloud-bulldozer/kube-burner/releases/download/v1.7.12/kube-burner-V1.7.12-linux-x86_64.tar.gz
|
||||||
ocp_metrics_query: roles/index-ocp-data/templates/metrics.yaml
|
ocp_metrics_query: roles/index-ocp-data/templates/metrics.yaml
|
||||||
|
kubeburner_index_interval: 10 #in minutes
|
||||||
|
|
||||||
# OpenStack Installer
|
# OpenStack Installer
|
||||||
# Tripleo is the only installer supported currently
|
# Tripleo is the only installer supported currently
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
- name: calculate start time from end time
|
- name: calculate start time from end time
|
||||||
set_fact:
|
set_fact:
|
||||||
start_time: "{{ end_time | int - 1800 }}"
|
start_time: "{{ end_time | int - (kubeburner_index_interval | int * 60) }}"
|
||||||
when: start_time is undefined
|
when: start_time is undefined
|
||||||
|
|
||||||
- name: Check if all variables are defined
|
- name: Check if all variables are defined
|
||||||
|
@ -19,17 +19,17 @@
|
|||||||
name: index-ocp-data
|
name: index-ocp-data
|
||||||
vars:
|
vars:
|
||||||
start_time: "{{ log_file.stat.mtime | int }}"
|
start_time: "{{ log_file.stat.mtime | int }}"
|
||||||
when: log_file.stat.exists and (file_age | int < 30)
|
when: log_file.stat.exists and (file_age | int < kubeburner_index_interval | int)
|
||||||
|
|
||||||
- name: run the ansible task without start time
|
- name: run the ansible task without start time
|
||||||
include_role:
|
include_role:
|
||||||
name: index-ocp-data
|
name: index-ocp-data
|
||||||
when: not log_file.stat.exists or (file_age | int >= 30)
|
when: not log_file.stat.exists or (file_age | int >= kubeburner_index_interval | int)
|
||||||
when: cron_state == "absent"
|
when: cron_state == "absent"
|
||||||
|
|
||||||
- name: toggle the indexing OCP data cron job
|
- name: toggle the indexing OCP data cron job
|
||||||
cron:
|
cron:
|
||||||
name: "Index ocp data every 30 mins"
|
name: "Index ocp data for the given time"
|
||||||
minute: "*/30"
|
minute: "*/{{ kubeburner_index_interval | int }}"
|
||||||
job: "PATH=/usr/local/bin:/usr/bin:/bin && /usr/bin/ansible-playbook {{ browbeat_path }}/ansible/install/index-ocp-data.yml > /tmp/ocp_index_cron.log 2>&1"
|
job: "PATH=/usr/local/bin:/usr/bin:/bin && /usr/bin/ansible-playbook {{ browbeat_path }}/ansible/install/index-ocp-data.yml > /tmp/ocp_index_cron.log 2>&1"
|
||||||
state: "{{ cron_state }}"
|
state: "{{ cron_state }}"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user