Skip to content

Commit

Permalink
Merge pull request #79 from mgueury/main
Browse files Browse the repository at this point in the history
VM.Standard.AMD.Generic
  • Loading branch information
MarcGueury authored Jan 31, 2024
2 parents fb1c964 + bda94f1 commit cffc787
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion basis/bin/auto_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ else
fi

# Base DB - version
if [ "$TF_VAR_db_type" == "database" ]; 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

Expand Down
16 changes: 8 additions & 8 deletions basis/bin/shared_bash_function.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,32 +253,32 @@ 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
fi
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
Expand Down Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion basis/src/terraform/variable.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
2 changes: 2 additions & 0 deletions option/terraform/oke.j2.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down

0 comments on commit cffc787

Please sign in to comment.