Skip to content

Commit

Permalink
Merge pull request #1945 from oracle/release_gh
Browse files Browse the repository at this point in the history
Releasing version 5.10.0
  • Loading branch information
ravinitp authored Aug 23, 2023
2 parents 2a4a184 + b03904c commit 8b26b09
Show file tree
Hide file tree
Showing 96 changed files with 3,965 additions and 125 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
## 5.10.0 (August 23, 2023)

### Added
Support for BDS - Automated Patching for OS/Kernel, Node Maintenance, Add Master/Utility
Support for Database In-Memory support for Autonomous Database | ADB-D and ADB on ExaC@C
Support for BDS - Cluster Profiles for Kafka
### Bug Fix
Fix reference hashicorp/oci to oracle/oci in some documents

## 5.9.0 (August 15, 2023)

### Added
Expand Down
96 changes: 96 additions & 0 deletions examples/big_data_service/GetOsPatch/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

# Need to have this block even though it's empty; for import testing
provider "oci" {
}

variable "tenancy_ocid" {
}

variable "ssh_public_key" {
}

variable "region" {
default = "us-ashburn-1"
}


data "oci_bds_bds_instance_get_os_patch" "test_bds_instance_get_os_patch" {
bds_instance_id = "${oci_bds_bds_instance.test_bds_instance.id}"
os_patch_version = "${var.os_patch_version}"
}
variable "compartment_id" {}
variable "subnet_id" { }
variable "os_patch_version" { default = "ol7.9-x86_64-1.24.0.100-0.0" }

resource "oci_bds_bds_instance" "test_bds_instance" {
cluster_admin_password = "T3JhY2xlVGVhbVVTQSExMjM="
cluster_public_key = "${var.ssh_public_key}"
cluster_version = "ODH1"
compartment_id = "${var.compartment_id}"
compute_only_worker_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
display_name = "displayName"
edge_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
is_high_availability = "true"
is_secure = "true"
master_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
util_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
worker_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "3"
shape = "VM.Standard2.4"
subnet_id = "${var.subnet_id}"
}
}

resource "oci_core_subnet" "test_subnet" {
cidr_block = "10.0.0.0/24"
compartment_id = "${var.compartment_id}"
lifecycle {
ignore_changes = ["defined_tags"]
}
vcn_id = "${oci_core_vcn.test_vcn.id}"
}

resource "oci_core_vcn" "test_vcn" {
cidr_block = "10.0.0.0/16"
compartment_id = "${var.compartment_id}"
lifecycle {
ignore_changes = ["defined_tags"]
}
}
94 changes: 94 additions & 0 deletions examples/big_data_service/ListOsPatch/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@

# Need to have this block even though it's empty; for import testing
provider "oci" {
}

variable "tenancy_ocid" {
}

variable "ssh_public_key" {
}

variable "region" {
default = "us-ashburn-1"
}


data "oci_bds_bds_instance_list_os_patches" "test_bds_instance_list_os_patches" {
bds_instance_id = "${oci_bds_bds_instance.test_bds_instance.id}"
}
variable "compartment_id" { }
variable "subnet_id" { }

resource "oci_bds_bds_instance" "test_bds_instance" {
cluster_admin_password = "T3JhY2xlVGVhbVVTQSExMjM="
cluster_public_key = "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDpUa4zUZKyU3AkW9yoJTBDO550wpWZOXdHswfRq75gbJ2ZYlMtifvwiO3qUL/RIZSC6e1wA5OL2LQ97UaHrLLPXgjvKGVIDRHqPkzTOayjJ4ZA7NPNhcu6f/OxhKkCYF3TAQObhMJmUSMrWSUeufaRIujDz1HHqazxOgFk09fj4i2dcGnfPcm32t8a9MzlsHSmgexYCUwxGisuuWTsnMgxbqsj6DaY51l+SEPi5tf10iFmUWqziF0eKDDQ/jHkwLJ8wgBJef9FSOmwJReHcBY+NviwFTatGj7Cwtnks6CVomsFD+rAMJ9uzM8SCv5agYunx07hnEXbR9r/TXqgXGfN [email protected]"
cluster_version = "ODH1"
compartment_id = "${var.compartment_id}"
compute_only_worker_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
display_name = "displayName"
edge_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
is_high_availability = "true"
is_secure = "true"
master_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
util_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "2"
shape = "VM.Standard.E4.Flex"
shape_config {
memory_in_gbs = "32"
ocpus = "3"
}
subnet_id = "${var.subnet_id}"
}
worker_node {
block_volume_size_in_gbs = "150"
number_of_nodes = "3"
shape = "VM.Standard2.4"
subnet_id = "${var.subnet_id}"
}
}

resource "oci_core_subnet" "test_subnet" {
cidr_block = "10.0.0.0/24"
compartment_id = "${var.compartment_id}"
lifecycle {
ignore_changes = ["defined_tags"]
}
vcn_id = "${oci_core_vcn.test_vcn.id}"
}

