3 ################################################################################
4 # Copyright (c) 2019 AT&T Intellectual Property. #
5 # Copyright (c) 2019 Nokia. #
7 # Licensed under the Apache License, Version 2.0 (the "License"); #
8 # you may not use this file except in compliance with the License. #
9 # You may obtain a copy of the License at #
11 # http://www.apache.org/licenses/LICENSE-2.0 #
13 # Unless required by applicable law or agreed to in writing, software #
14 # distributed under the License is distributed on an "AS IS" BASIS, #
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
16 # See the License for the specific language governing permissions and #
17 # limitations under the License. #
18 ################################################################################
21 # 1. Edit the ../etc/env.rc file for local deployment's Gerrit, Nexus repos, Helm repo
23 # 2. Update the ../etc/openstack.rc file for OpenStack installation parameters
24 # 3. Running from an environment with OpenStackl CLI access
26 DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
28 RCS="$(find $DIR/../etc -type f -maxdepth 1)"
30 echo "reading in values in $RC"
35 if [ -z "$WORKSPACE" ]; then
36 export WORKSPACE=`git rev-parse --show-toplevel`
38 HEAT_DIR="$WORKSPACE/tools/k8s/heat"
39 BIN_DIR="$WORKSPACE/tools/k8s/bin"
44 for stackname in ric aux; do
45 WORKDIR_NAME="WORKDIR_${stackname}"
46 WORKDIR="${BIN_DIR}/${WORKDIR_NAME}"
47 echo ./deploy-stack.sh -w "$WORKDIR_NAME" -s "$stackname" -n 2 -6 "../heat/env/${stackname}.env" ${SSH_KEY}
51 # set up cross cluster hostname resolution for well-known host names
52 RIC_MST_IP=$(head -1 ${WORKDIR}/ips-ric | cut -f2 -d' ')
53 AUX_MST_IP=$(head -1 ${WORKDIR}/ips-aux | cut -f2 -d' ')
54 for IP in $(cut -f2 -d ' ' ips-ric); do
55 REMOTE_CMD="sudo sh -c \"echo '"$AUX_MST_IP" ves.aux.local' >> /etc/hosts; \
56 echo '"$AUX_MST_IP" es.aux.local' >> /etc/hosts\""
57 ssh -i $SSH_KEY -q -o "StrictHostKeyChecking no" ubuntu@$IP "$REMOTE_CMD"
59 for IP in $(cut -f2 -d ' ' ips-aux); do
60 REMOTE_CMD="sudo sh -c \"echo '"$RIC_MST_IP" a1.aux.local' >> /etc/hosts\""
61 ssh -i $SSH_KEY -q -o "StrictHostKeyChecking no" ubuntu@$IP "$REMOTE_CMD"