Deploy separate placement always

Older than train releases are not supported by gate already. So no
need to keep cases to deploy placement inside nova helmrelease.
Apart from that, changed the deployment order of nova and placement.

Change-Id: I03f303e8081207e15ecf8424039948305af3bb12
This commit is contained in:
josebb 2022-04-06 12:04:20 +03:00
parent 00e8838716
commit dec8f64ebc
2 changed files with 30 additions and 92 deletions

View File

@ -22,54 +22,10 @@ if openstack service list -f value -c Type | grep -q "^volume" && \
CEPH_ENABLED=true
fi
#NOTE: Get the overrides to use for placement, should placement be deployed.
case "${OPENSTACK_RELEASE}" in
"newton")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"ocata")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"pike")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"queens")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"rocky")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"stein")
DEPLOY_SEPARATE_PLACEMENT="yes"
;;
*)
DEPLOY_SEPARATE_PLACEMENT="yes"
;;
esac
if [[ "${DEPLOY_SEPARATE_PLACEMENT}" == "yes" ]]; then
# Get overrides
: ${OSH_EXTRA_HELM_ARGS_PLACEMENT:="$(./tools/deployment/common/get-values-overrides.sh placement)"}
# Lint and package
make placement
# Deploy
helm upgrade --install placement ./placement --namespace=openstack \
${OSH_EXTRA_HELM_ARGS:=} ${OSH_EXTRA_HELM_ARGS_PLACEMENT}
fi
#NOTE: Get the over-rides to use
: ${OSH_EXTRA_HELM_ARGS_NOVA:="$(./tools/deployment/common/get-values-overrides.sh nova)"}
# TODO: Revert this reasoning when gates are pointing to more up to
# date openstack release. When doing so, we should revert the default
# values of the nova chart to NOT use placement by default, and
# have a ocata/pike/queens/rocky/stein override to enable placement in the nova chart deploy
if [[ "${DEPLOY_SEPARATE_PLACEMENT}" == "yes" ]]; then
OSH_EXTRA_HELM_ARGS_NOVA="${OSH_EXTRA_HELM_ARGS_NOVA} --values=./nova/values_overrides/train-disable-nova-placement.yaml"
fi
OSH_EXTRA_HELM_ARGS_NOVA="${OSH_EXTRA_HELM_ARGS_NOVA} --values=./nova/values_overrides/train-disable-nova-placement.yaml"
#NOTE: Lint and package chart
make nova
@ -96,6 +52,16 @@ else
${OSH_EXTRA_HELM_ARGS_NOVA}
fi
# Get overrides
: ${OSH_EXTRA_HELM_ARGS_PLACEMENT:="$(./tools/deployment/common/get-values-overrides.sh placement)"}
# Lint and package
make placement
# Deploy placement
helm upgrade --install placement ./placement --namespace=openstack \
${OSH_EXTRA_HELM_ARGS:=} ${OSH_EXTRA_HELM_ARGS_PLACEMENT}
#NOTE: Get the over-rides to use
: ${OSH_EXTRA_HELM_ARGS_NEUTRON:="$(./tools/deployment/common/get-values-overrides.sh neutron)"}

View File

@ -22,53 +22,10 @@ if openstack service list -f value -c Type | grep -q "^volume" && \
CEPH_ENABLED=true
fi
#NOTE: Get the overrides to use for placement, should placement be deployed.
case "${OPENSTACK_RELEASE}" in
"queens")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"rocky")
DEPLOY_SEPARATE_PLACEMENT="no"
;;
"stein")
DEPLOY_SEPARATE_PLACEMENT="yes"
;;
*)
DEPLOY_SEPARATE_PLACEMENT="yes"
;;
esac
if [[ "${DEPLOY_SEPARATE_PLACEMENT}" == "yes" ]]; then
# Get overrides
: ${OSH_EXTRA_HELM_ARGS_PLACEMENT:="$(./tools/deployment/common/get-values-overrides.sh placement)"}
# Lint and package
make placement
tee /tmp/placement.yaml << EOF
pod:
replicas:
api: 2
EOF
# Deploy
helm upgrade --install placement ./placement \
--namespace=openstack \
--values=/tmp/placement.yaml \
${OSH_EXTRA_HELM_ARGS:=} \
${OSH_EXTRA_HELM_ARGS_PLACEMENT}
fi
#NOTE: Get the over-rides to use
: ${OSH_EXTRA_HELM_ARGS_NOVA:="$(./tools/deployment/common/get-values-overrides.sh nova)"}
# TODO: Revert this reasoning when gates are pointing to more up to
# date openstack release. When doing so, we should revert the default
# values of the nova chart to NOT use placement by default, and
# have a ocata/pike/queens/rocky/stein override to enable placement in the nova chart deploy
if [[ "${DEPLOY_SEPARATE_PLACEMENT}" == "yes" ]]; then
OSH_EXTRA_HELM_ARGS_NOVA="${OSH_EXTRA_HELM_ARGS_NOVA} --values=./nova/values_overrides/train-disable-nova-placement.yaml"
fi
OSH_EXTRA_HELM_ARGS_NOVA="${OSH_EXTRA_HELM_ARGS_NOVA} --values=./nova/values_overrides/train-disable-nova-placement.yaml"
#NOTE: Lint and package chart
make nova
@ -80,9 +37,6 @@ pod:
osapi: 2
conductor: 2
EOF
if [[ "${DEPLOY_SEPARATE_PLACEMENT}" == "no" ]]; then
echo " placement: 2" >> /tmp/nova.yaml
fi
#NOTE: Deploy nova
: ${OSH_EXTRA_HELM_ARGS:=""}
@ -108,6 +62,24 @@ else
${OSH_EXTRA_HELM_ARGS_NOVA}
fi
# Get overrides
: ${OSH_EXTRA_HELM_ARGS_PLACEMENT:="$(./tools/deployment/common/get-values-overrides.sh placement)"}
# Lint and package
make placement
tee /tmp/placement.yaml << EOF
pod:
replicas:
api: 2
EOF
# Deploy
helm upgrade --install placement ./placement \
--namespace=openstack \
--values=/tmp/placement.yaml \
${OSH_EXTRA_HELM_ARGS:=} \
${OSH_EXTRA_HELM_ARGS_PLACEMENT}
#NOTE: Get the over-rides to use
: ${OSH_EXTRA_HELM_ARGS_NEUTRON:="$(./tools/deployment/common/get-values-overrides.sh neutron)"}