summaryrefslogtreecommitdiffstats
path: root/deploy.sh
blob: ff5797ee89d54720332fa3e4cf29294ec81464bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
# SPDX-license-identifier: Apache-2.0
##############################################################################
# Copyright (c)
# 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
# http://www.apache.org/licenses/LICENSE-2.0
##############################################################################

set -o xtrace
set -o errexit
set -o nounset

# Script for end to end RI-2 deployment using Infra engine and BMRA.
# Please refer to README for detailed information.

# Get path information
DIRECTORY=$(readlink -f "$0")
CURRENTPATH=$(dirname "$DIRECTORY")

# 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

# 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