78e297817e4bfd0ad223f38e53e4ed272a67018c
[kuberef.git] / deploy.sh
1 #!/bin/bash
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c)
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
10
11 set -o xtrace
12 set -o errexit
13 set -o nounset
14
15 # Script for end to end RI-2 deployment using Infra engine and BMRA.
16 # Please refer to README for detailed information.
17
18 # Get path information
19 DIRECTORY=$(readlink -f "$0")
20 CURRENTPATH=$(dirname "$DIRECTORY")
21
22 # Source env variables & functions
23 # shellcheck source=./deploy.env
24 source "$CURRENTPATH/deploy.env"
25 # shellcheck source=./functions.sh
26 source "$CURRENTPATH/functions.sh"
27
28 # ---------------------------------------------------------------------
29 # check installation and runtime prerequisites
30 # ---------------------------------------------------------------------
31 check_prerequisites
32
33 # Clean up leftovers
34 clean_up
35
36 # The next two functions require that you know your pxe network configuration
37 # and IP of resulting jumphost VM in advance. This IP/MAC info also then needs to
38 # be added in PDF & IDF files (not supported yet via this script)
39 # Create jumphost VM & setup PXE network
40 create_jump
41 setup_PXE_network
42
43 # Copy files needed by Infra engine & BMRA in the jumphost VM
44 copy_files_jump
45
46 # Provision remote hosts
47 provision_hosts
48
49 # Setup networking (Adapt according to your network setup)
50 setup_network
51
52 # Provision k8s cluster (currently BMRA)
53 provision_k8s