From 59f59711e12648f44b2c9bfe094693e470700f95 Mon Sep 17 00:00:00 2001 From: Ciprian Barbu Date: Tue, 24 Mar 2020 03:37:42 +0200 Subject: [PATCH] Update ponsim install to cord-7.0-arm64 With this new version, install.sh will basically install SiaB with PONSim. To do this, it will use our own version of automation-tools, which internally will use the helm-charts on version cord-7.0-arm64. The helm-charts are expected to be modified such that the deployment will support IEC Type 2 3-node K8S clusters. Signed-off-by: Ciprian Barbu Change-Id: I459f136b0d97c0ad9fecddd8e03187ee8c7d5237 --- src/use_cases/seba_on_arm/test/ponsim/install.sh | 52 ++++++------------------ 1 file changed, 12 insertions(+), 40 deletions(-) diff --git a/src/use_cases/seba_on_arm/test/ponsim/install.sh b/src/use_cases/seba_on_arm/test/ponsim/install.sh index 6aa728b..2b4e13e 100755 --- a/src/use_cases/seba_on_arm/test/ponsim/install.sh +++ b/src/use_cases/seba_on_arm/test/ponsim/install.sh @@ -5,60 +5,32 @@ set -ex basepath=$(cd "$(dirname "$0")"; pwd) -# Using opencord automation-tools from the cord-6.1 maintenance branch -AUTO_TOOLS_GIT="https://github.com/opencord/automation-tools.git" -AUTO_TOOLS_VER=${AUTO_TOOLS_VER:-cord-6.1} - export M=/tmp/milestones export SEBAVALUE= export WORKSPACE=${HOME} -mkdir -p ${M} "${WORKSPACE}/cord/test" +# Using opencord automation-tools from the cord-6.1 maintenance branch +AUTO_TOOLS="${WORKSPACE}/automation-tools" +AUTO_TOOLS_REPO="https://github.com/iecedge/automation-tools.git" +AUTO_TOOLS_REV=${AUTO_TOOLS_VER:-cord-7.0-arm64} + +rm -rf "${M}" +mkdir -p "${M}" "${WORKSPACE}/cord/test" # Update helm-charts submdule needed later # ignore subproject commit and use latest remote version git submodule update --init --remote "${basepath}/../../src_repo/helm-charts" -cd "${WORKSPACE}" -test -d automation-tools || git clone "${AUTO_TOOLS_GIT}" -cd "${WORKSPACE}/automation-tools" && git checkout "${AUTO_TOOLS_VER}" - -# Fake the setup phase so that portcheck.sh is not called -# also install some required packages -sudo apt install -y httpie jq software-properties-common bridge-utils make -# add iptbles rule needed to forward DHCP packets comming from the RG_POD -sudo iptables -P FORWARD ACCEPT -touch "${M}/setup" - -# Skip helm installation if it already exists and fake /usr/local/bin/helm -if xhelm=$(command -v helm) -then - if [ "${xhelm}" != "/usr/local/bin/helm" ] - then - echo "helm is installed at ${xhelm}; symlinking to /usr/local/bin/helm" - mkdir -p /usr/local/bin/ || true - sudo ln -sf "${xhelm}" /usr/local/bin/helm - fi -else - echo "helm is not installed" -fi +test -d "${AUTO_TOOLS}" || git clone "${AUTO_TOOLS_REPO}" "${AUTO_TOOLS}" +(cd "${AUTO_TOOLS}"; git checkout "${AUTO_TOOLS_REV}") # Faking helm-charts repo clone to our own git submodule if not already there CHARTS="${WORKSPACE}/cord/helm-charts" -test -d "${CHARTS}" || test -h "${CHARTS}" || \ +test -d "${CHARTS}" || test -L "${CHARTS}" || \ ln -s "${basepath}/../../src_repo/helm-charts" "${CHARTS}" -# Fake SiaB components setup since they are already installed -milestones="kubeadm helm-init kafka kafka-running etcd-operator-ready voltha \ - voltha-running nem onos siab" - -for m in ${milestones} -do - echo "Faking SiaB milestone ${M}/${m}" - test -f "${M}/${m}" || touch "${M}/${m}" -done +cd "${AUTO_TOOLS}/seba-in-a-box" +. env.sh # Now calling make, to install PONSim -cd "${WORKSPACE}/automation-tools/seba-in-a-box" make stable - -- 2.16.6