Replace worker node specific config file by a common file
[kuberef.git] / deploy.sh
1 #!/bin/bash
2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) Ericsson AB and others
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 CURRENTPATH=$(git rev-parse --show-toplevel)
20 export CURRENTPATH
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 # ---------------------------------------------------------------------
34 # bootstrap install prerequisites
35 # ---------------------------------------------------------------------
36 ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
37     "$CURRENTPATH"/playbooks/bootstrap.yaml
38
39 # ---------------------------------------------------------------------
40 # Create jump VM from which the installation is performed
41 # ---------------------------------------------------------------------
42 ansible-playbook -i "$CURRENTPATH"/inventory/localhost.ini \
43     "$CURRENTPATH"/playbooks/jump-vm.yaml
44
45 # ---------------------------------------------------------------------
46 # Copy files needed by Infra engine & BMRA in the jumphost VM
47 # ---------------------------------------------------------------------
48 copy_files_jump
49
50 # ---------------------------------------------------------------------
51 # Provision remote hosts
52 # ---------------------------------------------------------------------
53 provision_hosts
54
55 # ---------------------------------------------------------------------
56 # Setup networking (Adapt according to your network setup)
57 # ---------------------------------------------------------------------
58 setup_network
59
60 # ---------------------------------------------------------------------
61 # Provision k8s cluster (currently BMRA)
62 # ---------------------------------------------------------------------
63 provision_k8s