From 82bd707987c8fa90785c9e879ff2018a8ce5d645 Mon Sep 17 00:00:00 2001 From: Marc Gueury Date: Sat, 27 Jan 2024 12:13:00 +0100 Subject: [PATCH 1/5] v2.0 --- basis/bin/shared_bash_function.sh | 6 +++--- basis/src/terraform/variable.tf | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/basis/bin/shared_bash_function.sh b/basis/bin/shared_bash_function.sh index 2adfcbaa..ecceccf7 100755 --- a/basis/bin/shared_bash_function.sh +++ b/basis/bin/shared_bash_function.sh @@ -352,9 +352,9 @@ livelabs_green_button() { fi # LiveLabs support only E4 Shapes - if grep -q '# export TF_VAR_instance_shape=VM.Standard.E4.Flex' $PROJECT_DIR/env.sh; then - sed -i "s&# export TF_VAR_instance_shape=&export TF_VAR_instance_shape=&" $PROJECT_DIR/env.sh - fi + # if grep -q '# export TF_VAR_instance_shape=VM.Standard.E4.Flex' $PROJECT_DIR/env.sh; then + # sed -i "s&# export TF_VAR_instance_shape=&export TF_VAR_instance_shape=&" $PROJECT_DIR/env.sh + # fi fi } diff --git a/basis/src/terraform/variable.tf b/basis/src/terraform/variable.tf index 3d1cc6df..6a74de7c 100644 --- a/basis/src/terraform/variable.tf +++ b/basis/src/terraform/variable.tf @@ -16,7 +16,7 @@ variable db_user { default="" } variable db_password{ default="" } # Compute Instance size -variable instance_shape { default = "VM.Standard.E4.Flex" } +variable instance_shape { default = "VM.Standard.AMD.Generic" } variable instance_ocpus { default = 1 } variable instance_shape_config_memory_in_gbs { default = 8 } From 4fb925e528a9a9f51428c3ac0c9614780f7e5493 Mon Sep 17 00:00:00 2001 From: Marc Gueury Date: Sat, 27 Jan 2024 12:31:08 +0100 Subject: [PATCH 2/5] v2.0 --- basis/bin/shared_bash_function.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/basis/bin/shared_bash_function.sh b/basis/bin/shared_bash_function.sh index ecceccf7..48fb8c1c 100755 --- a/basis/bin/shared_bash_function.sh +++ b/basis/bin/shared_bash_function.sh @@ -253,11 +253,11 @@ get_user_details() { # Get the user interface URL get_ui_url() { if [ "$TF_VAR_deploy_type" == "compute" ]; then - if [ "$TF_VAR_tls" == "existing_ocid" ]; then + if [ "$TF_VAR_tls" != "" ] && [ "$TF_VAR_tls" == "existing_ocid" ]; then export UI_URL=https://${TF_VAR_dns_name}/${TF_VAR_prefix} else export UI_URL=http://${COMPUTE_IP} - if [ "$TF_VAR_certificate_ocid" != "" ]; then + if [ "$TF_VAR_tls" != "" ] && [ "$TF_VAR_certificate_ocid" != "" ]; then export UI_HTTP=$UI_URL export UI_URL=https://${TF_VAR_dns_name} fi @@ -265,20 +265,20 @@ get_ui_url() { elif [ "$TF_VAR_deploy_type" == "instance_pool" ]; then get_output_from_tfstate INSTANCE_POOL_LB_IP instance_pool_lb_ip export UI_URL=http://${INSTANCE_POOL_LB_IP} - if [ "$TF_VAR_certificate_ocid" != "" ]; then + if [ "$TF_VAR_tls" != "" ] && [ "$TF_VAR_certificate_ocid" != "" ]; then export UI_HTTP=$UI_URL export UI_URL=https://${TF_VAR_dns_name} fi elif [ "$TF_VAR_deploy_type" == "kubernetes" ]; then export TF_VAR_ingress_ip=`kubectl get service -n ingress-nginx ingress-nginx-controller -o jsonpath="{.status.loadBalancer.ingress[0].ip}"` export UI_URL=http://${TF_VAR_ingress_ip}/${TF_VAR_prefix} - if [ "$TF_VAR_certificate_ocid" != "" ]; then + if [ "$TF_VAR_tls" != "" ] && [ "$TF_VAR_certificate_ocid" != "" ]; then export UI_HTTP=$UI_URL export UI_URL=https://${TF_VAR_dns_name}/${TF_VAR_prefix} fi elif [ "$TF_VAR_deploy_type" == "function" ] || [ "$TF_VAR_deploy_type" == "container_instance" ]; then export UI_URL=https://${APIGW_HOSTNAME}/${TF_VAR_prefix} - if [ "$TF_VAR_certificate_ocid" != "" ]; then + if [ "$TF_VAR_tls" != "" ] && [ "$TF_VAR_certificate_ocid" != "" ]; then export UI_HTTP=$UI_URL export UI_URL=https://${TF_VAR_dns_name}/${TF_VAR_prefix} fi From 16837a26dc3f3ebac4dde7cb2b2603548723838a Mon Sep 17 00:00:00 2001 From: Marc Gueury Date: Sat, 27 Jan 2024 13:35:07 +0100 Subject: [PATCH 3/5] v2.0 --- basis/bin/auto_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/bin/auto_env.sh b/basis/bin/auto_env.sh index 9aa93516..e40d2993 100755 --- a/basis/bin/auto_env.sh +++ b/basis/bin/auto_env.sh @@ -147,7 +147,7 @@ else fi # Base DB - version - if [ "$TF_VAR_db_type" == "database" ]; then + if [ "$TF_VAR_db_type" == "database" ] || [ $TF_VAR_group_common != "" ]; then export TF_VAR_db_version=`oci db version list --compartment-id $TF_VAR_compartment_ocid --db-system-shape VM.Standard.E4.Flex | jq -r ".data | last | .version"` fi From eb40766d5b1b4ddcb2c41753d5c5f6e714c531f7 Mon Sep 17 00:00:00 2001 From: Marc Gueury Date: Sat, 27 Jan 2024 13:37:01 +0100 Subject: [PATCH 4/5] v2.0 --- basis/bin/auto_env.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basis/bin/auto_env.sh b/basis/bin/auto_env.sh index e40d2993..5473dfd1 100755 --- a/basis/bin/auto_env.sh +++ b/basis/bin/auto_env.sh @@ -147,7 +147,7 @@ else fi # Base DB - version - if [ "$TF_VAR_db_type" == "database" ] || [ $TF_VAR_group_common != "" ]; then + if [ -f $PROJECT_DIR/src/terraform/dbsystem.tf ]; then export TF_VAR_db_version=`oci db version list --compartment-id $TF_VAR_compartment_ocid --db-system-shape VM.Standard.E4.Flex | jq -r ".data | last | .version"` fi From bda94f1c4775f2128cc90a7541822172c451eba4 Mon Sep 17 00:00:00 2001 From: Marc Gueury Date: Sun, 28 Jan 2024 07:45:59 +0100 Subject: [PATCH 5/5] v2.0 --- option/terraform/oke.j2.tf | 2 ++ 1 file changed, 2 insertions(+) diff --git a/option/terraform/oke.j2.tf b/option/terraform/oke.j2.tf index d76df2af..d60c7a6a 100644 --- a/option/terraform/oke.j2.tf +++ b/option/terraform/oke.j2.tf @@ -434,6 +434,7 @@ resource "oci_containerengine_node_pool" "starter_node_pool" { #---------------------------------------------------------------------------- # ADDONS +/* # Database Operator resource oci_containerengine_addon starter_oke_addon_dboperator { addon_name = "OracleDatabaseOperator" @@ -454,6 +455,7 @@ resource oci_containerengine_addon starter_oke_addon_certmanager { cluster_id = oci_containerengine_cluster.starter_oke.id remove_addon_resources_on_delete = "true" } +*/ #---------------------------------------------------------------------------- # OUTPUTS