summaryrefslogtreecommitdiffstats
path: root/deploy.sh
diff options
context:
space:
mode:
authorGeorg Kunz <georg.kunz@est.tech>2020-08-24 23:09:51 +0200
committerRihab Banday <rihab.banday@ericsson.com>2020-09-10 10:29:28 +0000
commitcb3895c81c6931482e688a820013f6926644221d (patch)
tree82f7aa83cb8e407b6437353686dd6177c7227e54 /deploy.sh
parent42b76853c5ba0ad53aa04ae6cab4bd1de2db7b42 (diff)
Implementing jump VM create via ansible
This patch reimplements the creation of the jump VM as ansible playbook. The advantage of this approach is a more deterministic behavior and the ability to render configuration files using templates based on the pdf and idf. Moreover, this patch allows to overwrite the VENDOR variable. This is necessary to allow deployment in different labs via CI. The BMRA configuration has not yet been transformed to ansible template and needs to follow in subsequent patches. Signed-off-by: Georg Kunz <georg.kunz@est.tech> Signed-off-by: Victor Morales <v.morales@samsung.com> Change-Id: I2cde41dcecec7480bddf71ed864f06244a89f1f3 Reviewed-on: https://gerrit.opnfv.org/gerrit/c/kuberef/+/70882 Tested-by: jenkins-ci <jenkins-opnfv-ci@opnfv.org> Reviewed-by: Victor Morales <chipahuac@hotmail.com>
Diffstat (limited to 'deploy.sh')
-rwxr-xr-xdeploy.sh32
1 files changed, 21 insertions, 11 deletions
diff --git a/deploy.sh b/deploy.sh
index 78e2978..a491158 100755
--- a/deploy.sh
+++ b/deploy.sh
@@ -1,7 +1,7 @@
#!/bin/bash
# SPDX-license-identifier: Apache-2.0
##############################################################################
-# Copyright (c)
+# Copyright (c) Ericsson AB and others
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
@@ -16,8 +16,8 @@ set -o nounset
# Please refer to README for detailed information.
# Get path information
-DIRECTORY=$(readlink -f "$0")
-CURRENTPATH=$(dirname "$DIRECTORY")
+CURRENTPATH=$(git rev-parse --show-toplevel)
+export CURRENTPATH
# Source env variables & functions
# shellcheck source=./deploy.env
@@ -30,24 +30,34 @@ source "$CURRENTPATH/functions.sh"
# ---------------------------------------------------------------------
check_prerequisites
-# Clean up leftovers
-clean_up
+# ---------------------------------------------------------------------
+# bootstrap install prerequisites
+# ---------------------------------------------------------------------
+ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
+ "$CURRENTPATH"/playbooks/bootstrap.yaml
-# The next two functions require that you know your pxe network configuration
-# and IP of resulting jumphost VM in advance. This IP/MAC info also then needs to
-# be added in PDF & IDF files (not supported yet via this script)
-# Create jumphost VM & setup PXE network
-create_jump
-setup_PXE_network
+# ---------------------------------------------------------------------
+# Create jump VM from which the installation is performed
+# ---------------------------------------------------------------------
+ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
+ "$CURRENTPATH"/playbooks/jump-vm.yaml
+# ---------------------------------------------------------------------
# Copy files needed by Infra engine & BMRA in the jumphost VM
+# ---------------------------------------------------------------------
copy_files_jump
+# ---------------------------------------------------------------------
# Provision remote hosts
+# ---------------------------------------------------------------------
provision_hosts
+# ---------------------------------------------------------------------
# Setup networking (Adapt according to your network setup)
+# ---------------------------------------------------------------------
setup_network
+# ---------------------------------------------------------------------
# Provision k8s cluster (currently BMRA)
+# ---------------------------------------------------------------------
provision_k8s