Browse Source

CI: Fix integration job

Deckhand's integration job relies on OpenStack-Helm-Infra to deploy
Kubernetes using Kubeadm. Since [0] was merged, Calico requires AppArmor
to be deployed. This commit adds the same role to deploy AppArmor that
exists in OpenStack-Helm-Infra to prevent inadvertent gate failures.

[0] https://review.openstack.org/614805/

This also includes gate fix in https://review.openstack.org/#/c/627906/
because of a circular dependency; that change in question fixes
failing CI jobs for all non-integration jobs.

Change-Id: Ie3fb04ea0fbe0487ae743033315e2a4211248d32
Drew Walters 3 months ago
parent
commit
f745e4b6e7

+ 0
- 1
requirements.txt View File

@@ -38,7 +38,6 @@ python-barbicanclient==4.7.0
38 38
 python-keystoneclient==3.18.0
39 39
 python-memcached==1.59
40 40
 
41
-requests==2.20.0
42 41
 Routes==2.4.1
43 42
 six==1.11.0
44 43
 stevedore==1.30.0

+ 12
- 0
tools/gate/playbooks/osh-infra-upgrade-host.yaml View File

@@ -39,3 +39,15 @@
39 39
     - upgrade-host
40 40
     - start-zuul-console
41 41
     - disable-local-nameserver
42
+
43
+- hosts: all
44
+  vars_files:
45
+    - vars.yaml
46
+  vars:
47
+    work_dir: "{{ zuul.project.src_dir }}/{{ zuul_osh_infra_relative_path | default('') }}"
48
+  gather_facts: False
49
+  become: yes
50
+  roles:
51
+    - deploy-apparmor
52
+  tags:
53
+    - deploy-apparmor

+ 36
- 0
tools/gate/roles/deploy-apparmor/tasks/main.yaml View File

@@ -0,0 +1,36 @@
1
+# Copyright 2018 The Openstack-Helm Authors.
2
+#
3
+# Licensed under the Apache License, Version 2.0 (the "License");
4
+# you may not use this file except in compliance with the License.
5
+# You may obtain a copy of the License at
6
+#
7
+#     http://www.apache.org/licenses/LICENSE-2.0
8
+#
9
+# Unless required by applicable law or agreed to in writing, software
10
+# distributed under the License is distributed on an "AS IS" BASIS,
11
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+# See the License for the specific language governing permissions and
13
+# limitations under the License.
14
+
15
+- block:
16
+    - name: Ensuring AppArmor is deployed on host
17
+      when: ansible_distribution == 'Ubuntu'
18
+      include_role:
19
+        name: deploy-package
20
+        tasks_from: dist
21
+      vars:
22
+        packages:
23
+          deb:
24
+            - apparmor
25
+
26
+    - name: Enable AppArmor
27
+      when: ansible_distribution == 'Ubuntu'
28
+      become: true
29
+      shell: |-
30
+              set -xe
31
+              systemctl enable apparmor
32
+              systemctl start apparmor
33
+              systemctl status apparmor.service
34
+      args:
35
+        executable: /bin/bash
36
+      ignore_errors: True

Loading…
Cancel
Save