-
Notifications
You must be signed in to change notification settings - Fork 4
/
run-deployment.sh
37 lines (25 loc) · 961 Bytes
/
run-deployment.sh
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
#!/bin/bash
set -e
source $PWD/openstack.rc
source $PWD/config.sh
source $PWD/image-settings.sh
export TF_VAR_image=$BASE_IMAGE_NAME_PREFIX-$BASE_IMAGE_VERSION
export TF_VAR_ssh_user="ubuntu" # needs to be adequate to the BASE_IMAGE_SET
export TF_VAR_image_gfs=$BASE_IMAGE_NAME_PREFIX-$BASE_IMAGE_VERSION
export TF_VAR_ssh_user_gfs="ubuntu"
# Paths to public and private keys for the deployment
export PUBLIC_KEY="$PWD/keys/key.pub"
export PRIVATE_KEY="$PWD/keys/key.pem"
# Vars for the operation of the deployment
export PORTAL_DEPLOYMENTS_ROOT="$PWD/deployments"
export PORTAL_APP_REPO_FOLDER="$PWD"
export TF_VAR_public_key_path=$PUBLIC_KEY
export TF_VAR_cluster_name=$NAME
deployment_dir="$PORTAL_DEPLOYMENTS_ROOT/$PORTAL_DEPLOYMENT_REFERENCE"
if [[ ! -d "$deployment_dir" ]]; then
mkdir -p "$deployment_dir"
fi
printf 'Using deployment directory "%s"\n' "$deployment_dir"
ostack/deploy.sh
cp -r kubespray/artifacts $PWD
./set-kubeconfig.sh