From 71a3da4558ebecf1e1b08a345b8021c156d2b978 Mon Sep 17 00:00:00 2001 From: Mykola Malkov Date: Tue, 15 Oct 2019 12:02:24 +0300 Subject: [PATCH] TT#34758 Use -pro packages for Carrier installation From the packages' deps and content POV Pro and Carrier packages are equal to each other so get rid of this separation. Change-Id: I587dba3147bdc9b3c0f10da820ba4cdc8a0a0f08 --- templates/scripts/includes/deployment.sh | 33 +++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/templates/scripts/includes/deployment.sh b/templates/scripts/includes/deployment.sh index 944a880..ac1230e 100755 --- a/templates/scripts/includes/deployment.sh +++ b/templates/scripts/includes/deployment.sh @@ -1568,12 +1568,8 @@ get_installer_path() { fi # use pool directory according for ngcp release - if "$PRO_EDITION" ; then - if "$CARRIER_EDITION" ; then - local installer_package='ngcp-installer-carrier' - else - local installer_package='ngcp-installer-pro' - fi + if "${PRO_EDITION}" || "${CARRIER_EDITION}" ; then + local installer_package='ngcp-installer-pro' local repos_base_path="${SIPWISE_URL}/sppro/${SP_VERSION}/dists/${DEBIAN_RELEASE}/main/binary-amd64/" INSTALLER_PATH="${SIPWISE_URL}/sppro/${SP_VERSION}/pool/main/n/ngcp-installer/" else @@ -1617,9 +1613,7 @@ get_installer_path() { [ -n "$version" ] || die "Error: installer version for ngcp ${SP_VERSION}, Debian release $DEBIAN_RELEASE with installer package $installer_package could not be detected." - if "$CARRIER_EDITION" ; then - INSTALLER="ngcp-installer-carrier_${version}_all.deb" - elif "$PRO_EDITION" ; then + if "${PRO_EDITION}" || "${CARRIER_EDITION}" ; then INSTALLER="ngcp-installer-pro_${version}_all.deb" else INSTALLER="ngcp-installer-ce_${version}_all.deb" @@ -1652,6 +1646,27 @@ gen_installer_config () { local conf_file conf_file="${TARGET}/etc/ngcp-installer/config_deploy.inc" truncate -s 0 "${conf_file}" + + if "${CARRIER_EDITION}" ; then + cat >> "${conf_file}" << EOF +CARRIER=true +PRO=false +CE=false +EOF + elif "${PRO_EDITION}" ; then + cat >> "${conf_file}" << EOF +CARRIER=false +PRO=true +CE=false +EOF + elif "${CE_EDITION}" ; then + cat >> "${conf_file}" << EOF +CARRIER=false +PRO=false +CE=true +EOF + fi + if "${CARRIER_EDITION}" ; then cat >> "${conf_file}" << EOF CROLE="${CROLE}"