blob: 6b038000da61c5d6ee49f59953856ec6d814d616 [file] [log] [blame]
Zhe Huang033ab422019-05-20 15:45:42 -04001#!/bin/bash
2
rshachamfa652a62019-04-03 17:59:41 +00003################################################################################
4# Copyright (c) 2019 AT&T Intellectual Property. #
5# Copyright (c) 2019 Nokia. #
6# #
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 #
10# #
11# http://www.apache.org/licenses/LICENSE-2.0 #
12# #
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################################################################################
19
Zhe Huang033ab422019-05-20 15:45:42 -040020
wriderea83d032019-06-04 22:31:18 -040021# 1. Edit the ../etc/env.rc file for local deployment's Gerrit, Nexus repos, Helm repo
22# parameters
23# 2. Update the ../etc/openstack.rc file for OpenStack installation parameters
24# 3. Running from an environment with OpenStackl CLI access
25
26DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
27set -a
28RCS="$(find $DIR/../etc -type f -maxdepth 1)"
29for RC in $RCS; do
30 echo "reading in values in $RC"
31 source $RC
32done
33set +a
34
35if [ -z "$WORKSPACE" ]; then
36 export WORKSPACE=`git rev-parse --show-toplevel`
37fi
38HEAT_DIR="$WORKSPACE/ric-infra/00-Kubernetes/heat"
39BIN_DIR="$WORKSPACE/ric-infra/00-Kubernetes/bin"
40
41
42stackname=aux
43
44for 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}
48done
49
50exit
51# set up cross cluster hostname resolution for well-known host names
52RIC_MST_IP=$(head -1 ${WORKDIR}/ips-ric | cut -f2 -d' ')
53AUX_MST_IP=$(head -1 ${WORKDIR}/ips-aux | cut -f2 -d' ')
54for 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"
58done
59for 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"
62done
63