Skip to content

Commit 088ecd6

Browse files
authored
Merge pull request #54 from stackhpc/tempest-cacert
Add support for specifying a CA certificate for Rally/Tempest
2 parents a12a843 + 5c6ba2e commit 088ecd6

File tree

1 file changed

+26
-1
lines changed

1 file changed

+26
-1
lines changed

ansible/kayobe-automation-run-tempest.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
vars:
66
results_path_local: "{{ lookup('env', 'PWD') }}"
77
rally_image: 'stackhpc/docker-rally'
8-
rally_tag: v1.4-dev
8+
rally_tag: v1.5.0
99
rally_image_full: "{{ rally_docker_registry }}/{{ rally_image }}:{{ rally_tag }}"
1010
rally_no_sensitive_log: true
1111
# This ensures you get the latest image if the image is updated
@@ -26,6 +26,13 @@
2626
suffix: rally-results
2727
register: results_path_remote
2828

29+
- name: Create temporary CA certificate directory
30+
ansible.builtin.tempfile:
31+
state: directory
32+
suffix: rally-cacert
33+
register: cacert_path_remote
34+
when: tempest_cacert is defined
35+
2936
- name: Ensure docker user has permissions to write to results directory
3037
file:
3138
path: "{{ results_path_remote.path }}"
@@ -80,6 +87,15 @@
8087
become: true
8188
when: tempest_accounts_path is defined
8289

90+
- name: Copy tempest CA certificate to remote host
91+
copy:
92+
src: "{{ tempest_cacert }}"
93+
dest: "{{ cacert_path_remote.path }}/"
94+
owner: "65500"
95+
group: "1000"
96+
become: true
97+
when: tempest_cacert is defined
98+
8399
- name: Run tempest
84100
command: |-
85101
docker run --rm --entrypoint=/usr/bin/rally-verify-wrapper.sh
@@ -101,6 +117,9 @@
101117
{% if tempest_accounts_path is defined -%}
102118
-v {{ accounts_path_remote }}:/home/rally/tempest-accounts:ro
103119
{% endif -%}
120+
{% if tempest_cacert is defined -%}
121+
-v {{ cacert_path_remote.path }}:/usr/local/share/ca-certificates:ro
122+
{% endif -%}
104123
--network host
105124
{{ rally_image_full }}
106125
environment:
@@ -148,3 +167,9 @@
148167
path: "{{ results_path_remote.path }}"
149168
state: absent
150169
when: results_path_remote.path is defined
170+
171+
- name: cleanup CA certificate
172+
file:
173+
path: "{{ cacert_path_remote.path }}"
174+
state: absent
175+
when: cacert_path_remote.path is defined

0 commit comments

Comments
 (0)