diff --git a/doc/source/install/multinode.rst b/doc/source/install/multinode.rst index 156df92948..79d5ee7abd 100644 --- a/doc/source/install/multinode.rst +++ b/doc/source/install/multinode.rst @@ -187,9 +187,14 @@ Alternatively, this step can be performed by running the script directly: ./tools/deployment/multinode/020-ingress.sh + Deploy Ceph ----------- +.. note:: + The `./tools/deployment/multinode/kube-node-subnet.sh` script requires docker + to run. + .. literalinclude:: ../../../tools/deployment/multinode/030-ceph.sh :language: shell :lines: 1,17- diff --git a/tools/deployment/multinode/kube-node-subnet.sh b/tools/deployment/multinode/kube-node-subnet.sh index 93f90736d0..09288f7e27 100755 --- a/tools/deployment/multinode/kube-node-subnet.sh +++ b/tools/deployment/multinode/kube-node-subnet.sh @@ -15,10 +15,11 @@ # under the License. set -e +UTILS_IMAGE=docker.io/openstackhelm/gate-utils:v0.1.0 NODE_IPS=$(mktemp --suffix=.txt) kubectl get nodes -o json | jq -r '.items[].status.addresses[] | select(.type=="InternalIP").address' | sort -V > $NODE_IPS -FIRST_IP_SUBNET=$(ipcalc "$(head -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }') -LAST_IP_SUBNET=$(ipcalc "$(tail -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }') +FIRST_IP_SUBNET=$(sudo docker run ${UTILS_IMAGE} ipcalc "$(head -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }') +LAST_IP_SUBNET=$(sudo docker run ${UTILS_IMAGE} ipcalc "$(tail -n 1 ${NODE_IPS})/24" | awk '/^Network/ { print $2 }') rm -f $NODE_IPS function ip_diff { echo $(($(echo $LAST_IP_SUBNET | awk -F '.' "{ print \$$1}") - $(echo $FIRST_IP_SUBNET | awk -F '.' "{ print \$$1}"))) diff --git a/tools/gate/playbooks/multinode-deploy.yaml b/tools/gate/playbooks/multinode-deploy.yaml index 1ff1510ae9..a11a4a7866 100644 --- a/tools/gate/playbooks/multinode-deploy.yaml +++ b/tools/gate/playbooks/multinode-deploy.yaml @@ -14,28 +14,6 @@ - hosts: primary tasks: - - name: installing ipcalc on Ubuntu - become: true - become_user: root - when: ansible_distribution == 'Debian' or ansible_distribution == 'Ubuntu' - apt: - name: ipcalc - state: present - - name: installing ipcalc on CentOS - become: true - become_user: root - when: ansible_distribution == 'CentOS' or ansible_distribution == 'Red Hat Enterprise Linux' - yum: - name: ipcalc - enablerepo: epel - state: present - - name: installing ipcalc on Fedora - become: true - become_user: root - when: ansible_distribution == 'Fedora' - dnf: - name: ipcalc - state: present - name: Setup OS and K8s Clients shell: | set -xe; diff --git a/tools/images/gate-utils/Dockerfile b/tools/images/gate-utils/Dockerfile new file mode 100644 index 0000000000..25c16a9241 --- /dev/null +++ b/tools/images/gate-utils/Dockerfile @@ -0,0 +1,3 @@ +FROM gcr.io/google-containers/debian-base-amd64:0.3 + +RUN /usr/local/bin/clean-install ipcalc diff --git a/tools/images/gate-utils/README.rst b/tools/images/gate-utils/README.rst new file mode 100644 index 0000000000..6cb65b91c0 --- /dev/null +++ b/tools/images/gate-utils/README.rst @@ -0,0 +1,37 @@ +Gate Utils Container +==================== + +This container builds a small image with ipcalc for use in both the multinode +checks and development. + +Instructions +------------ + +OS Specific Host setup: +~~~~~~~~~~~~~~~~~~~~~~~ + +Ubuntu: +^^^^^^^ + +From a freshly provisioned Ubuntu 16.04 LTS host run: + +.. code:: bash + + sudo apt-get update -y + sudo apt-get install -y \ + docker.io \ + git + +Build the Gate Utils Image +~~~~~~~~~~~~~~~~~~~~~~~~~~ + +A known good image is published to dockerhub on a fairly regular basis, but if +you wish to build your own image, from the root directory of the OpenStack-Helm +repo run: + +.. code:: bash + + sudo docker build \ + -t docker.io/openstackhelm/gate-utils:v0.1.0 \ + tools/images/gate-utils + sudo docker push docker.io/openstackhelm/gate-utils:v0.1.0