Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TLS #71

Merged
merged 176 commits into from
Jan 11, 2024
Merged

TLS #71

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
176 commits
Select commit Hold shift + click to select a range
69a751f
v1.6
MarcGueury Dec 16, 2023
2607b78
v1.6
MarcGueury Dec 16, 2023
f596050
v1.6
MarcGueury Dec 16, 2023
f6a1129
v1.6
MarcGueury Dec 16, 2023
b5b801f
v1.6
MarcGueury Dec 19, 2023
9a659e6
v1.6
MarcGueury Dec 19, 2023
549c63e
v1.6
MarcGueury Dec 19, 2023
5d5ec28
v1.6
MarcGueury Dec 19, 2023
43ce2ab
v1.6
MarcGueury Dec 19, 2023
5fda6eb
v1.6
MarcGueury Dec 19, 2023
4aa766d
v1.6
MarcGueury Dec 19, 2023
bb26a1b
v1.6
MarcGueury Dec 19, 2023
f1115a3
v1.6
MarcGueury Dec 19, 2023
24d4d12
v1.6
MarcGueury Dec 19, 2023
16c9b6d
v1.6
MarcGueury Dec 19, 2023
f5cccaa
v1.6
MarcGueury Dec 19, 2023
7e824a1
v1.6
MarcGueury Dec 19, 2023
5794657
v1.6
MarcGueury Dec 20, 2023
d142a10
v1.6
MarcGueury Dec 20, 2023
de0cae2
v1.6
MarcGueury Dec 20, 2023
ff9cbe9
v1.6
MarcGueury Dec 20, 2023
55d31f5
v1.6
MarcGueury Dec 20, 2023
f27e885
v1.6
MarcGueury Dec 20, 2023
a5b4856
v1.6
MarcGueury Dec 20, 2023
5efb93e
v1.6
MarcGueury Dec 20, 2023
3d2006d
v1.6
MarcGueury Dec 20, 2023
e014b2d
v1.6
MarcGueury Dec 20, 2023
00c130d
v1.6
MarcGueury Dec 20, 2023
44711b0
v1.6
MarcGueury Dec 20, 2023
a1d22ed
v1.6
MarcGueury Dec 20, 2023
405a9f5
v1.6
MarcGueury Dec 21, 2023
e416ce9
v1.6
MarcGueury Dec 21, 2023
d91a849
v1.6
MarcGueury Dec 21, 2023
f149cc5
v1.6
MarcGueury Dec 21, 2023
f0a0741
v1.6
MarcGueury Dec 21, 2023
603cb0c
v1.6
MarcGueury Dec 21, 2023
78901da
v1.6
MarcGueury Dec 21, 2023
a2b832b
v1.6
MarcGueury Dec 21, 2023
79dd929
v1.6
MarcGueury Dec 21, 2023
c9fa425
v1.6
MarcGueury Dec 21, 2023
f1cc94a
v1.6
MarcGueury Dec 21, 2023
0db84a5
v1.6
MarcGueury Dec 21, 2023
5248419
v1.6
MarcGueury Dec 21, 2023
300359f
v1.6
MarcGueury Dec 21, 2023
01d80c8
v1.6
MarcGueury Dec 21, 2023
c262577
v1.6
MarcGueury Dec 21, 2023
48f3dd8
v1.6
MarcGueury Dec 21, 2023
ddc14b4
v1.6
MarcGueury Dec 22, 2023
577cf9d
v1.6
MarcGueury Dec 22, 2023
9321673
v1.6
MarcGueury Dec 22, 2023
903b09a
v1.6
MarcGueury Dec 22, 2023
32b0dfb
v1.6
MarcGueury Dec 22, 2023
7c4a301
v1.6
MarcGueury Dec 23, 2023
469bc27
v1.6
MarcGueury Dec 23, 2023
5f6a84c
v1.6
MarcGueury Dec 23, 2023
c34eab9
v1.6
MarcGueury Dec 23, 2023
7b60783
v1.6
MarcGueury Dec 23, 2023
76d2d93
v1.6
MarcGueury Dec 23, 2023
65c3560
v1.6
MarcGueury Dec 23, 2023
8939804
v1.6
MarcGueury Dec 23, 2023
b15ebda
v1.6
MarcGueury Dec 23, 2023
8872204
v1.6
MarcGueury Dec 24, 2023
2c8db33
v1.6
MarcGueury Dec 24, 2023
910ed48
v1.6
MarcGueury Dec 24, 2023
2abd6c0
v1.6
MarcGueury Dec 28, 2023
2dbba8b
v1.6
MarcGueury Dec 28, 2023
e022dc7
v1.6
MarcGueury Dec 28, 2023
826ce33
v1.6
MarcGueury Dec 28, 2023
7aca034
v1.6
MarcGueury Dec 28, 2023
3ec900d
v1.6
MarcGueury Dec 28, 2023
faf8cb3
v1.6
MarcGueury Dec 28, 2023
50568fe
v1.6
MarcGueury Dec 28, 2023
e8e0160
v1.6
MarcGueury Dec 28, 2023
a01473e
v1.6
MarcGueury Dec 28, 2023
ff451bf
v1.6
MarcGueury Dec 28, 2023
44f48ed
v1.6
MarcGueury Dec 28, 2023
4cf0543
v1.6
MarcGueury Dec 28, 2023
d9e14b4
v1.6
MarcGueury Dec 28, 2023
6234421
v1.6
MarcGueury Dec 28, 2023
121600f
v1.6
MarcGueury Dec 28, 2023
d6f77ae
v1.6
MarcGueury Dec 28, 2023
d501a92
v1.6
MarcGueury Dec 28, 2023
1c2c04b
v1.6
MarcGueury Dec 28, 2023
8149d1f
v1.6
MarcGueury Dec 28, 2023
2ca8080
v1.6
MarcGueury Dec 28, 2023
2192e08
v1.6
MarcGueury Dec 28, 2023
b4bc3cb
v1.6
MarcGueury Dec 28, 2023
8248f26
v1.6
MarcGueury Dec 28, 2023
8509e82
v1.6
MarcGueury Dec 28, 2023
0e54239
v1.6
MarcGueury Dec 28, 2023
cd6efda
v1.6
MarcGueury Dec 28, 2023
0c6a3be
v1.6
MarcGueury Dec 28, 2023
417bb22
v1.6
MarcGueury Dec 28, 2023
9787595
v1.6
MarcGueury Dec 28, 2023
0948f0b
v1.6
MarcGueury Dec 28, 2023
8c4d70f
v1.6
MarcGueury Dec 28, 2023
397e866
v1.6
MarcGueury Dec 28, 2023
5eb8053
v1.6
MarcGueury Dec 29, 2023
806f0a6
v1.6
MarcGueury Dec 29, 2023
5d9a765
v1.6
MarcGueury Dec 29, 2023
3980702
v1.6
MarcGueury Dec 29, 2023
b3a5531
v1.6
MarcGueury Dec 29, 2023
bf6aed7
v1.6
MarcGueury Dec 29, 2023
7ae7cda
v1.6
MarcGueury Dec 29, 2023
2c6c28e
v1.6
MarcGueury Dec 29, 2023
cbbf2aa
v1.6
MarcGueury Dec 29, 2023
8045907
v1.6
MarcGueury Dec 29, 2023
64dde47
v1.6
MarcGueury Dec 29, 2023
01fca94
v1.6
MarcGueury Dec 29, 2023
e6d2ae5
v1.6
MarcGueury Jan 1, 2024
9c8cc6e
v1.6
MarcGueury Jan 1, 2024
7929134
v1.6
MarcGueury Jan 1, 2024
475a297
v1.6
MarcGueury Jan 1, 2024
9635282
v1.6
MarcGueury Jan 1, 2024
718321a
v1.6
MarcGueury Jan 1, 2024
4853003
v1.6
MarcGueury Jan 1, 2024
b75e1d4
v1.6
MarcGueury Jan 1, 2024
0df6e4e
v1.6
MarcGueury Jan 2, 2024
b704a19
v1.6
MarcGueury Jan 2, 2024
8fabd5c
v1.6
MarcGueury Jan 2, 2024
2aa1132
v1.6
MarcGueury Jan 2, 2024
b7d5e26
v1.6
MarcGueury Jan 2, 2024
c62b5d1
v1.6
MarcGueury Jan 3, 2024
1501392
v1.6
MarcGueury Jan 3, 2024
19283c4
v1.6
MarcGueury Jan 3, 2024
3207656
v1.6
MarcGueury Jan 3, 2024
aae974e
v1.6
MarcGueury Jan 3, 2024
5528304
v1.6
MarcGueury Jan 3, 2024
3fb5bb7
v1.6
MarcGueury Jan 3, 2024
fc89762
v1.6
MarcGueury Jan 4, 2024
960294b
v1.6
MarcGueury Jan 4, 2024
b4d146b
v1.6
MarcGueury Jan 4, 2024
bcc27bc
v1.6
MarcGueury Jan 4, 2024
8252ca2
v1.6
MarcGueury Jan 4, 2024
064dd6c
v1.6
MarcGueury Jan 4, 2024
96bd6e7
v1.6
MarcGueury Jan 4, 2024
73dd682
v1.6
MarcGueury Jan 5, 2024
9d45e16
v1.6
MarcGueury Jan 5, 2024
dfe7d7f
v1.6
MarcGueury Jan 5, 2024
2d46a20
v1.6
MarcGueury Jan 6, 2024
733cc96
v1.6
MarcGueury Jan 7, 2024
3c28a85
v1.6
MarcGueury Jan 7, 2024
bda3788
v1.6
MarcGueury Jan 7, 2024
428c4eb
v1.6
MarcGueury Jan 7, 2024
16d4935
v1.6
MarcGueury Jan 7, 2024
a5bf109
v1.6
MarcGueury Jan 7, 2024
dd3fa70
v1.6
MarcGueury Jan 7, 2024
ff4e05a
v1.6
MarcGueury Jan 7, 2024
2012333
v1.6
MarcGueury Jan 7, 2024
44d1869
v1.6
MarcGueury Jan 7, 2024
ceda26a
v1.6
MarcGueury Jan 7, 2024
4ac85df
v1.6
MarcGueury Jan 8, 2024
e4cceaa
v1.6
MarcGueury Jan 8, 2024
60902f2
v1.6
MarcGueury Jan 8, 2024
73e465d
v1.6
MarcGueury Jan 8, 2024
cfba973
v1.6
MarcGueury Jan 8, 2024
9cac0d0
v1.6
MarcGueury Jan 8, 2024
f1c607f
v1.6
MarcGueury Jan 8, 2024
72f2ea0
v1.6
MarcGueury Jan 8, 2024
796f79b
v1.6
MarcGueury Jan 8, 2024
d874423
v1.6
MarcGueury Jan 8, 2024
478a5f4
v1.6
MarcGueury Jan 10, 2024
5132cde
v1.6
MarcGueury Jan 10, 2024
9c20b40
v1.6
MarcGueury Jan 10, 2024
dcf0e0a
v1.6
MarcGueury Jan 10, 2024
e7e9f67
v1.6
MarcGueury Jan 10, 2024
059f8b0
v1.6
MarcGueury Jan 10, 2024
86e35c9
v1.6
MarcGueury Jan 10, 2024
f2ae666
v1.6
MarcGueury Jan 10, 2024
702baae
v1.6
MarcGueury Jan 10, 2024
4d1f668
v1.6
MarcGueury Jan 10, 2024
5db2865
v1.6
MarcGueury Jan 10, 2024
0b5497a
v1.6
MarcGueury Jan 10, 2024
b07f2b9
v1.6
MarcGueury Jan 11, 2024
c11ca61
v1.6
MarcGueury Jan 11, 2024
7ca6a12
v1.6
MarcGueury Jan 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion basis/bin/add_api_portal.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ add_api_portal() {

if [ "$APIM_HOST" != "" ]; then
FIRST_LETTER_UPPERCASE=`echo $TF_VAR_prefix | sed -e "s/\b\(.\)/\u\1/g"`
if [ "$TF_VAR_ui_strategy" == "api" ]; then
if [ "$TF_VAR_ui_type" == "api" ]; then
APIGW_URL=https://${APIGW_HOSTNAME}/${TF_VAR_prefix}
for APP_DIR in `app_dir_list`; do
if [ -f src/${APP_DIR}/openapi_spec.yaml ]; then
Expand Down
65 changes: 46 additions & 19 deletions basis/bin/auto_env.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
#!/bin/bash

# Enable BASH history for Stack Trace. But do not store it.
set -o history -o histexpand
unset HISTFILE

if [[ -z "${BIN_DIR}" ]]; then
export BIN_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
fi
if [[ -z "${PROJECT_DIR}" ]]; then
echo "Error: PROJECT_DIR not set"
exit
error_exit "PROJECT_DIR not set"
fi

# Target DIR
Expand Down Expand Up @@ -48,18 +52,18 @@ livelabs_green_button
# XXX -> It would be safer to check also for TF_VAR_xxx containing __TO_FILL__ too

if declare -p | grep -q "__TO_FILL__"; then
echo "Error: missing environment variables."
echo
echo "ERROR: missing environment variables"
echo
declare -p | grep __TO_FILL__
echo
echo "Edit the file env.sh. Some variables needs to be filled:"
cat env.sh | grep __TO_FILL__
exit 1
error_exit "Missing environment variables."
fi

if ! command -v jq &> /dev/null; then
echo "Command jq could not be found. Please install it"
echo "Ex on linux: sudo yum install jq -y"
exit 1
error_exit "Unix command jq not found. Please install it."
fi

#-- PRE terraform ----------------------------------------------------------
Expand Down Expand Up @@ -116,7 +120,7 @@ else
auto_echo TF_VAR_region=$TF_VAR_region

# Kubernetes and OCIR
if [ "$TF_VAR_deploy_strategy" == "kubernetes" ] || [ "$TF_VAR_deploy_strategy" == "function" ] || [ "$TF_VAR_deploy_strategy" == "container_instance" ] || [ -f $PROJECT_DIR/src/terraform/oke.tf ]; then
if [ "$TF_VAR_deploy_type" == "kubernetes" ] || [ "$TF_VAR_deploy_type" == "function" ] || [ "$TF_VAR_deploy_type" == "container_instance" ] || [ -f $PROJECT_DIR/src/terraform/oke.tf ]; then
export TF_VAR_namespace=`oci os ns get | jq -r .data`
auto_echo TF_VAR_namespace=$TF_VAR_namespace
export [email protected]
Expand All @@ -134,51 +138,71 @@ else
export TF_VAR_openapi_spec=$(cat $PROJECT_DIR/src/app/openapi_spec.yaml)
fi

if [ "$TF_VAR_deploy_strategy" == "hpc" ]; then
if [ "$TF_VAR_deploy_type" == "hpc" ]; then
# Create synonyms for variables with another name in the oci-hpc stack
export TF_VAR_ssh_key=$TF_VAR_ssh_public_key
export TF_VAR_targetCompartment=$TF_VAR_compartment_ocid
export TF_VAR_ad=`oci iam availability-domain list --compartment-id=$TF_VAR_tenancy_ocid | jq -r .data[0].name`
export TF_VAR_bastion_ad=$TF_VAR_ad
fi

# TLS
if [ "$TF_VAR_dns_name" != "" ] && [ "$TF_VAR_certificate_ocid" == "" ]; then
export TF_VAR_certificate_ocid=`oci certs-mgmt certificate list --all --compartment-id $TF_VAR_compartment_ocid --name $TF_VAR_dns_name | jq -r .data.items[].id`
fi

# GIT
if [ `git rev-parse --is-inside-work-tree 2>/dev/null` ]; then
export GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`
if [ "$GIT_BRANCH" != "" ]; then
export TF_VAR_git_url=`git config --get remote.origin.url`
if [[ "$TF_VAR_git_url" == *"github.com"* ]]; then
S1=${TF_VAR_git_url/[email protected]:/https:\/\/github.com\/}
export TF_VAR_git_url=${S1/.git/\/blob\/}${GIT_BRANCH}
if [[ "$TF_VAR_git_url" == *".git"* ]]; then
export TF_VAR_git_url=${S1/.git/\/blob\/}${GIT_BRANCH}
else
export TF_VAR_git_url=${S1}/blob/${GIT_BRANCH}
fi
elif [[ "$TF_VAR_git_url" == *"gitlab.com"* ]]; then
S1=${TF_VAR_git_url/[email protected]:/https:\/\/gitlab.com\/}
export TF_VAR_git_url=${S1/.git/\/-\/blob\/}${GIT_BRANCH}
fi
cd $PROJECT_DIR
export GIT_RELATIVE_PATH=`git rev-parse --show-prefix`
cd -
cd - > /dev/null
export TF_VAR_git_url=${TF_VAR_git_url}/${GIT_RELATIVE_PATH}
echo $TF_VAR_git_url
auto_echo TF_VAR_git_url=$TF_VAR_git_url
fi
fi
fi


#-- POST terraform ----------------------------------------------------------
export STATE_FILE=$TARGET_DIR/terraform.tfstate
if [ -f $STATE_FILE ]; then
# OBJECT_STORAGE_URL
export OBJECT_STORAGE_URL=https://objectstorage.${TF_VAR_region}.oraclecloud.com

# API GW
if [ "$TF_VAR_deploy_strategy" == "function" ] || [ "$TF_VAR_deploy_strategy" == "container_instance" ] || [ "$TF_VAR_ui_strategy" == "api" ]; then
if [ "$TF_VAR_deploy_type" == "function" ] || [ "$TF_VAR_deploy_type" == "container_instance" ] || [ "$TF_VAR_ui_type" == "api" ]; then
# APIGW URL
get_attribute_from_tfstate "APIGW_HOSTNAME" "starter_apigw" "hostname"
# APIGW Deployment id
get_attribute_from_tfstate "APIGW_DEPLOYMENT_OCID" "starter_apigw_deployment" "id"
fi

# Instance Pool
if [ "$TF_VAR_deploy_type" == "instance_pool" ]; then
# XXX Does not work with Resource Manager XXX
# Check in the terraform state is the compute is already created.
get_id_from_tfstate "COMPUTE_OCID" "starter_instance"
if [ "$COMPUTE_OCID" != "" ]; then
export TF_VAR_compute_ready="true"
fi
fi

# Functions
if [ "$TF_VAR_deploy_strategy" == "function" ]; then
if [ "$TF_VAR_deploy_type" == "function" ]; then
# OBJECT Storage URL
export BUCKET_URL="https://objectstorage.${TF_VAR_region}.oraclecloud.com/n/${TF_VAR_namespace}/b/${TF_VAR_prefix}-public-bucket/o"

Expand All @@ -195,7 +219,7 @@ if [ -f $STATE_FILE ]; then
fi

# Container Instance
if [ "$TF_VAR_deploy_strategy" == "container_instance" ]; then
if [ "$TF_VAR_deploy_type" == "container_instance" ]; then
if [ -f $TARGET_DIR/docker_image_ui.txt ] || [ -f $TARGET_DIR/docker_image_app.txt ] ; then
if [ -f $TARGET_DIR/docker_image_ui.txt ]; then
export TF_VAR_docker_image_ui=`cat $TARGET_DIR/docker_image_ui.txt`
Expand All @@ -220,19 +244,22 @@ if [ -f $STATE_FILE ]; then
get_output_from_tfstate "JDBC_URL" "jdbc_url"
get_output_from_tfstate "DB_URL" "db_url"

if [ "$TF_VAR_db_strategy" == "autonomous" ]; then

if [ "$TF_VAR_db_type" == "autonomous" ]; then
get_output_from_tfstate "ORDS_URL" "ords_url"
fi

if [ "$TF_VAR_db_strategy" == "database" ]; then
if [ "$TF_VAR_db_type" == "database" ]; then
get_attribute_from_tfstate "DB_NODE_IP" "starter_node_vnic" "private_ip_address"
elif [ "$TF_VAR_db_strategy" == "db_free" ]; then
elif [ "$TF_VAR_db_type" == "db_free" ]; then
get_output_from_tfstate "DB_NODE_IP" "db_free_ip"
fi

if [ "$TF_VAR_deploy_strategy" == "kubernetes" ] || [ -f $PROJECT_DIR/src/terraform/oke.tf ]; then
if [ "$TF_VAR_deploy_type" == "kubernetes" ] || [ -f $PROJECT_DIR/src/terraform/oke.tf ]; then
# OKE
get_output_from_tfstate "OKE_OCID" "oke_ocid"
export TF_VAR_ingress_ip=`kubectl get service -n ingress-nginx ingress-nginx-controller -o jsonpath="{.status.loadBalancer.ingress[0].ip}"`
export INGRESS_LB_OCID=`oci lb load-balancer list --compartment-id $TF_VAR_compartment_ocid | jq -r '.data[] | select(.["ip-addresses"][0]["ip-address"]=="'$TF_VAR_ingress_ip'") | .id'`
fi

# JMS
Expand Down
21 changes: 16 additions & 5 deletions basis/bin/build_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ title "OCI Starter - Build"
if [ "$TF_VAR_ssh_private_path" == "" ]; then
. $BIN_DIR/sshkey_generate.sh
fi

. env.sh
if [ "$TF_VAR_tls" != "" ]; then
title "Certificate"
certificate_dir_before_terraform
fi

title "Terraform Apply"
src/terraform/apply.sh --auto-approve -no-color
exit_on_error
Expand Down Expand Up @@ -52,24 +58,29 @@ if [ -f src/ui/build_ui.sh ]; then
fi

# Deploy
title "Deploy $TF_VAR_deploy_strategy"
if [ "$TF_VAR_deploy_strategy" == "compute" ]; then
title "Deploy $TF_VAR_deploy_type"
if [ "$TF_VAR_deploy_type" == "compute" ]; then
$BIN_DIR/deploy_compute.sh
exit_on_error
elif [ "$TF_VAR_deploy_strategy" == "instance_pool" ]; then
elif [ "$TF_VAR_deploy_type" == "instance_pool" ]; then
$BIN_DIR/deploy_compute.sh
exit_on_error
export TF_VAR_compute_ready="true"
src/terraform/apply.sh --auto-approve -no-color
exit_on_error
elif [ "$TF_VAR_deploy_strategy" == "kubernetes" ]; then
elif [ "$TF_VAR_deploy_type" == "kubernetes" ]; then
$BIN_DIR/oke_deploy.sh
exit_on_error
elif [ "$TF_VAR_deploy_strategy" == "container_instance" ]; then
elif [ "$TF_VAR_deploy_type" == "container_instance" ]; then
$BIN_DIR/ci_deploy.sh
exit_on_error
fi

if [ "$TF_VAR_tls" != "" ]; then
title "Certificate - Post Deploy"
certificate_post_deploy
fi

$BIN_DIR/add_api_portal.sh

title "Done"
Expand Down
6 changes: 3 additions & 3 deletions basis/bin/build_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
#!/bin/bash
if [[ -z "${BIN_DIR}" ]]; then
echo "Error: BIN_DIR not set"
exit
exit 1
fi
if [[ -z "${PROJECT_DIR}" ]]; then
echo "Error: PROJECT_DIR not set"
exit
exit 1
fi

APP_DIR=`echo ${SCRIPT_DIR} |sed -E "s#(.*)/(.*)#\2#"`
cd $SCRIPT_DIR

if [ -z "$TF_VAR_deploy_strategy" ]; then
if [ -z "$TF_VAR_deploy_type" ]; then
. $PROJECT_DIR/env.sh
else
. $BIN_DIR/shared_bash_function.sh
Expand Down
2 changes: 1 addition & 1 deletion basis/bin/destroy_all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fi
if [ -f $PROJECT_DIR/src/terraform/oke.tf ]; then
title "OKE Destroy"
bin/oke_destroy.sh --auto-approve
elif [ "$TF_VAR_deploy_strategy" == "function" ]; then
elif [ "$TF_VAR_deploy_type" == "function" ]; then
title "Delete Object Storage files"
oci os object bulk-delete -bn ${TF_VAR_prefix}-public-bucket --force
fi
Expand Down
15 changes: 9 additions & 6 deletions basis/bin/done.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR/..

if [ -z "$TF_VAR_deploy_strategy" ]; then
if [ -z "$TF_VAR_deploy_type" ]; then
. ./env.sh -silent
else
. bin/shared_bash_function.sh
Expand All @@ -18,7 +18,7 @@ if [ ! -z "$UI_URL" ]; then
if [ ! -z "$TEST_NAME" ]; then
echo $UI_URL > /tmp/ui_url.txt

if [ "$TF_VAR_deploy_strategy" == "kubernetes" ]; then
if [ "$TF_VAR_deploy_type" == "kubernetes" ]; then
kubectl wait --for=condition=ready pod ${TF_VAR_prefix}-app
kubectl wait --for=condition=ready pod ${TF_VAR_prefix}-ui
kubectl get all
Expand All @@ -40,7 +40,7 @@ if [ ! -z "$UI_URL" ]; then
sleep 5
x=$(( $x + 1 ))
done
if [ "$TF_VAR_ui_strategy" != "api" ]; then
if [ "$TF_VAR_ui_type" != "api" ]; then
if [ -f "/tmp/cookie.txt" ]; then
rm /tmp/cookie.txt
fi
Expand All @@ -53,21 +53,24 @@ if [ ! -z "$UI_URL" ]; then
fi
curl $UI_URL/app/info -b /tmp/cookie.txt -c /tmp/cookie.txt -L --retry 5 --retry-max-time 20 -D /tmp/result_info.log > /tmp/result.info
fi
if [ "$TF_VAR_ui_strategy" != "api" ]; then
if [ "$TF_VAR_ui_type" != "api" ]; then
echo - User Interface: $UI_URL/
fi
if [ "$UI_HTTP" != "" ]; then
echo - HTTP : $UI_HTTP/
fi
for APP_DIR in `app_dir_list`; do
if [ -f $PROJECT_DIR/src/$APP_DIR/openapi_spec.yaml ]; then
python3 $BIN_DIR/openapi_list.py $PROJECT_DIR/src/$APP_DIR/openapi_spec.yaml $UI_URL
fi
# echo - Rest DB API : $UI_URL/$APP_DIR/dept
# echo - Rest Info API : $UI_URL/$APP_DIR/info
done
if [ "$TF_VAR_deploy_strategy" == "compute" ] && [ "$TF_VAR_ui_strategy" == "api" ]; then
if [ "$TF_VAR_deploy_type" == "compute" ] && [ "$TF_VAR_ui_type" == "api" ]; then
export APIGW_URL=https://${APIGW_HOSTNAME}/${TF_VAR_prefix}
echo - API Gateway URL : $APIGW_URL/app/dept
fi
if [ "$TF_VAR_language" == "java" ] && [ "$TF_VAR_java_framework" == "springboot" ] && [ "$TF_VAR_ui_strategy" == "html" ] && [ "$TF_VAR_db_node_count" == "2" ]; then
if [ "$TF_VAR_language" == "java" ] && [ "$TF_VAR_java_framework" == "springboot" ] && [ "$TF_VAR_ui_type" == "html" ] && [ "$TF_VAR_db_node_count" == "2" ]; then
echo - RAC Page : $UI_URL/rac.html
fi
fi
Expand Down
Loading