X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=deploy.sh;h=a4911584381b0a5e190c8259a910f4452f31823e;hb=fa8a8f4779bbfe58c0588b4fe19a887767737f78;hp=4ecd6c6a66807c46c541e60dc0b1aeb5017080da;hpb=055c5c8ed12b1fbb52e5740866bd3b2803a33f86;p=kuberef.git diff --git a/deploy.sh b/deploy.sh index 4ecd6c6..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,34 +16,48 @@ 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 -source $CURRENTPATH/deploy.env -source $CURRENTPATH/functions.sh - -# Clean up leftovers -clean_up - -# 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 - -# Get IP of the jumphost VM -get_vm_ip - +# shellcheck source=./deploy.env +source "$CURRENTPATH/deploy.env" +# shellcheck source=./functions.sh +source "$CURRENTPATH/functions.sh" + +# --------------------------------------------------------------------- +# check installation and runtime prerequisites +# --------------------------------------------------------------------- +check_prerequisites + +# --------------------------------------------------------------------- +# bootstrap install prerequisites +# --------------------------------------------------------------------- +ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ + "$CURRENTPATH"/playbooks/bootstrap.yaml + +# --------------------------------------------------------------------- +# 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