4ecd6c6a66807c46c541e60dc0b1aeb5017080da
[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 source $CURRENTPATH/deploy.env
24 source $CURRENTPATH/functions.sh
25
26 # Clean up leftovers
27 clean_up
28
29 # The next two functions require that you know your pxe network configuration
30 # and IP of resulting jumphost VM in advance. This IP/MAC info also then needs to
31 # be added in PDF & IDF files (not supported yet via this script)
32 # Create jumphost VM & setup PXE network
33 create_jump
34 setup_PXE_network
35
36 # Get IP of the jumphost VM
37 get_vm_ip
38
39 # Copy files needed by Infra engine & BMRA in the jumphost VM
40 copy_files_jump
41
42 # Provision remote hosts
43 provision_hosts
44
45 # Setup networking (Adapt according to your network setup)
46 setup_network
47
48 # Provision k8s cluster (currently BMRA)
49 provision_k8s