diff --git a/doc/source/airskiff.rst b/doc/source/airskiff.rst index 2453c47d3..ac767f104 100644 --- a/doc/source/airskiff.rst +++ b/doc/source/airskiff.rst @@ -75,32 +75,12 @@ Deploy Airskiff using the deployment scripts contained in the ``tools/deployment/airskiff`` directory of the `airship-treasuremap`_ repository. -.. note:: Scripts should be run from the root of ``airship-treasuremap`` - repository. - -Install required packages -~~~~~~~~~~~~~~~~~~~~~~~~~ - -.. literalinclude:: ../../tools/deployment/airskiff/developer/000-install-packages.sh - :language: shell - :lines: 1,18- - -Alternatively, this step can be performed by running the script directly: - -.. code-block:: shell - - ./tools/deployment/airskiff/developer/000-install-packages.sh - -Restart your shell session -~~~~~~~~~~~~~~~~~~~~~~~~~~ - -At this point, restart your shell session to complete adding ``$USER`` to the -``docker`` group. +.. note:: Scripts should be run from the root of ``treasuremap`` repository. Clone Dependencies ~~~~~~~~~~~~~~~~~~ -.. literalinclude:: ../../tools/deployment/airskiff/developer/005-clone-dependencies.sh +.. literalinclude:: ../../tools/deployment/airskiff/developer/000-clone-dependencies.sh :language: shell :lines: 1,18- @@ -108,7 +88,7 @@ Alternatively, this step can be performed by running the script directly: .. code-block:: shell - ./tools/deployment/airskiff/developer/005-clone-dependencies.sh + ./tools/deployment/airskiff/developer/000-clone-dependencies.sh Deploy Kubernetes with Minikube ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -123,6 +103,12 @@ Alternatively, this step can be performed by running the script directly: ./tools/deployment/airskiff/developer/010-deploy-k8s.sh +Restart your shell session +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +At this point, restart your shell session to complete adding ``$USER`` to the +``docker`` group. + Setup OpenStack Client ~~~~~~~~~~~~~~~~~~~~~~ diff --git a/tools/deployment/airskiff/developer/005-clone-dependencies.sh b/tools/deployment/airskiff/developer/000-clone-dependencies.sh similarity index 100% rename from tools/deployment/airskiff/developer/005-clone-dependencies.sh rename to tools/deployment/airskiff/developer/000-clone-dependencies.sh diff --git a/tools/deployment/airskiff/developer/000-install-packages.sh b/tools/deployment/airskiff/developer/000-install-packages.sh deleted file mode 100755 index c51775bb5..000000000 --- a/tools/deployment/airskiff/developer/000-install-packages.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# Copyright 2017 The Openstack-Helm Authors. -# Copyright 2018 AT&T Intellectual Property. All other rights reserved. -# -# 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. - -set -xe - -sudo apt-get update - -# NOTE(danpawlik) Docker 18.09 is supported by minikube, so we can -# leave version installed by OSH scripts. -sudo apt-get install --allow-downgrades --no-install-recommends -y \ - apparmor \ - ca-certificates \ - docker.io \ - git \ - make \ - jq \ - nmap \ - curl \ - python-pip \ - uuid-runtime \ - apt-transport-https \ - ca-certificates \ - gcc \ - python-dev \ - python-setuptools \ - software-properties-common - -# Enable apparmor -sudo systemctl enable apparmor -sudo systemctl start apparmor - -# Add $USER to docker group -# NOTE: This requires re-authentication. Restart your shell. -sudo adduser "$(whoami)" docker diff --git a/tools/deployment/airskiff/developer/010-deploy-k8s.sh b/tools/deployment/airskiff/developer/010-deploy-k8s.sh index dc0ccb3ad..e8e90a2d5 100755 --- a/tools/deployment/airskiff/developer/010-deploy-k8s.sh +++ b/tools/deployment/airskiff/developer/010-deploy-k8s.sh @@ -30,4 +30,14 @@ bash -c "./tools/deployment/common/005-deploy-k8s.sh" kubectl label nodes --all --overwrite ucp-control-plane=enabled +# Add user to Docker group +# NOTE: This requires re-authentication. Restart your shell. +sudo adduser "$(whoami)" docker +sudo su - "$USER" -c bash <<'END_SCRIPT' +if echo $(groups) | grep -qv 'docker'; then + echo "You need to logout to apply group permissions" + echo "Please logout and login" +fi +END_SCRIPT + cd "${CURRENT_DIR}" diff --git a/tools/gate/playbooks/airskiff-deploy-gate.yaml b/tools/gate/playbooks/airskiff-deploy-gate.yaml index 62a1c53d9..9ed13017c 100644 --- a/tools/gate/playbooks/airskiff-deploy-gate.yaml +++ b/tools/gate/playbooks/airskiff-deploy-gate.yaml @@ -24,16 +24,9 @@ name: systemd-resolved become: yes - - name: Install required packages - shell: | - ./tools/deployment/airskiff/developer/000-install-packages.sh - args: - chdir: "{{ zuul.project.src_dir }}" - become: yes - - name: Clone dependencies shell: | - ./tools/deployment/airskiff/developer/005-clone-dependencies.sh + ./tools/deployment/airskiff/developer/000-clone-dependencies.sh args: chdir: "{{ zuul.project.src_dir }}"