X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=ric-infra%2F00-Kubernetes%2Fbin%2Finstall;fp=ric-infra%2F00-Kubernetes%2Fbin%2Finstall;h=6b038000da61c5d6ee49f59953856ec6d814d616;hb=ea83d035d863452d738abca47b966defb9a35456;hp=d351e92782c91b6028647f4779fbbfc89da5c9bd;hpb=7f1e409379856025977fc8a6ea04ddb215f21a13;p=it%2Fdep.git diff --git a/ric-infra/00-Kubernetes/bin/install b/ric-infra/00-Kubernetes/bin/install index d351e927..6b038000 100755 --- a/ric-infra/00-Kubernetes/bin/install +++ b/ric-infra/00-Kubernetes/bin/install @@ -17,6 +17,47 @@ # limitations under the License. # ################################################################################ -# This is a temporary script that today deploy one node K8S cluster -./install-1node-k8s +# 1. Edit the ../etc/env.rc file for local deployment's Gerrit, Nexus repos, Helm repo +# parameters +# 2. Update the ../etc/openstack.rc file for OpenStack installation parameters +# 3. Running from an environment with OpenStackl CLI access + +DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" +set -a +RCS="$(find $DIR/../etc -type f -maxdepth 1)" +for RC in $RCS; do + echo "reading in values in $RC" + source $RC +done +set +a + +if [ -z "$WORKSPACE" ]; then + export WORKSPACE=`git rev-parse --show-toplevel` +fi +HEAT_DIR="$WORKSPACE/ric-infra/00-Kubernetes/heat" +BIN_DIR="$WORKSPACE/ric-infra/00-Kubernetes/bin" + + +stackname=aux + +for stackname in ric aux; do + WORKDIR_NAME="WORKDIR_${stackname}" + WORKDIR="${BIN_DIR}/${WORKDIR_NAME}" + echo ./deploy-stack.sh -w "$WORKDIR_NAME" -s "$stackname" -n 2 -6 "../heat/env/${stackname}.env" ${SSH_KEY} +done + +exit +# set up cross cluster hostname resolution for well-known host names +RIC_MST_IP=$(head -1 ${WORKDIR}/ips-ric | cut -f2 -d' ') +AUX_MST_IP=$(head -1 ${WORKDIR}/ips-aux | cut -f2 -d' ') +for IP in $(cut -f2 -d ' ' ips-ric); do + REMOTE_CMD="sudo sh -c \"echo '"$AUX_MST_IP" ves.aux.local' >> /etc/hosts; \ + echo '"$AUX_MST_IP" es.aux.local' >> /etc/hosts\"" + ssh -i $SSH_KEY -q -o "StrictHostKeyChecking no" ubuntu@$IP "$REMOTE_CMD" +done +for IP in $(cut -f2 -d ' ' ips-aux); do + REMOTE_CMD="sudo sh -c \"echo '"$RIC_MST_IP" a1.aux.local' >> /etc/hosts\"" + ssh -i $SSH_KEY -q -o "StrictHostKeyChecking no" ubuntu@$IP "$REMOTE_CMD" +done +