Browse Source

airskiff: Install AppArmor in package script

This commit moves the installation and enablement of AppArmor to the
package installation script. Previously, it was in an additional script
where its usage was undocumented, causing confusing deployment errors.

Change-Id: I904f87c544f3edb87ce79fd4d16d5f83596317e9
Drew Walters 3 months ago
parent
commit
f84d7b3f77

+ 5
- 0
tools/deployment/airskiff/developer/000-install-packages.sh View File

@@ -19,6 +19,7 @@ set -xe
19 19
 
20 20
 sudo apt-get update
21 21
 sudo apt-get install --no-install-recommends -y \
22
+        apparmor \
22 23
         ca-certificates \
23 24
         git \
24 25
         make \
@@ -42,6 +43,10 @@ sudo apt-add-repository \
42 43
 sudo apt-get update
43 44
 sudo apt-get install --no-install-recommends -y docker-ce
44 45
 
46
+# Enable apparmor
47
+sudo systemctl enable apparmor
48
+sudo systemctl start apparmor
49
+
45 50
 # Add $USER to docker group
46 51
 # NOTE: This requires re-authentication. Restart your shell.
47 52
 sudo adduser "$(whoami)" docker

+ 0
- 26
tools/deployment/airskiff/developer/001-enable-apparmor.sh View File

@@ -1,26 +0,0 @@
1
-#!/bin/bash
2
-
3
-# Copyright 2017 The Openstack-Helm Authors.
4
-# Copyright 2018 AT&T Intellectual Property.  All other rights reserved.
5
-#
6
-#    Licensed under the Apache License, Version 2.0 (the "License"); you may
7
-#    not use this file except in compliance with the License. You may obtain
8
-#    a copy of the License at
9
-#
10
-#         http://www.apache.org/licenses/LICENSE-2.0
11
-#
12
-#    Unless required by applicable law or agreed to in writing, software
13
-#    distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14
-#    WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15
-#    License for the specific language governing permissions and limitations
16
-#    under the License.
17
-
18
-set -xe
19
-
20
-sudo apt-get update
21
-sudo apt-get install --no-install-recommends -y \
22
-        apparmor
23
-
24
-sudo systemctl enable apparmor
25
-sudo systemctl start apparmor
26
-sudo systemctl status apparmor.service

+ 0
- 7
tools/gate/playbooks/airskiff-deploy-gate.yaml View File

@@ -21,13 +21,6 @@
21 21
         chdir: "{{ zuul.project.src_dir }}"
22 22
       become: yes
23 23
 
24
-    - name: Enable apparmor
25
-      shell: |
26
-        ./tools/deployment/airskiff/developer/001-enable-apparmor.sh
27
-      args:
28
-        chdir: "{{ zuul.project.src_dir }}"
29
-      become: yes
30
-
31 24
     - name: Build Armada
32 25
       shell: |
33 26
         make images

Loading…
Cancel
Save