-
Notifications
You must be signed in to change notification settings - Fork 0
/
init.sh
29 lines (22 loc) · 898 Bytes
/
init.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
echo "Installing required modules"
pip install -U pyats[full] genie cryptography==3.3.1 requests cmlutils Jinja2==2.11.3 ansible==2.9.17 paramiko
init_common
echo "Cleaning up leftover cmlutils files"
rm -rf ${HOME}/.virl
echo "Copying initial files"
cp -f ${LAB}/init/virlrc ${HOME}/.virlrc
cp -rf ${LAB}/init/iac-infra ${LABDIR}
cp -f ${LAB}/init/vlan-fabric.yml ${LABDIR}
echo "Shutting down default CML lab"
cml down -n "Small NXOS/IOSXE Network"
echo "Shutting down and deleting any previous labs"
(cml use -n "Production" && cml rm -f --no-confirm) >/dev/null 2>&1 || true
(cml use -n "Testing" && cml rm -f --no-confirm) >/dev/null 2>&1 || true
echo "Spinning up HOLOPS-2800 lab topologies"
cml up -f ${LAB}/helper-files/Production.yaml >/dev/null 2>&1
cml up -f ${LAB}/helper-files/Testing.yaml >/dev/null 2>&1
echo "Spinning up GitLab-CE"
cwd=$(pwd)
cd ${LAB}/gitlab
make
cd ${cwd}