resource "oci_core_vcn" "test_vcn" {
cidr_block = "10.0.0.0/16"
compartment_id = "${var.compartment_id}"
lifecycle {
ignore_changes = ["defined_tags"]
}
}
20 changes: 19 additions & 1 deletion examples/big_data_service/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ resource "oci_bds_bds_instance" "test_bds_instance" {
is_secure = var.bds_instance_is_secure
kms_key_id = var.kms_key_id
cluster_profile = var.cluster_profile
bootstrap_script_url = "https://objectstorage.us-ashburn-1.oraclecloud.com/p/5M6CdCgyfNKcMGvdSIdK20tC9TAf0mVFkMsSlMdmmCaKusIX3DVixBS-_oDhJoxi/n/oraclebigdatadb/b/bootstrap-script-sdk-test/o/bootstrapScriptTemplate1bootstrapScript1.sh"
bootstrap_script_url = "https://objectstorage.us-ashburn-1.oraclecloud.com/p/1hWiiE-2GVzGiKhaBX1zyXVa_jTIu_cU5kDdKTyYS74Wk5xmEA2WKht9NTA2y935/n/oraclebigdatadb/b/bootstrap-script-sdk-test/o/bootstrapScriptTemplate1bootstrapScript1.sh"

master_node {
#Required
Expand Down Expand Up @@ -269,6 +269,24 @@ resource "oci_bds_bds_instance" "test_bds_instance" {

is_cloud_sql_configured = false


#Change value to true for use of Kafka cluster
is_kafka_configured = false

#Uncomment kafka_broker_node block for use of Kafka cluster
#kafka_broker_node {
#Required
# shape = var.bds_instance_compute_only_worker_node_shape

# subnet_id = var.subnet_id
# block_volume_size_in_gbs = var.bds_instance_worker_nodes_block_volume_size_in_gbs
# number_of_nodes = 1
# shape_config {
# memory_in_gbs = var.bds_instance_compute_only_worker_memory_per_node
# ocpus = var.bds_instance_compute_only_worker_ocpu_per_node
# }
#}

#Optional
#Uncomment this when running in home region (PHX)
# defined_tags = {
Expand Down
2 changes: 1 addition & 1 deletion examples/database/atp-d/exadata.tf
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ resource "oci_database_cloud_autonomous_vm_cluster" "test_cloud_autonomous_vm_cl
# total_container_databases = 12
compute_model = "ECPU"

//To ignore changes to autonomous_data_storage_size_in_tbs
//To ignore changes to autonomous_data_storage_size_in_tbs and db_servers
lifecycle {
ignore_changes = [
autonomous_data_storage_size_in_tbs,
Expand Down
5 changes: 3 additions & 2 deletions examples/database/atp-d/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ resource "oci_database_autonomous_container_database" "test_autonomous_container
cloud_autonomous_vm_cluster_id = oci_database_cloud_autonomous_vm_cluster.test_cloud_autonomous_vm_cluster.id
display_name = "example-container-database"
patch_model = "RELEASE_UPDATES"
db_version = "19.18.0.1.0"
db_version = "19.20.0.1.0"
db_name = "ACDNAME"

#Optional
Expand Down Expand Up @@ -74,7 +74,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database" {
#Required
admin_password = random_string.autonomous_database_admin_password.result
compartment_id = var.compartment_ocid
compute_count = "1"
compute_count = 8
data_storage_size_in_tbs = "1"
db_name = "atpdb1"

Expand All @@ -85,6 +85,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database" {
freeform_tags = var.autonomous_database_freeform_tags
is_dedicated = "true"
rotate_key_trigger = "true"
in_memory_percentage = 50
compute_model = "ECPU"
}

Expand Down
2 changes: 1 addition & 1 deletion examples/database/exadata_cc/adbd/acd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ resource "random_string" "db_unique_name" {

resource "oci_database_autonomous_container_database" "autonomous_container_database" {
autonomous_vm_cluster_id = oci_database_autonomous_vm_cluster.test_autonomous_vm_cluster.id
db_version = "19.18.0.1.0"
db_version = "19.20.0.1.0"
backup_config {
backup_destination_details {
type = "LOCAL"
Expand Down
2 changes: 1 addition & 1 deletion examples/database/exadata_cc/adbd/adb.tf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ resource "oci_database_autonomous_database" "test_autonomous_database" {
#Required
admin_password = random_string.autonomous_database_admin_password.result
compartment_id = var.compartment_ocid
ocpu_count = "2"
compute_count = 8
data_storage_size_in_tbs = "1"
db_name = "atpdb1"

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ require (
github.com/mitchellh/mapstructure v1.1.2 // indirect
github.com/mitchellh/reflectwalk v1.0.2 // indirect
github.com/oklog/run v1.0.0 // indirect
github.com/oracle/oci-go-sdk/v65 v65.47.1
github.com/oracle/oci-go-sdk/v65 v65.47.2
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/sony/gobreaker v0.5.0 // indirect
github.com/ulikunitz/xz v0.5.8 // indirect
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -289,8 +289,8 @@ github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQ
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/ginkgo v1.7.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY=
github.com/oracle/oci-go-sdk/v65 v65.47.1 h1:g+yMS4Lkcu+M+mEUIwMRnbaY0tMyNKhEOTgZ6hX6w/w=
github.com/oracle/oci-go-sdk/v65 v65.47.1/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/oracle/oci-go-sdk/v65 v65.47.2 h1:tSb37xxw9T3CggDhQMsbLkwqx7v2U3z402Lg/xVLY1Y=
github.com/oracle/oci-go-sdk/v65 v65.47.2/go.mod h1:IBEV9l1qBzUpo7zgGaRUhbB05BVfcDGYRFBCPlTcPp0=
github.com/pierrec/lz4 v2.0.5+incompatible/go.mod h1:pdkljMzZIN41W+lC3N2tnIh5sFi+IEE17M5jbnwPHcY=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
4 changes: 2 additions & 2 deletions internal/globalvar/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import (
"log"
)

const Version = "5.9.0"
const ReleaseDate = "2023-08-17"
const Version = "5.10.0"
const ReleaseDate = "2023-08-23"

func PrintVersion() {
log.Printf("[INFO] terraform-provider-oci %s\n", Version)
Expand Down
64 changes: 64 additions & 0 deletions internal/integrationtest/bds_bds_instance_get_os_patch_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved.
// Licensed under the Mozilla Public License v2.0

package integrationtest

import (
"fmt"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"

"github.com/oracle/terraform-provider-oci/httpreplay"
"github.com/oracle/terraform-provider-oci/internal/acctest"

"github.com/oracle/terraform-provider-oci/internal/utils"
)

var (
BdsBdsInstanceGetOsPatchDataSourceRepresentation = map[string]interface{}{
"bds_instance_id": acctest.Representation{RepType: acctest.Required, Create: `${oci_bds_bds_instance.test_bds_instance.id}`},
"os_patch_version": acctest.Representation{RepType: acctest.Required, Create: `${var.os_patch_version}`},
}

BdsBdsInstanceGetOsPatchResourceConfig = acctest.GenerateResourceFromRepresentationMap("oci_bds_bds_instance", "test_bds_instance", acctest.Required, acctest.Create, bdsInstanceOdhRepresentation) +
acctest.GenerateResourceFromRepresentationMap("oci_core_subnet", "test_subnet", acctest.Required, acctest.Create, CoreSubnetRepresentation) +
acctest.GenerateResourceFromRepresentationMap("oci_core_vcn", "test_vcn", acctest.Required, acctest.Create, CoreVcnRepresentation)
)

// issue-routing-tag: bds/default
func TestBdsBdsInstanceGetOsPatchResource_basic(t *testing.T) {
httpreplay.SetScenario("TestBdsBdsInstanceGetOsPatchResource_basic")
defer httpreplay.SaveScenario()

config := acctest.ProviderTestConfig()

compartmentId := utils.GetEnvSettingWithBlankDefault("compartment_ocid")
compartmentIdVariableStr := fmt.Sprintf("variable \"compartment_id\" { default = \"%s\" }\n", compartmentId)

osPatchVersion := utils.GetEnvSettingWithBlankDefault("os_patch_version")
osPatchVersionVariableStr := fmt.Sprintf("variable \"os_patch_version\" { default = \"%s\" }\n", osPatchVersion)

subnetId := utils.GetEnvSettingWithBlankDefault("subnet_ocid")
subnetIdVariableStr := fmt.Sprintf("variable \"subnet_id\" { default = \"%s\" }\n", subnetId)

datasourceName := "data.oci_bds_bds_instance_get_os_patch.test_bds_instance_get_os_patch"

acctest.SaveConfigContent("", "", "", t)

acctest.ResourceTest(t, nil, []resource.TestStep{
// verify datasource
{
Config: config +
acctest.GenerateDataSourceFromRepresentationMap("oci_bds_bds_instance_get_os_patch", "test_bds_instance_get_os_patch", acctest.Required, acctest.Create, BdsBdsInstanceGetOsPatchDataSourceRepresentation) +
compartmentIdVariableStr + subnetIdVariableStr + osPatchVersionVariableStr + BdsBdsInstanceGetOsPatchResourceConfig,
Check: acctest.ComposeAggregateTestCheckFuncWrapper(
resource.TestCheckResourceAttrSet(datasourceName, "bds_instance_id"),
resource.TestCheckResourceAttr(datasourceName, "os_patch_version", "ol7.9-x86_64-1.24.0.100-0.0"),
resource.TestCheckResourceAttrSet(datasourceName, "min_bds_version"),
resource.TestCheckResourceAttrSet(datasourceName, "patch_type"),
resource.TestCheckResourceAttrSet(datasourceName, "release_date"),
),
},
})
}
Loading

0 comments on commit 8b26b09

Please sign in to comment.