From 05e8557ffa31b611def8820700ddf5ac9cf70f8d Mon Sep 17 00:00:00 2001 From: Sankara Narayanan H Date: Thu, 22 Aug 2024 12:44:17 +0530 Subject: [PATCH 1/2] changes for 216 draft --- quickstart.tfvars | 4 +- terraform/LICENSE | 2 +- terraform/essbase.auto.tfvars | 17 +- terraform/essbase.auto.tfvars.ucm | 8 +- terraform/main.tf | 14 +- terraform/modules/bucket/main.tf | 2 +- terraform/modules/bucket/outputs.tf | 2 +- terraform/modules/bucket/variables.tf | 2 +- terraform/modules/database/main.tf | 2 +- terraform/modules/database/outputs.tf | 2 +- terraform/modules/database/variables.tf | 2 +- terraform/modules/essbase-node/main.tf | 5 +- terraform/modules/essbase-node/outputs.tf | 2 +- terraform/modules/essbase-node/variables.tf | 7 +- terraform/modules/essbase/main.tf | 3 +- terraform/modules/essbase/outputs.tf | 2 +- terraform/modules/essbase/variables.tf | 7 +- .../modules/existing-database-oci/main.tf | 2 +- .../modules/existing-database-oci/outputs.tf | 2 +- .../existing-database-oci/variables.tf | 2 +- terraform/modules/existing-database/main.tf | 2 +- .../modules/existing-database/outputs.tf | 2 +- .../modules/existing-database/variables.tf | 2 +- terraform/modules/existing-network/main.tf | 2 +- terraform/modules/existing-network/outputs.tf | 2 +- .../modules/existing-network/variables.tf | 2 +- terraform/modules/idcs/variables.tf | 2 +- terraform/modules/load-balancer/main.tf | 2 +- terraform/modules/load-balancer/outputs.tf | 2 +- terraform/modules/load-balancer/variables.tf | 2 +- .../modules/network/application-subnet.tf | 2 +- .../modules/network/load-balancer-subnet.tf | 2 +- terraform/modules/network/main.tf | 2 +- terraform/modules/network/outputs.tf | 2 +- terraform/modules/network/storage-subnet.tf | 2 +- terraform/modules/network/variables.tf | 2 +- terraform/modules/notification/main.tf | 2 +- terraform/modules/notification/outputs.tf | 2 +- terraform/modules/notification/variables.tf | 2 +- terraform/modules/upgrade/main.tf | 161 +++++++++-- terraform/modules/upgrade/outputs.tf | 12 +- terraform/modules/upgrade/variables.tf | 36 ++- terraform/outputs.tf | 6 +- terraform/provider.tf | 2 +- terraform/schema.yaml | 251 ++++++++++++++---- terraform/terraform.tfvars.template | 2 +- terraform/variables.tf | 14 +- terraform/versions.tf | 5 +- 48 files changed, 482 insertions(+), 134 deletions(-) mode change 100755 => 100644 terraform/essbase.auto.tfvars diff --git a/quickstart.tfvars b/quickstart.tfvars index b1f4ce4..2e23560 100644 --- a/quickstart.tfvars +++ b/quickstart.tfvars @@ -5,8 +5,8 @@ # Run "terraform apply" to apply plan and create stack. essbase_listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaaqyxur5zacfln6epkbm46sdu5whf6zepbm43b63rm44d5hnm2ft5a" -essbase_listing_resource_version = "21.4.0.0.1_2209301529" -essbase_listing_resource_id = "ocid1.image.oc1..aaaaaaaayqzkbfw6byytpgmmp5s2kv64ipqa5gkxyhc23tuqptalqipsjkpq" +essbase_listing_resource_version = "21.6.0.0.1_240807" +essbase_listing_resource_id = "ocid1.image.oc1..aaaaaaaadushb5tgvmc5w2xflif5ofddkqdq6kyy2nh4drorqcitsweyw7zq" tenancy_ocid = "" # REPLACE diff --git a/terraform/LICENSE b/terraform/LICENSE index 18553e3..b5a1ed7 100644 --- a/terraform/LICENSE +++ b/terraform/LICENSE @@ -1,4 +1,4 @@ -Copyright (c) 2019-2023 Oracle and/or its affiliates. +Copyright (c) 2019 - 2023 Oracle and/or its affiliates. The Universal Permissive License (UPL), Version 1.0 diff --git a/terraform/essbase.auto.tfvars b/terraform/essbase.auto.tfvars old mode 100755 new mode 100644 index b7a2f5a..52859b7 --- a/terraform/essbase.auto.tfvars +++ b/terraform/essbase.auto.tfvars @@ -1,10 +1,7 @@ -## Copyright (c) 2019-2023, Oracle and/or its affiliates. -## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. - -# Listing details for the Essbase custom image for Bring Your Own License. - -essbase_listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaaqyxur5zacfln6epkbm46sdu5whf6zepbm43b63rm44d5hnm2ft5a" -essbase_listing_resource_version = "21.4.3.0.1_230407" -essbase_listing_resource_id = "ocid1.image.oc1..aaaaaaaagyz5doydjidcvj564obam5v4nslefpikgubqivyche5qc7kvuufa" - -# Check quickstart.tfvars for example usage / instructions \ No newline at end of file +## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. + +# Listing details for the Essbase custom image for Bring Your Own License. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. +essbase_listing_id = "ocid1.appcataloglisting.oc1..aaaaaaaaqyxur5zacfln6epkbm46sdu5whf6zepbm43b63rm44d5hnm2ft5a" +essbase_listing_resource_version = "21.6.0.0.1_240807" +essbase_listing_resource_id = "ocid1.image.oc1..aaaaaaaadushb5tgvmc5w2xflif5ofddkqdq6kyy2nh4drorqcitsweyw7zq" diff --git a/terraform/essbase.auto.tfvars.ucm b/terraform/essbase.auto.tfvars.ucm index 59bc8f1..cf5c724 100644 --- a/terraform/essbase.auto.tfvars.ucm +++ b/terraform/essbase.auto.tfvars.ucm @@ -1,10 +1,8 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. # Listing details for the Essbase custom image. # The resource_id values here should match the build script and oci_images.tf essbase_listing_id="ocid1.appcataloglisting.oc1..aaaaaaaanstxnoz6uttexhw5jfpqhu4gkwsp2ebmw4i2p7gkq65sr3e7z4gq" -essbase_listing_resource_version="21.4.3.0.1_230407" -essbase_listing_resource_id="ocid1.image.oc1..aaaaaaaavomtkpulouvfcl6rl6w7wrdd2av5awsazvoa3sycs6z3om7sygmq" - -# Check quickstart.tfvars for example usage / instructions \ No newline at end of file +essbase_listing_resource_version="21.6.0.0.1_240807" +essbase_listing_resource_id="ocid1.image.oc1..aaaaaaaaocztyhunwqpdbow2kxpi7xxdnyteq27wey5rcuskwwqb6fendzla" diff --git a/terraform/main.tf b/terraform/main.tf index 6569a8c..8f748a9 100644 --- a/terraform/main.tf +++ b/terraform/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. // Random string to make things unique @@ -24,6 +24,7 @@ locals { instance_count = var.enable_cluster ? var.instance_count : 1 instance_catalog_storage = var.instance_catalog_storage + instance_smv_server = var.instance_smv_server create_load_balancer = var.enable_cluster || var.create_load_balancer @@ -266,7 +267,7 @@ module "essbase" { catalog_bucket = (length(module.catalog-bucket) > 0) ? module.catalog-bucket[0] : null instance_catalog_storage = var.instance_catalog_storage - + instance_smv_server = local.instance_smv_server additional_host_mappings = lookup(local.db_type_host_mappings, local.db_type, []) identity_provider = var.identity_provider @@ -315,16 +316,23 @@ module "upgrade" { sourceInstance_ocid = var.sourceInstance_ocid sourceInstance_extendedMetadata = var.sourceInstance_extendedMetadata + sourceInstance_version = var.upgrade_backup_restore instanceImage_ocid = var.essbase_listing_resource_id instanceSpecifyPrivateIP = var.instanceSpecifyPrivateIP instancePrivateIP = var.instancePrivateIP - instanceBackupRestore = var.upgrade_backup_restore == "Essbase 21c - 21.3 or above" ? false: true + instanceBackupRestore = true instanceUpgrade19c34 = var.upgrade_backup_restore == "Essbase 19c - 19.3.0.3.4, 19.3.0.4.5" ? true: false + instanceUpgrade19c23 = var.upgrade_backup_restore == "Essbase 19c - 19.3.0.2.3" ? true: false + instanceUpgrade19c02 = var.upgrade_backup_restore == "Essbase 19c - 19.3.0.0.2" ? true: false + instanceUpgrade21c01 = var.upgrade_backup_restore == "Essbase 21c - 21.1" ? true: false instanceSchemaPrefix = local.rcu_schema_prefix instanceDBPassword = var.upgrade_db_credential instanceEssbasePassword = var.upgrade_essbase_credential instanceIDCSPassword = var.upgrade_IDCS_credential + instanceUpgradeShape = var.upgrade_target_instance_shape + bucket_name = "essbase_${local.instance_uuid_short}_metadata" + } \ No newline at end of file diff --git a/terraform/modules/bucket/main.tf b/terraform/modules/bucket/main.tf index 6b0a4da..2ab150a 100644 --- a/terraform/modules/bucket/main.tf +++ b/terraform/modules/bucket/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. data "oci_objectstorage_namespace" "user" { diff --git a/terraform/modules/bucket/outputs.tf b/terraform/modules/bucket/outputs.tf index bd0adf1..546f6f3 100644 --- a/terraform/modules/bucket/outputs.tf +++ b/terraform/modules/bucket/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "id" { diff --git a/terraform/modules/bucket/variables.tf b/terraform/modules/bucket/variables.tf index d6a91f0..19e8228 100644 --- a/terraform/modules/bucket/variables.tf +++ b/terraform/modules/bucket/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "compartment_id" { diff --git a/terraform/modules/database/main.tf b/terraform/modules/database/main.tf index 9be057b..79172cf 100644 --- a/terraform/modules/database/main.tf +++ b/terraform/modules/database/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. resource "random_password" "bootstrap_password_1" { diff --git a/terraform/modules/database/outputs.tf b/terraform/modules/database/outputs.tf index e8c020b..73aa6b3 100644 --- a/terraform/modules/database/outputs.tf +++ b/terraform/modules/database/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "database_id" { diff --git a/terraform/modules/database/variables.tf b/terraform/modules/database/variables.tf index a6962ed..ed45fb4 100644 --- a/terraform/modules/database/variables.tf +++ b/terraform/modules/database/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "compartment_id" { diff --git a/terraform/modules/essbase-node/main.tf b/terraform/modules/essbase-node/main.tf index 7b05123..62c6dd9 100644 --- a/terraform/modules/essbase-node/main.tf +++ b/terraform/modules/essbase-node/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. # @@ -27,7 +27,7 @@ runcmd: --boundary-0123456789-- TMPL - is_flex_shape = (var.shape == "VM.Standard.E3.Flex" || var.shape == "VM.Standard.E4.Flex") || (var.shape == "VM.Optimized3.Flex" || var.shape == "VM.Standard3.Flex") + is_flex_shape = (var.shape == "VM.Standard.E3.Flex" || var.shape == "VM.Standard.E4.Flex") || (var.shape == "VM.Optimized3.Flex" || var.shape == "VM.Standard3.Flex") || var.shape == "VM.Standard.E5.Flex" flex_ocpus = var.shape_ocpus == null ? 4 : var.shape_ocpus flex_shape_config = local.is_flex_shape ? [{ "ocpus" : local.flex_ocpus }] : [] } @@ -95,6 +95,7 @@ resource "oci_core_instance" "essbase" { catalog_bucket = jsonencode(var.catalog_bucket) catalog_storage = jsonencode(var.instance_catalog_storage) + smv_server = jsonencode(tostring(var.instance_smv_server)) volumes = jsonencode({ config = { diff --git a/terraform/modules/essbase-node/outputs.tf b/terraform/modules/essbase-node/outputs.tf index 05ab0ff..ecc06be 100644 --- a/terraform/modules/essbase-node/outputs.tf +++ b/terraform/modules/essbase-node/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "node_index" { diff --git a/terraform/modules/essbase-node/variables.tf b/terraform/modules/essbase-node/variables.tf index bf2e528..62a8e88 100644 --- a/terraform/modules/essbase-node/variables.tf +++ b/terraform/modules/essbase-node/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "image_id" { @@ -218,6 +218,11 @@ variable "instance_catalog_storage" { default = "" } +variable "instance_smv_server" { + type = bool + default = false +} + variable "metadata_bucket" { type = object({ id = string diff --git a/terraform/modules/essbase/main.tf b/terraform/modules/essbase/main.tf index f7a8bd6..ae3b093 100644 --- a/terraform/modules/essbase/main.tf +++ b/terraform/modules/essbase/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. locals { @@ -141,6 +141,7 @@ module "essbase-node" { catalog_bucket = var.catalog_bucket instance_catalog_storage = var.instance_catalog_storage + instance_smv_server = var.instance_smv_server db_type = var.db_type diff --git a/terraform/modules/essbase/outputs.tf b/terraform/modules/essbase/outputs.tf index 74b8e97..6aa3ba9 100644 --- a/terraform/modules/essbase/outputs.tf +++ b/terraform/modules/essbase/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "nodes" { diff --git a/terraform/modules/essbase/variables.tf b/terraform/modules/essbase/variables.tf index 65a2696..9d338c6 100644 --- a/terraform/modules/essbase/variables.tf +++ b/terraform/modules/essbase/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "listing_id" { @@ -86,6 +86,11 @@ variable "instance_catalog_storage" { default = "" } +variable "instance_smv_server" { + type = bool + default = false +} + variable "hostname_label_prefix" { description = "The hostname for the essbase node" type = string diff --git a/terraform/modules/existing-database-oci/main.tf b/terraform/modules/existing-database-oci/main.tf index aa7b0fa..392ea4a 100644 --- a/terraform/modules/existing-database-oci/main.tf +++ b/terraform/modules/existing-database-oci/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. data "oci_database_database" "database" { diff --git a/terraform/modules/existing-database-oci/outputs.tf b/terraform/modules/existing-database-oci/outputs.tf index d37d56a..a32a6d7 100644 --- a/terraform/modules/existing-database-oci/outputs.tf +++ b/terraform/modules/existing-database-oci/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "database_id" { diff --git a/terraform/modules/existing-database-oci/variables.tf b/terraform/modules/existing-database-oci/variables.tf index b787b9f..5d60d0c 100644 --- a/terraform/modules/existing-database-oci/variables.tf +++ b/terraform/modules/existing-database-oci/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "database_id" { diff --git a/terraform/modules/existing-database/main.tf b/terraform/modules/existing-database/main.tf index 5e8afcb..0ae0df8 100644 --- a/terraform/modules/existing-database/main.tf +++ b/terraform/modules/existing-database/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. data "oci_database_autonomous_database" "autonomous_database" { diff --git a/terraform/modules/existing-database/outputs.tf b/terraform/modules/existing-database/outputs.tf index 6407383..f62e8b4 100644 --- a/terraform/modules/existing-database/outputs.tf +++ b/terraform/modules/existing-database/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "database_id" { diff --git a/terraform/modules/existing-database/variables.tf b/terraform/modules/existing-database/variables.tf index e8be709..6188410 100644 --- a/terraform/modules/existing-database/variables.tf +++ b/terraform/modules/existing-database/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "database_id" { diff --git a/terraform/modules/existing-network/main.tf b/terraform/modules/existing-network/main.tf index 7c284b3..e5eafa5 100644 --- a/terraform/modules/existing-network/main.tf +++ b/terraform/modules/existing-network/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. data "oci_core_vcn" "vcn" { diff --git a/terraform/modules/existing-network/outputs.tf b/terraform/modules/existing-network/outputs.tf index 129928f..58ccffb 100644 --- a/terraform/modules/existing-network/outputs.tf +++ b/terraform/modules/existing-network/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "vcn_id" { diff --git a/terraform/modules/existing-network/variables.tf b/terraform/modules/existing-network/variables.tf index 7dfb9f3..06022de 100644 --- a/terraform/modules/existing-network/variables.tf +++ b/terraform/modules/existing-network/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "existing_vcn_id" { diff --git a/terraform/modules/idcs/variables.tf b/terraform/modules/idcs/variables.tf index 03442a4..27b6982 100644 --- a/terraform/modules/idcs/variables.tf +++ b/terraform/modules/idcs/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "idcs_tenant" { diff --git a/terraform/modules/load-balancer/main.tf b/terraform/modules/load-balancer/main.tf index 1c47dbb..a19b7aa 100644 --- a/terraform/modules/load-balancer/main.tf +++ b/terraform/modules/load-balancer/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. resource "oci_load_balancer" "loadbalancer" { diff --git a/terraform/modules/load-balancer/outputs.tf b/terraform/modules/load-balancer/outputs.tf index 6a53672..264b28d 100644 --- a/terraform/modules/load-balancer/outputs.tf +++ b/terraform/modules/load-balancer/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. locals { diff --git a/terraform/modules/load-balancer/variables.tf b/terraform/modules/load-balancer/variables.tf index bdd04d8..f67a363 100644 --- a/terraform/modules/load-balancer/variables.tf +++ b/terraform/modules/load-balancer/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. # OCI Service diff --git a/terraform/modules/network/application-subnet.tf b/terraform/modules/network/application-subnet.tf index 2545f7d..f22b005 100644 --- a/terraform/modules/network/application-subnet.tf +++ b/terraform/modules/network/application-subnet.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. resource "oci_core_security_list" "application" { diff --git a/terraform/modules/network/load-balancer-subnet.tf b/terraform/modules/network/load-balancer-subnet.tf index 55512d0..210b048 100644 --- a/terraform/modules/network/load-balancer-subnet.tf +++ b/terraform/modules/network/load-balancer-subnet.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. locals { diff --git a/terraform/modules/network/main.tf b/terraform/modules/network/main.tf index 3632352..5dc4655 100644 --- a/terraform/modules/network/main.tf +++ b/terraform/modules/network/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. locals { diff --git a/terraform/modules/network/outputs.tf b/terraform/modules/network/outputs.tf index c33b4eb..cc3d1e9 100644 --- a/terraform/modules/network/outputs.tf +++ b/terraform/modules/network/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "vcn_id" { diff --git a/terraform/modules/network/storage-subnet.tf b/terraform/modules/network/storage-subnet.tf index 0d97673..e9433c9 100644 --- a/terraform/modules/network/storage-subnet.tf +++ b/terraform/modules/network/storage-subnet.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019, 2020, Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. resource "oci_core_security_list" "storage" { diff --git a/terraform/modules/network/variables.tf b/terraform/modules/network/variables.tf index ca46239..5806f8c 100644 --- a/terraform/modules/network/variables.tf +++ b/terraform/modules/network/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. # OCI Service diff --git a/terraform/modules/notification/main.tf b/terraform/modules/notification/main.tf index 2824fa5..4058210 100644 --- a/terraform/modules/notification/main.tf +++ b/terraform/modules/notification/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. data "oci_ons_notification_topic" "essbase_topic" { diff --git a/terraform/modules/notification/outputs.tf b/terraform/modules/notification/outputs.tf index 9b121c2..0301b47 100644 --- a/terraform/modules/notification/outputs.tf +++ b/terraform/modules/notification/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "topic_id" { diff --git a/terraform/modules/notification/variables.tf b/terraform/modules/notification/variables.tf index 7b14c3c..14e458d 100644 --- a/terraform/modules/notification/variables.tf +++ b/terraform/modules/notification/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "topic_id" { diff --git a/terraform/modules/upgrade/main.tf b/terraform/modules/upgrade/main.tf index 42bf5f0..40b5593 100644 --- a/terraform/modules/upgrade/main.tf +++ b/terraform/modules/upgrade/main.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. locals { @@ -34,7 +34,10 @@ locals { stack_resource_id = data.oci_core_instance.source_instance.metadata.stack_display_name stack_resource_id_escaped = replace(local.stack_resource_id, "-", "_") stack_id = data.oci_core_instance.source_instance.metadata.stack_id - + source_instance_ocpus = join("", data.oci_core_instance.source_instance.shape_config[*].ocpus) + upgrade_instance_shape = (var.instanceUpgradeShape == "Upgrade to recommended Flex Shape") ? "VM.Standard.E5.Flex" : data.oci_core_instance.source_instance.shape + #upgrade_instance_ocpus = (var.instanceUpgradeShape == "Upgrade to recommended Flex Shape") ? 4 : local.source_instance_ocpus + upgrade_instance_ocpus = local.source_instance_ocpus } data "oci_core_instance" "source_instance" { @@ -61,8 +64,8 @@ data "oci_core_volume_attachments" "test_volume_attachments" { data "oci_objectstorage_bucket" "source_bucket" { #Required - name = local.target_extendedMetadata.metadata_bucket.name - namespace = local.target_extendedMetadata.metadata_bucket.namespace + name = var.instanceUpgrade19c02 ? oci_objectstorage_bucket.metadata_bucket19c02[0].name :local.target_extendedMetadata.metadata_bucket.name + namespace = var.instanceUpgrade19c02 ? oci_objectstorage_bucket.metadata_bucket19c02[0].namespace :local.target_extendedMetadata.metadata_bucket.namespace } resource "oci_objectstorage_object" "target_volumeMetadata" { @@ -121,9 +124,10 @@ data "oci_core_vnic" "source_vnic" { locals { target_testIP = data.oci_core_instance.source_instance.private_ip target_privateIP = var.instanceSpecifyPrivateIP ? var.instancePrivateIP : null - target_metadata = data.oci_core_instance.source_instance.metadata + target_metadata = ( var.instanceUpgrade19c23 || var.instanceUpgrade19c02 ) ? local.target_metadata19c23: data.oci_core_instance.source_instance.metadata - target_extendedMetadata = jsondecode(var.sourceInstance_extendedMetadata) + string_target_extendedMetadata = var.instanceUpgrade19c02 ? jsonencode(local.target_extendedMetadata19c02): jsonencode(local.build_extmetadata) + target_extendedMetadata = jsondecode(local.string_target_extendedMetadata) source_volumeAttachments = data.oci_core_volume_attachments.test_volume_attachments.volume_attachments source_VNIChostname = tostring(data.oci_core_vnic.source_vnic.hostname_label) @@ -132,6 +136,40 @@ locals { target_displayname = format("%s_1", local.stack_resource_id) target_hostname = format("%s_1", local.source_VNIChostname) +#Create user_data including cloud-init for 19c23 Upgrade Instance + cloud_init19c23 = < v if ! (k== "user_data") }: null + new_user_data = ( var.instanceUpgrade19c23 || var.instanceUpgrade19c02 ) ? tomap({user_data = local.cloud_init19c23_encoded}): null + target_metadata19c23 = ( var.instanceUpgrade19c23 || var.instanceUpgrade19c02 ) ? merge(local.filtered_metadata, local.new_user_data) : null + + #19c02 + + build_extmetadata = jsondecode(var.sourceInstance_extendedMetadata) + bucket_info_19c02 = var.instanceUpgrade19c02 ? { + id="null" + name=oci_objectstorage_bucket.metadata_bucket19c02[0].name + namespace=data.oci_objectstorage_namespace.objectstorage_ns.namespace + }: null + new_metadata_bucket = var.instanceUpgrade19c02 ? tomap({metadata_bucket = local.bucket_info_19c02}): null + target_extendedMetadata19c02 = var.instanceUpgrade19c02 ? merge(local.build_extmetadata, local.new_metadata_bucket) : null } resource "oci_core_volume" "targetVolume" { @@ -139,13 +177,12 @@ resource "oci_core_volume" "targetVolume" { compartment_id = var.compartment_ocid - display_name = var.instanceUpgrade19c34 ? format( + display_name = (var.instanceUpgrade19c34 || var.instanceUpgrade19c23 || var.instanceUpgrade19c02 || var.instanceUpgrade21c01) ? format( "%s_1-%s-volume", local.stack_resource_id_escaped, - strrev(split("-",strrev(tostring(local.source_volumeAttachments[count.index].display_name)))[2]) + strrev(split("-",strrev(tostring(local.source_volumeAttachments[count.index].display_name)))[(var.instanceUpgrade19c23 || var.instanceUpgrade19c02)?3:2]) ):format( - "%s_1-%s", local.stack_resource_id_escaped, tostring(local.source_volumeAttachments[count.index].display_name)) - - #split("-", oci_core_volume.targetVolume[count.index].display_name) + "%s_1-%s", local.stack_resource_id_escaped, tostring(local.source_volumeAttachments[count.index].display_name)) + # Since extended metadata is not currently available from Terraform (bug) # Volume type & ID is determined from source volume attachment @@ -165,20 +202,23 @@ resource "oci_core_volume_attachment" "targetVolumeAttachment" { display_name = format( "%s-volume", strrev(split("-", strrev(tostring(oci_core_volume.targetVolume[count.index].display_name)))[1])) } - resource "oci_core_instance" "target_instance" { availability_domain = data.oci_core_instance.source_instance.availability_domain compartment_id = "${var.compartment_ocid}" display_name = local.target_displayname - shape = data.oci_core_instance.source_instance.shape - - dynamic "shape_config" { - for_each = data.oci_core_instance.source_instance.shape_config - content { - ocpus = shape_config.value.ocpus + #shape = data.oci_core_instance.source_instance.shape + shape = local.upgrade_instance_shape + #dynamic "shape_config" { + #for_each = data.oci_core_instance.source_instance.shape_config + #for_each = data.oci_core_instance.target_instance.shape_config + #content { + # ocpus = shape_config.value.ocpus + #} + shape_config { + ocpus = local.upgrade_instance_ocpus } - } + create_vnic_details { subnet_id = data.oci_core_vnic.source_vnic.subnet_id @@ -205,6 +245,7 @@ resource "oci_core_instance" "target_instance" { source_extended = jsonencode(local.target_extendedMetadata) source_instance_ocid = var.sourceInstance_ocid source_hostname = local.source_VNIChostname + source_version = var.sourceInstance_version source_backup_restore = var.instanceBackupRestore target_schema_prefix = var.instanceBackupRestore? var.instanceSchemaPrefix: null @@ -220,13 +261,89 @@ resource "oci_core_instance" "target_instance" { } resource "oci_objectstorage_object" "essbase_cluster_metadata" { - bucket = data.oci_objectstorage_bucket.source_bucket.name - namespace = data.oci_objectstorage_bucket.source_bucket.namespace - count = var.instanceUpgrade19c34? 1:0 + bucket = var.instanceUpgrade19c02 ? oci_objectstorage_bucket.metadata_bucket19c02[0].name: data.oci_objectstorage_bucket.source_bucket.name + namespace = var.instanceUpgrade19c02 ? oci_objectstorage_bucket.metadata_bucket19c02[0].namespace: data.oci_objectstorage_bucket.source_bucket.namespace + count = (var.instanceUpgrade19c34 || var.instanceUpgrade19c23 || var.instanceUpgrade19c02)? 1:0 object = "cluster-info.dat" storage_tier = "InfrequentAccess" content = "{}" } +#Create for 19c23 upgrade as 19c23 had only config and data volumes +resource "oci_core_volume" "tempVolume19c23" { + count=(var.instanceUpgrade19c23 || var.instanceUpgrade19c02)?1:0 + + compartment_id = var.compartment_ocid + + display_name = format( + "%s_1-%s-volume", local.stack_resource_id_escaped, "temp" + ) + + availability_domain = local.source_volumeAttachments[0].availability_domain + size_in_gbs = 64 +} + +#Create for 19c23 upgrade as 19c23 had only config and data volumes +resource "oci_core_volume_attachment" "tempVolumeAttachment19c23" { + count=(var.instanceUpgrade19c23 || var.instanceUpgrade19c02)?1:0 + + attachment_type = "iscsi" + instance_id = oci_core_instance.target_instance.id + volume_id = oci_core_volume.tempVolume19c23[count.index].id + display_name = format( "%s-volume", "temp") +} + +#Create for 19c23 upgrade as 19c23 had only config and data volumes +resource "oci_objectstorage_object" "target_tempVolume19c23Upgrade" { + count=(var.instanceUpgrade19c23 || var.instanceUpgrade19c02)?1:0 + + bucket = data.oci_objectstorage_bucket.source_bucket.name + namespace = data.oci_objectstorage_bucket.source_bucket.namespace + object = format("%s/%s.dat", + oci_core_instance.target_instance.id, + split("-", oci_core_volume.tempVolume19c23[count.index].display_name)[1] + ) + storage_tier = "InfrequentAccess" + content = jsonencode({ + "volumeid" = oci_core_volume_attachment.tempVolumeAttachment19c23[count.index].volume_id + "mountpoint" = format("/u01/%s", + split("-", oci_core_volume.tempVolume19c23[count.index].display_name)[1] + ) + }) +} + +resource "oci_objectstorage_object" "target_tempVolume19c23Metadata" { + count=(var.instanceUpgrade19c23 || var.instanceUpgrade19c02)?1:0 + + bucket = data.oci_objectstorage_bucket.source_bucket.name + namespace = data.oci_objectstorage_bucket.source_bucket.namespace + object = format("%s/%s.dat", + oci_core_instance.target_instance.id, + oci_core_volume_attachment.tempVolumeAttachment19c23[count.index].volume_id + ) + storage_tier = "InfrequentAccess" + content = jsonencode({ + "iqn" = oci_core_volume_attachment.tempVolumeAttachment19c23[count.index].iqn, + "ipv4" = oci_core_volume_attachment.tempVolumeAttachment19c23[count.index].ipv4, + "port" = oci_core_volume_attachment.tempVolumeAttachment19c23[count.index].port, + "type" = format("%s", + split("-", oci_core_volume.tempVolume19c23[count.index].display_name)[1] + ) + + "volumeid" = oci_core_volume_attachment.tempVolumeAttachment19c23[count.index].volume_id + }) +} + +data "oci_objectstorage_namespace" "objectstorage_ns" { + +} + +resource "oci_objectstorage_bucket" "metadata_bucket19c02" { + count = var.instanceUpgrade19c02?1:0 + compartment_id = var.compartment_ocid + namespace = data.oci_objectstorage_namespace.objectstorage_ns.namespace + name = var.bucket_name + access_type = "NoPublicAccess" +} diff --git a/terraform/modules/upgrade/outputs.tf b/terraform/modules/upgrade/outputs.tf index f6bb03e..0ced49a 100644 --- a/terraform/modules/upgrade/outputs.tf +++ b/terraform/modules/upgrade/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. @@ -23,7 +23,7 @@ output "domain_name" { } output "backup_bucket_name" { - value = var.instanceUpgrade19c34 ? local.target_extendedMetadata.database.backup_bucket.name: local.target_extendedMetadata.backup_bucket.name + value = (var.instanceUpgrade19c34 || var.instanceUpgrade19c23 || var.instanceUpgrade21c01) ? try(local.target_extendedMetadata.database.backup_bucket.name,""): (var.instanceUpgrade19c02? "": local.target_extendedMetadata.backup_bucket.name) } output "metadata_bucket_name" { @@ -42,4 +42,12 @@ output "rcu_schema_prefix"{ value = var.instanceSchemaPrefix } +output "bucket_namespace" { + value = var.instanceUpgrade19c02? data.oci_objectstorage_namespace.objectstorage_ns.namespace: null +} + +output "bucket_name" { + value = var.instanceUpgrade19c02? oci_objectstorage_bucket.metadata_bucket19c02[0].name: null +} + diff --git a/terraform/modules/upgrade/variables.tf b/terraform/modules/upgrade/variables.tf index 3eb8bab..340d308 100644 --- a/terraform/modules/upgrade/variables.tf +++ b/terraform/modules/upgrade/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "listing_id" { @@ -20,6 +20,11 @@ variable "sourceInstance_ocid" { default = "" } +variable "sourceInstance_version" { + type = string + default = "" +} + variable "sourceInstance_extendedMetadata"{ type = string default = "" @@ -50,6 +55,20 @@ variable "instanceUpgrade19c34"{ default = false } +variable "instanceUpgrade19c23"{ + type = bool + default = false +} + +variable "instanceUpgrade19c02"{ + type = bool + default = false +} + +variable "instanceUpgrade21c01"{ + type = bool + default = false +} variable "instanceSchemaPrefix" { description = "Schema prefix" @@ -92,4 +111,19 @@ variable "stack_resource_id" { variable "stack_id" { type = string default = "" +} + +variable "bucket_name" { + description = "Name of the bucket to create" + type = string +} + +variable "source_instance_ocpus" { + type = number + default = 4 +} + +variable "instanceUpgradeShape" { + type = string + default = "" } \ No newline at end of file diff --git a/terraform/outputs.tf b/terraform/outputs.tf index 999831e..159d7e8 100644 --- a/terraform/outputs.tf +++ b/terraform/outputs.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. output "stack_version" { @@ -77,6 +77,10 @@ output "metadata_bucket_name" { value = var.is_upgrade? module.upgrade[0].metadata_bucket_name: module.metadata-bucket[0].name } +output "instance_smv_server" { + value = var.is_upgrade? null: var.instance_smv_server +} + output "z_messages" { value = "\n\n*********************\nOracle Essbase stack has been provisioned and is continuing configuration in the background.\nIt may take up to 20 minutes for configuration to complete.\nLog details can be found on the target nodes at /var/log/essbase-init.log.\n*********************\n" } diff --git a/terraform/provider.tf b/terraform/provider.tf index f6309c0..e4e9956 100644 --- a/terraform/provider.tf +++ b/terraform/provider.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. variable "tenancy_ocid" { diff --git a/terraform/schema.yaml b/terraform/schema.yaml index b3f78de..a231d8f 100644 --- a/terraform/schema.yaml +++ b/terraform/schema.yaml @@ -29,11 +29,9 @@ groupings: - ${upgrade_backup_restore} - sourceInstance_ocid - sourceInstance_extendedMetadata + - upgrade_target_instance_shape - instanceSpecifyPrivateIP - instancePrivateIP - - upgrade_db_credential - - upgrade_IDCS_credential - - upgrade_essbase_credential - title: "Essbase Instance" variables: @@ -50,9 +48,9 @@ groupings: - ${temp_volume_size} - ${ssh_authorized_keys} - ${essbase_admin_username} - - ${essbase_admin_password_id} - ${instance_timezone} - ${instance_catalog_storage} + - ${instance_smv_server} - ${enable_embedded_proxy} - ${region} - ${localAD} @@ -67,9 +65,24 @@ groupings: - ${identity_provider} - ${idcs_tenant} - ${idcs_client_id} - - ${idcs_client_secret_id} - ${idcs_external_admin_username} +- title: "Secret Selection" + variables: + - ${multiple_compartment_secrets} + - ${secret_compartment_ocid_essbase_admin_password_id} + - ${essbase_admin_password_id} + - ${secret_compartment_ocid_db_admin_password_id} + - ${db_admin_password_id} + - ${secret_compartment_ocid_idcs_client_secret_id} + - ${idcs_client_secret_id} + - ${secret_compartment_ocid_upgrade_essbase_credential} + - upgrade_essbase_credential + - ${secret_compartment_ocid_upgrade_db_credential} + - upgrade_db_credential + - ${secret_compartment_ocid_upgrade_IDCS_credential} + - upgrade_IDCS_credential + - title: "Network Configuration" variables: - ${create_public_essbase_instance} @@ -93,13 +106,13 @@ groupings: - ${existing_db_type} - ${existing_db_compartment_id} - ${existing_db_id} - - ${db_admin_password_id} - ${db_license_model} - ${existing_oci_db_system_id} - ${existing_oci_db_system_dbhome_id} - ${existing_oci_db_system_database_id} - ${existing_oci_db_system_database_pdb_name} - ${oci_db_admin_username} + - ${secret_compartment_ocid_oci_db_admin_password_id} - ${oci_db_admin_password_id} - ${rcu_schema_prefix} - ${show_db_advanced_options} @@ -142,6 +155,12 @@ variables: type: oci:identity:compartment:id required: true + multiple_compartment_secrets: + title: Show Advanced Secret Selection Options + description: Enable Secrets to be selected from different compartments + type: boolean + required: true + user_ocid: title: User ID description: The Oracle Cloud Identifier (OCID) for the user @@ -181,47 +200,105 @@ variables: - ${is_upgrade} is_upgrade: - title: Image Update + title: Upgrade Stack description: Create a new node based on existing deployment, using new image. type: boolean default: false + upgrade_target_instance_shape: + title: Target Instance Shape + description: "Choose to keep the shape of the target upgraded instance same as the Source Instance's shape, or upgrade it to the recommended Flex shape - VM.Standard.E5.Flex. Note - If the existing Source Instance's shape does not exist on OCI, the deployment will fail." + type: enum + enum: + - "Keep the shape same as the Source Instance" + - "Upgrade to recommended Flex Shape" + default: "Keep the shape same as the Source Instance" + visible: ${is_upgrade} + upgrade_backup_restore: - title: Source Instance Essbase Version - description: Version of Essbase on Source Instance. + title: Source Instance Essbase Stack Version + description: Version of Essbase on OCI Stack used to deploy Source Instance. type: enum enum: - - "Essbase 21c - 21.3 or above" + - "Essbase 21c - 21.2 or above" + - "Essbase 21c - 21.1" - "Essbase 19c - 19.3.0.5.6, 19.3.0.6.0" - "Essbase 19c - 19.3.0.3.4, 19.3.0.4.5" - default: "Essbase 21c - 21.3 or above" + - "Essbase 19c - 19.3.0.2.3" + - "Essbase 19c - 19.3.0.0.2" + default: "Essbase 21c - 21.2 or above" required: true visible: ${is_upgrade} + secret_compartment_ocid_upgrade_db_credential: + title: Compartment for Database Admin Password + description: Compartment for selecting secret for Database Admin Password during upgrade + type: oci:identity:compartment:id + default: ${compartment_ocid} + required: + - ${upgrade_backup_restore} + - "Essbase 19c - 19.3.0.5.6 or above" + visible: + and: + - ${multiple_compartment_secrets} + - ${is_upgrade} + upgrade_db_credential: - title: Database Admin User Password - description: OCID of Vault Secret for Database Admin User password. - type: string + title: Database Admin Password + description: Select the Vault Secret for Database Admin password. In case of upgrading from 19.3.0.0.2, this field is mandatory. + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_upgrade_db_credential} default: "" visible: ${is_upgrade} required: - ${upgrade_backup_restore} - "Essbase 19c - 19.3.0.5.6 or above" + secret_compartment_ocid_upgrade_essbase_credential: + title: Compartment for Essbase System Admin Password + description: Compartment for selecting secret for Essbase System Admin Password during upgrade + type: oci:identity:compartment:id + default: ${compartment_ocid} + required: + - ${upgrade_backup_restore} + - "Essbase 19c - 19.3.0.5.6 or above" + visible: + and: + - ${multiple_compartment_secrets} + - ${is_upgrade} + upgrade_essbase_credential: - title: Essbase System Admin User Password - description: OCID of Vault Secret for Essbase Admin User password. - type: string + title: Essbase System Admin Password + description: Select the secret for Essbase System Admin password. In case of upgrading from 19.3.0.0.2, this field is mandatory. + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_upgrade_essbase_credential} default: "" visible: ${is_upgrade} required: - ${upgrade_backup_restore} - "Essbase 19c - 19.3.0.5.6 or above" + secret_compartment_ocid_upgrade_IDCS_credential: + title: Compartment for IDCS/IAM Application Client Secret + description: Compartment for selecting secret for IDCS/IAM Application Client Secret during upgrade + type: oci:identity:compartment:id + default: ${compartment_ocid} + required: + - ${upgrade_backup_restore} + - "Essbase 19c - 19.3.0.5.6 or above" + visible: + and: + - ${multiple_compartment_secrets} + - ${is_upgrade} + upgrade_IDCS_credential: - title: IDCS Application Client Secret - description: Provide the OCID for the secret that contains the IDCS application client secret to be overriden with in case it was changed / deleted - type: string + title: IDCS/IAM Application Client Secret + description: Select the secret that contains the IDCS/IAM application client secret to be overriden with in case it was changed / deleted. In case of upgrading from 19.3.0.0.2, this field is mandatory. + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_upgrade_IDCS_credential} default: "" visible: ${is_upgrade} #pattern: "^ocid1\\.vaultsecret\\.[a-zA-Z0-9\\.\\-\\_]+$" @@ -448,7 +525,10 @@ variables: - eq: - ${instance_shape} - "VM.Standard.E4.Flex" - + - eq: + - ${instance_shape} + - "VM.Standard.E5.Flex" + enable_cluster: title: Enable Cluster Topology description: Create a cluster of multiple Essbase compute instances. @@ -937,7 +1017,17 @@ variables: required: false visible: not: - - ${is_upgrade} + - ${is_upgrade} + + instance_smv_server: + title: "Deploy Smart View Server" + description: "Select to configure Oracle Smart View for Office (Mac and Browser) for Essbase." + type: boolean + default: false + required: false + visible: + not: + - ${is_upgrade} ssh_authorized_keys: title: SSH Public Key @@ -993,10 +1083,24 @@ variables: not: - ${is_upgrade} + secret_compartment_ocid_essbase_admin_password_id: + title: Compartment for Essbase System Admin Password + description: Compartment for selecting secret for Essbase System Admin Password + type: oci:identity:compartment:id + default: ${compartment_ocid} + required: true + visible: + and: + - ${multiple_compartment_secrets} + - not: + - ${is_upgrade} + essbase_admin_password_id: - title: Essbase System Admin User Password - description: "The OCID for the secret that contains the password for the Essbase system administrator. The password must start with a letter, is between 8 and 30 characters long, contains at least one number, and, optionally, any number of the special characters ($ # _). For example, Ach1z0#d." - type: string + title: Essbase System Admin Password + description: "Select the secret that contains the password for the Essbase system administrator. The password must start with a letter, is between 8 and 30 characters long, contains at least one number, and, optionally, any number of the special characters ($ # _). For example, Ach1z0#d." + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_essbase_admin_password_id} pattern: "^ocid1\\.vaultsecret\\.[a-zA-Z0-9\\.\\-\\_]+$" required: true visible: @@ -1158,9 +1262,7 @@ variables: visible: and: - not: - - or: - - ${use_existing_db} - - ${use_existing_vcn} + - ${use_existing_db} - not: - ${is_upgrade} @@ -1237,11 +1339,32 @@ variables: dependsOn: compartmentId: ${existing_db_compartment_id} + secret_compartment_ocid_db_admin_password_id: + title: Compartment for Database Admin Password + description: Compartment for selecting secret for Database Admin Password + type: oci:identity:compartment:id + default: ${compartment_ocid} + required: true + visible: + and: + - ${multiple_compartment_secrets} + - or: + - eq: + - ${existing_db_type} + - "Autonomous Database" + - not: + - ${use_existing_db} + - not: + - ${is_upgrade} + db_admin_password_id: - title: Database Admin User Password - description: "The OCID for the secret that contains the database administrator password. The password must start with a letter, is between 12 and 30 characters long, contains at least one number, and at least one of the special characters ($ # _). For example, BEstr0ng_#12." - type: string + title: Database Admin Password + description: "Select the secret that contains the database administrator password. The password must start with a letter, is between 12 and 30 characters long, contains at least one number, and at least one of the special characters ($ # _). For example, BEstr0ng_#12." + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_db_admin_password_id} pattern: "^ocid1\\.vaultsecret\\.[a-zA-Z0-9\\.\\-\\_]+$" + default: ${compartment_ocid} visible: and: - or: @@ -1352,10 +1475,26 @@ variables: - ${use_existing_db} required: true + secret_compartment_ocid_oci_db_admin_password_id: + title: Vault Compartment for OCI DB Admin Password ID + description: Vault Compartment to select secret from for OCI DB Admin Password + type: oci:identity:compartment:id + default: ${compartment_ocid} + visible: + and: + - eq: + - ${existing_db_type} + - "Database System" + - ${use_existing_db} + - ${multiple_compartment_secrets} + required: true + oci_db_admin_password_id: title: Database Admin User Password - description: "The OCID for the secret that contains the database administrator password. The password must start with a letter, is between 12 and 30 characters long, contains at least one number, and at least one of the special characters ($ # _). For example, BEstr0ng_#12." - type: string + description: "Select the secret that contains the database administrator password. The password must start with a letter, is between 12 and 30 characters long, contains at least one number, and at least one of the special characters ($ # _). For example, BEstr0ng_#12." + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_oci_db_admin_password_id} pattern: "^ocid1\\.vaultsecret\\.[a-zA-Z0-9\\.\\-\\_]+$" visible: and: @@ -1367,7 +1506,7 @@ variables: identity_provider: title: Identity Provider - description: Choose embedded LDAP or integration with Identity Cloud Service (IDCS). The use of embedded LDAP is not recommended for production workloads. + description: Choose embedded for Embedded LDAP or idcs for IDCS/IAM . The use of embedded LDAP is not recommended for production workloads. type: enum enum: - idcs @@ -1379,8 +1518,8 @@ variables: - ${is_upgrade} idcs_tenant: - title: IDCS Instance GUID - description: The ID of your Identity Cloud Service instance, which typically has the format idcs-, and is part of the host name that you use to access Identity Cloud Service. + title: IDCS/IAM Instance GUID + description: The ID of your IDCS/IAM instance, which typically has the format idcs-, and is part of the host name that you use to access IDCS/IAM. type: string visible: and: @@ -1393,8 +1532,8 @@ variables: idcs_client_id: - title: IDCS Application Client ID - description: Provide the IDCS application client ID + title: IDCS/IAM Application Client ID + description: Provide the IDCS/IAM application client ID type: string visible: and: @@ -1405,10 +1544,27 @@ variables: - ${is_upgrade} required: true + secret_compartment_ocid_idcs_client_secret_id: + title: Compartment for IDCS/IAM Application Client Secret + description: Compartment for selecting secret for IDCS/IAM Application Client Secret + type: oci:identity:compartment:id + default: ${compartment_ocid} + visible: + and: + - ${multiple_compartment_secrets} + - eq: + - ${identity_provider} + - idcs + - not: + - ${is_upgrade} + required: true + idcs_client_secret_id: - title: IDCS Application Client Secret - description: Provide the OCID for the secret that contains the IDCS application client secret. - type: string + title: IDCS/IAM Application Client Secret + description: Select the secret that contains the IDCS/IAM application client secret + type: oci:kms:secret:id + dependsOn: + compartmentId: ${secret_compartment_ocid_idcs_client_secret_id} pattern: "^ocid1\\.vaultsecret\\.[a-zA-Z0-9\\.\\-\\_]+$" visible: and: @@ -1420,8 +1576,8 @@ variables: required: true idcs_external_admin_username: - title: IDCS Essbase Admin User - description: Provide a user id to be registered as an Essbase administrator. This user must exist in the provided Identity Cloud Service instance. + title: IDCS/IAM Essbase Admin User + description: Provide a user id to be registered as an Essbase administrator. This user must exist in the provided IDCS/IAM instance. type: string visible: and: @@ -1445,11 +1601,10 @@ variables: # Upgrade Settings sourceInstance_ocid: -# type: string type: oci:core:instance:id required: true title: Source Instance - description: Select source Essbase 19c/21c Compute Instance to pick configuration from. 19.3.0.0.2 and 19.3.0.2.3 are not supported currently for upgrade. + description: Select source Essbase 19c/21c Compute Instance to pick configuration from. dependsOn: compartmentId: ${compartment_ocid} visible: ${is_upgrade} @@ -1459,7 +1614,7 @@ variables: required: true title: Source Instance Metadata visible: ${is_upgrade} - description: Enter extended metadata collected in JSON format from source instance. In case of instances which are running Essbase version prior to 19.3.0.5.6, please run the upgrade-metadata-19c.sh to prepare for upgrade. Post running script, use the command - oci compute instance get --instance-id $(oci-metadata -j | jq -r '.instance.id') --auth instance_principal | jq '.data."extended-metadata"'. Example output - { "backup_bucket" ... } + description: Enter extended metadata collected in JSON format from source instance. In case of instances which are running Essbase version prior to 19.3.0.5.6, please run the upgrade-metadata-19cxx.sh to prepare for upgrade. Post running script, use the command - oci compute instance get --instance-id $(oci-metadata -j | jq -r '.instance.id') --auth instance_principal | jq '.data."extended-metadata"'. Example output - { "backup_bucket" ... } instanceSpecifyPrivateIP: @@ -1525,10 +1680,10 @@ outputs: title: RCU Schema Prefix type: string idcs_tenant: - title: IDCS Instance GUID + title: IDCS/IAM Instance GUID type: string idcs_client_id: - title: IDCS Application Client ID + title: IDCS/IAM Application Client ID type: string backup_bucket_name: title: Backup Bucket Name diff --git a/terraform/terraform.tfvars.template b/terraform/terraform.tfvars.template index f1ff841..7e4fae1 100644 --- a/terraform/terraform.tfvars.template +++ b/terraform/terraform.tfvars.template @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. ### OCI Authentication details diff --git a/terraform/variables.tf b/terraform/variables.tf index 6f46819..8e29f4b 100644 --- a/terraform/variables.tf +++ b/terraform/variables.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. // General settings @@ -204,6 +204,12 @@ variable "instance_catalog_storage" { default = "" } +variable "instance_smv_server" { + type = bool + default = false +} + + variable "data_volume_size" { // (gigabytes) type = number @@ -496,3 +502,9 @@ variable "upgrade_IDCS_credential" { default = "" } +variable "upgrade_target_instance_shape" { + type = string + default = "" + +} + diff --git a/terraform/versions.tf b/terraform/versions.tf index eaf18f9..4e93740 100644 --- a/terraform/versions.tf +++ b/terraform/versions.tf @@ -1,4 +1,4 @@ -## Copyright (c) 2019-2023 Oracle and/or its affiliates. +## Copyright (c) 2019 - 2023 Oracle and/or its affiliates. ## Licensed under the Universal Permissive License v1.0 as shown at https://oss.oracle.com/licenses/upl. terraform { @@ -16,6 +16,9 @@ terraform { source = "hashicorp/random" version = "~> 3.1" } + template = { + source = "hashicorp/template" + } tls = { source = "hashicorp/tls" version = "~> 3.1" From ccb80f5120f80805e0eb4515af0216fd1d6f2bb4 Mon Sep 17 00:00:00 2001 From: Sankara Narayanan H Date: Thu, 22 Aug 2024 13:58:37 +0530 Subject: [PATCH 2/2] the provider version not available. removing it --- terraform/versions.tf | 3 --- 1 file changed, 3 deletions(-) diff --git a/terraform/versions.tf b/terraform/versions.tf index 4e93740..379588b 100644 --- a/terraform/versions.tf +++ b/terraform/versions.tf @@ -16,9 +16,6 @@ terraform { source = "hashicorp/random" version = "~> 3.1" } - template = { - source = "hashicorp/template" - } tls = { source = "hashicorp/tls" version = "~> 3.1"