Merge component, developer and multinode ingress deployment scripts
For simplification of deployment and maintenance, reduce the number of scripts that do usually the same. The important part is that when user wants to do multinode deployment, OSH_DEPLOY_MULTINODE variable must be set before executing the script. For now multinone script still stays, only to invoke the common one, but in future it would be better to remove multinode scripts completely and let user call the common script with the right argument. Change-Id: I4dca159827581cbe8d6ded3be85e732acbf60ed1
This commit is contained in:
parent
21ad4a9fdb
commit
d893eadfbc
@ -79,7 +79,7 @@ Alternatively, this step can be performed by running the script directly:
|
||||
Deploy the ingress controller
|
||||
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
.. literalinclude:: ../../../../tools/deployment/developer/common/030-ingress.sh
|
||||
.. literalinclude:: ../../../../tools/deployment/component/common/ingress.sh
|
||||
:language: shell
|
||||
:lines: 1,17-
|
||||
|
||||
@ -87,4 +87,4 @@ Alternatively, this step can be performed by running the script directly:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
./tools/deployment/developer/common/030-ingress.sh
|
||||
./tools/deployment/developer/component/common/ingress.sh
|
||||
|
@ -90,7 +90,11 @@ Alternatively, this step can be performed by running the script directly:
|
||||
Deploy the ingress controller
|
||||
-----------------------------
|
||||
|
||||
.. literalinclude:: ../../../tools/deployment/multinode/020-ingress.sh
|
||||
.. code-block:: shell
|
||||
|
||||
export OSH_DEPLOY_MULTINODE=True
|
||||
|
||||
.. literalinclude:: ../../../tools/deployment/component/common/ingress.sh
|
||||
:language: shell
|
||||
:lines: 1,17-
|
||||
|
||||
@ -98,7 +102,7 @@ Alternatively, this step can be performed by running the script directly:
|
||||
|
||||
.. code-block:: shell
|
||||
|
||||
./tools/deployment/multinode/020-ingress.sh
|
||||
OSH_DEPLOY_MULTINODE=True ./tools/deployment/component/common/ingress.sh
|
||||
|
||||
|
||||
Deploy Ceph
|
||||
|
@ -24,6 +24,7 @@ export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${OSH_INFRA_PATH:="../open
|
||||
make -C ${HELM_CHART_ROOT_PATH} ingress
|
||||
|
||||
#NOTE: Deploy command
|
||||
: ${OSH_EXTRA_HELM_ARGS:=""}
|
||||
tee /tmp/ingress-kube-system.yaml << EOF
|
||||
deployment:
|
||||
mode: cluster
|
||||
@ -31,10 +32,28 @@ deployment:
|
||||
network:
|
||||
host_namespace: true
|
||||
EOF
|
||||
|
||||
touch /tmp/ingress-component.yaml
|
||||
|
||||
if [ -n "${OSH_DEPLOY_MULTINODE}" ]; then
|
||||
tee --append /tmp/ingress-kube-system.yaml << EOF
|
||||
pod:
|
||||
replicas:
|
||||
error_page: 2
|
||||
EOF
|
||||
|
||||
tee /tmp/ingress-component.yaml << EOF
|
||||
pod:
|
||||
replicas:
|
||||
ingress: 2
|
||||
error_page: 2
|
||||
EOF
|
||||
fi
|
||||
|
||||
helm upgrade --install ingress-kube-system ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
--namespace=kube-system \
|
||||
--values=/tmp/ingress-kube-system.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS:=} \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_KUBE_SYSTEM}
|
||||
|
||||
@ -45,9 +64,10 @@ helm upgrade --install ingress-kube-system ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
helm status ingress-kube-system
|
||||
|
||||
#NOTE: Deploy namespace ingress
|
||||
helm upgrade --install ingress-openstack ${OSH_INFRA_PATH}/ingress \
|
||||
helm upgrade --install ingress-openstack ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
--namespace=openstack \
|
||||
${OSH_EXTRA_HELM_ARGS:=} \
|
||||
--values=/tmp/ingress-component.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_OPENSTACK}
|
||||
|
||||
@ -56,3 +76,16 @@ helm upgrade --install ingress-openstack ${OSH_INFRA_PATH}/ingress \
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-openstack
|
||||
|
||||
helm upgrade --install ingress-ceph ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
--namespace=ceph \
|
||||
--values=/tmp/ingress-component.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_CEPH}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./tools/deployment/common/wait-for-pods.sh ceph
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-ceph
|
||||
|
@ -1,72 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2017 The Openstack-Helm Authors.
|
||||
#
|
||||
# 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
|
||||
|
||||
#NOTE: Get the over-rides to use
|
||||
export HELM_CHART_ROOT_PATH="${HELM_CHART_ROOT_PATH:="${OSH_INFRA_PATH:="../openstack-helm-infra"}"}"
|
||||
: ${OSH_EXTRA_HELM_ARGS_INGRESS:="$(./tools/deployment/common/get-values-overrides.sh ingress)"}
|
||||
|
||||
#NOTE: Lint and package chart
|
||||
make -C ${HELM_CHART_ROOT_PATH} ingress
|
||||
|
||||
#NOTE: Deploy command
|
||||
: ${OSH_EXTRA_HELM_ARGS:=""}
|
||||
tee /tmp/ingress-kube-system.yaml << EOF
|
||||
deployment:
|
||||
mode: cluster
|
||||
type: DaemonSet
|
||||
network:
|
||||
host_namespace: true
|
||||
EOF
|
||||
helm upgrade --install ingress-kube-system ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
--namespace=kube-system \
|
||||
--values=/tmp/ingress-kube-system.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_KUBE_SYSTEM}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./tools/deployment/common/wait-for-pods.sh kube-system
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-kube-system
|
||||
|
||||
#NOTE: Deploy namespace ingress
|
||||
helm upgrade --install ingress-openstack ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
--namespace=openstack \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_OPENSTACK}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./tools/deployment/common/wait-for-pods.sh openstack
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-openstack
|
||||
|
||||
|
||||
helm upgrade --install ingress-ceph ${HELM_CHART_ROOT_PATH}/ingress \
|
||||
--namespace=ceph \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_CEPH}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./tools/deployment/common/wait-for-pods.sh ceph
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-ceph
|
1
tools/deployment/developer/common/030-ingress.sh
Symbolic link
1
tools/deployment/developer/common/030-ingress.sh
Symbolic link
@ -0,0 +1 @@
|
||||
../../component/common/ingress.sh
|
@ -15,51 +15,5 @@
|
||||
# under the License.
|
||||
|
||||
set -xe
|
||||
|
||||
#NOTE: Deploy global ingress
|
||||
: ${OSH_INFRA_PATH:="../openstack-helm-infra"}
|
||||
tee /tmp/ingress-kube-system.yaml << EOF
|
||||
pod:
|
||||
replicas:
|
||||
error_page: 2
|
||||
deployment:
|
||||
mode: cluster
|
||||
type: DaemonSet
|
||||
network:
|
||||
host_namespace: true
|
||||
EOF
|
||||
helm upgrade --install ingress-kube-system ${OSH_INFRA_PATH}/ingress \
|
||||
--namespace=kube-system \
|
||||
--values=/tmp/ingress-kube-system.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${OSH_EXTRA_HELM_ARGS_INGRESS_KUBE_SYSTEM}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./tools/deployment/common/wait-for-pods.sh kube-system
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-kube-system
|
||||
|
||||
#NOTE: Deploy namespaced ingress controllers
|
||||
for NAMESPACE in openstack ceph; do
|
||||
# Allow $OSH_EXTRA_HELM_ARGS_INGRESS_ceph and $OSH_EXTRA_HELM_ARGS_INGRESS_openstack overrides
|
||||
OSH_EXTRA_HELM_ARGS_INGRESS_NAMESPACE="OSH_EXTRA_HELM_ARGS_INGRESS_${NAMESPACE}"
|
||||
#NOTE: Deploy namespace ingress
|
||||
tee /tmp/ingress-${NAMESPACE}.yaml << EOF
|
||||
pod:
|
||||
replicas:
|
||||
ingress: 2
|
||||
error_page: 2
|
||||
EOF
|
||||
helm upgrade --install ingress-${NAMESPACE} ${OSH_INFRA_PATH}/ingress \
|
||||
--namespace=${NAMESPACE} \
|
||||
--values=/tmp/ingress-${NAMESPACE}.yaml \
|
||||
${OSH_EXTRA_HELM_ARGS} \
|
||||
${!OSH_EXTRA_HELM_ARGS_INGRESS_NAMESPACE}
|
||||
|
||||
#NOTE: Wait for deploy
|
||||
./tools/deployment/common/wait-for-pods.sh ${NAMESPACE}
|
||||
|
||||
#NOTE: Display info
|
||||
helm status ingress-${NAMESPACE}
|
||||
done
|
||||
export OSH_DEPLOY_MULTINODE=True
|
||||
./tools/deployment/component/common/ingress.sh
|
||||
|
@ -27,13 +27,14 @@
|
||||
chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}"
|
||||
- name: Deploy Ingress
|
||||
environment:
|
||||
OSH_DEPLOY_MULTINODE: True
|
||||
OSH_OPENSTACK_RELEASE: "{{ osh_openstack_release }}"
|
||||
OSH_EXTRA_HELM_ARGS: "{{ zuul_osh_extra_helm_args_relative_path | default('') }}"
|
||||
OSH_INFRA_PATH: "{{ zuul_osh_infra_relative_path | default('') }}"
|
||||
zuul_site_mirror_fqdn: "{{ zuul_site_mirror_fqdn }}"
|
||||
shell: |
|
||||
set -xe;
|
||||
./tools/deployment/multinode/020-ingress.sh
|
||||
./tools/deployment/component/common/ingress.sh
|
||||
args:
|
||||
chdir: "{{ zuul_osh_relative_path | default(zuul.project.src_dir) }}"
|
||||
- name: Deploy Ceph
|
||||
|
@ -21,9 +21,11 @@
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
- name: Deploy Ingress
|
||||
environment:
|
||||
OSH_DEPLOY_MULTINODE: True
|
||||
shell: |
|
||||
set -xe;
|
||||
./tools/deployment/multinode/020-ingress.sh
|
||||
./tools/deployment/component/common/ingress.sh
|
||||
args:
|
||||
chdir: "{{ zuul.project.src_dir }}"
|
||||
- name: Deploy Ceph
|
||||
|
Loading…
Reference in New Issue
Block a user