X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=deploy.sh;h=def7d9572bb3af23978cd3bb32f51f95813a281f;hb=e4857b2ae8ed40011d79c14b6cc9ab8d2bc8409a;hp=5a012e7819fdfa846462f08949b4749f7cdeebd5;hpb=84f092e7961684bc9125aa7740c56ceb6811798c;p=kuberef.git diff --git a/deploy.sh b/deploy.sh index 5a012e7..def7d95 100755 --- a/deploy.sh +++ b/deploy.sh @@ -8,9 +8,11 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -set -o xtrace set -o errexit set -o nounset +if [ "${DEBUG:-false}" == "true" ]; then + set -o xtrace +fi # Script for end to end RI-2 deployment using Infra engine and BMRA. # Please refer to README for detailed information. @@ -21,32 +23,33 @@ export CURRENTPATH # shellcheck source=./functions.sh source "$CURRENTPATH/functions.sh" +# shellcheck source=./deploy.env +source "$CURRENTPATH/deploy.env" # --------------------------------------------------------------------- # check installation and runtime prerequisites # --------------------------------------------------------------------- check_prerequisites -# shellcheck source=./deploy.env -source "$CURRENTPATH/deploy.env" +# --------------------------------------------------------------------- +# creates a virtual environment for installation of dependencies +# --------------------------------------------------------------------- +creates_virtualenv # --------------------------------------------------------------------- # bootstrap install prerequisites # --------------------------------------------------------------------- -ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ - "$CURRENTPATH"/playbooks/bootstrap.yaml +run_playbook bootstrap # --------------------------------------------------------------------- # Create jump VM from which the installation is performed # --------------------------------------------------------------------- -ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ - "$CURRENTPATH"/playbooks/jump-vm.yaml +run_playbook jump-vm # --------------------------------------------------------------------- # Create BMRA config based on IDF and PDF # --------------------------------------------------------------------- -ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \ - "$CURRENTPATH"/playbooks/bmra-config.yaml +run_playbook bmra-config # --------------------------------------------------------------------- # Copy files needed by Infra engine & BMRA in the jumphost VM @@ -55,15 +58,20 @@ copy_files_jump # --------------------------------------------------------------------- # Provision remote hosts -# --------------------------------------------------------------------- -provision_hosts - -# --------------------------------------------------------------------- # Setup networking (Adapt according to your network setup) # --------------------------------------------------------------------- -setup_network +if [[ "$DEPLOYMENT" == "full" ]]; then + provision_hosts + setup_network +fi # --------------------------------------------------------------------- # Provision k8s cluster (currently BMRA) # --------------------------------------------------------------------- provision_k8s + +# --------------------------------------------------------------------- +# Copy kubeconfig to desired location +# --------------------------------------------------------------------- +copy_k8s_config +