Merge "CI: Generate Octavia certificates when required"
This commit is contained in:
commit
b2e06873ac
@ -263,6 +263,18 @@ function is_cinder_enabled {
|
|||||||
to_bool "$flag"
|
to_bool "$flag"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function is_octavia_enabled {
|
||||||
|
octavia_enabled=$(kayobe configuration dump --host localhost --var-name kolla_enable_octavia)
|
||||||
|
to_bool "$octavia_enabled"
|
||||||
|
}
|
||||||
|
|
||||||
|
function are_octavia_certificates_present {
|
||||||
|
[[ -f ${KAYOBE_CONFIG_PATH}/kolla/config/octavia/client_ca.cert.pem &&
|
||||||
|
-f ${KAYOBE_CONFIG_PATH}/kolla/config/octavia/client.cert-and-key.pem &&
|
||||||
|
-f ${KAYOBE_CONFIG_PATH}/kolla/config/octavia/server_ca.cert.pem &&
|
||||||
|
-f ${KAYOBE_CONFIG_PATH}/kolla/config/octavia/server_ca.key.pem ]]
|
||||||
|
}
|
||||||
|
|
||||||
function environment_setup {
|
function environment_setup {
|
||||||
# NOTE: Virtualenv's activate script references an unbound variable.
|
# NOTE: Virtualenv's activate script references an unbound variable.
|
||||||
set +u
|
set +u
|
||||||
@ -493,6 +505,12 @@ function overcloud_deploy {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ${KAYOBE_OVERCLOUD_SERVICE_DEPLOY} = 1 ]]; then
|
if [[ ${KAYOBE_OVERCLOUD_SERVICE_DEPLOY} = 1 ]]; then
|
||||||
|
if is_octavia_enabled && ! are_octavia_certificates_present; then
|
||||||
|
echo "Generating Octavia certificates"
|
||||||
|
run_kayobe kolla ansible run octavia-certificates
|
||||||
|
mkdir -p ${KAYOBE_CONFIG_PATH}/kolla/config/octavia
|
||||||
|
cp ${KOLLA_CONFIG_PATH:-/etc/kolla}/config/octavia/*.pem ${KAYOBE_CONFIG_PATH}/kolla/config/octavia/
|
||||||
|
fi
|
||||||
echo "Deploying containerised overcloud services"
|
echo "Deploying containerised overcloud services"
|
||||||
run_kayobe overcloud service deploy
|
run_kayobe overcloud service deploy
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user