Skip to content

upgrading solutions #112

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

Merged
merged 1 commit into from
Mar 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2022, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

.terraform
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!--

# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.


Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright © 2025 Oracle and/or its affiliates. All rights reserved.
Copyright © 2023 Oracle and/or its affiliates. All rights reserved.

The Universal Permissive License (UPL), Version 1.0

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Query and save the recommendations

Oracle Cloud provides an amazing platform to productively deliver secure, insightful, scalable and performant solutions. MovieStream designed their solution leveraging the world class Oracle Autonomous Database and Oracle Cloud Infrastructure (OCI) Data Lake services. Their data architecture is following the Oracle Reference Architecture [_Enterprise Data Warehousing - an Integrated Data Lake_](https://docs.oracle.com/en/solutions/oci-curated-analysis/index.html) - which is used by Oracle customers around the world. It's worthwhile to review the architecture so you can understand the value of integrating the data lake and data warehouse - as it enables you to answer more complex questions using all your data.

## Important - please deploy the solution in one of the listed regions below as the GenAI it's only available in this regions. If you deploy it in other regions, the solution will not work. If you don't have any of the regions available in your tenancy, please subscribe to one of them.
## Important - please deploy the solution in one of the listed regions below as the GenAI it's only available in this ## Important - please deploy the solution in any region but you need to use for the variable llm_region - one of the listed regions below as the GenAI it's only available in this regions. If you deploy it in other regions, the solution will not work. If you don't have any of the regions available in your tenancy, please subscribe to one of them.


Some regions don't offer all the models. See the region for each pretrained model to find out which models are available in a region near you.
Expand All @@ -62,6 +62,16 @@ Some regions don't offer all the models. See the region for each pretrained mode
| UK South (London) | London | uk-london-1 | LHR |
| US Midwest (Chicago) | Chicago | us-chicago-1 | ORD |

```
There is this variable called llm_region :
variable "llm_region" {
type = string
default = "us-chicago-1"
}

It is set to default to us-chicago-1 ; you need to use any region available in your tenancy subscribed to one of the available LLMs regions listed above.
```


## <a name="deliverables"></a>Deliverables
----------------
Expand Down Expand Up @@ -409,6 +419,7 @@ The ADW subsystem / module is able to create ADW/ATP databases.
The Workshop Settings are:

* Parameters:
* __llm_region__ - The region that you need to connect to your LLM. Some regions don't offer all the models. See the region for each pretrained model to find out which models are available in a region near you. It is set to default to us-chicago-1 ; you need to use any region available in your tenancy subscribed to one of the available LLMs regions listed : sa-saopaulo-1 , eu-frankfurt-1 , ap-osaka-1 , uk-london-1 , us-chicago-1
* __llm_secret__ - Secret API key used to connect to AI model
* __tag__ - Pick the datasets to load. The default is gen-ai to start the graph lab.
* __run_post_load_procedures__ - Run procedures after loading data
Expand Down Expand Up @@ -488,6 +499,11 @@ variable "db_database_management_status" {

# Workshop Settings

variable "llm_region" {
type = string
default = "us-chicago-1"
}

variable "llm_secret" {
type = string
default = "null"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

data "oci_identity_availability_domains" "ADs" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

# Create ADW Database with Endpoint in private subnet or public ADW
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

locals {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

output "atp_db_id" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

variable "adw_params" {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

# Autonomous Database Outputs:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

terraform {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

resource "null_resource" "sqlcl-create-usr" {
Expand Down Expand Up @@ -40,6 +40,6 @@ resource "local_file" "this" {
}

resource "local_file" "this2" {
content = templatefile("./scripts/install-apex-app.sql.tmpl", { region = var.region })
content = templatefile("./scripts/install-apex-app.sql.tmpl", { llm_region = var.llm_region })
filename = "./scripts/install-apex-app.sql"
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

title: "Deploy ChatDB - Autonomous Database Select AI demonstration"
Expand All @@ -23,14 +23,14 @@ groupings:
- db_version
- db_size_in_tbs
- db_enable_auto_scaling
- db_compute_model
- db_compute_count
- db_workload
- db_data_safe_status
- db_operations_insights_status
- db_database_management_status
- title: "Workshop Settings"
variables:
- llm_region
- llm_secret
- tag
- run_post_load_procedures
Expand All @@ -40,6 +40,7 @@ groupings:
- user_ocid
- fingerprint
- private_key_path
- db_compute_model
# General Configuration Variables
variables:
tenancy_ocid:
Expand Down Expand Up @@ -101,6 +102,7 @@ variables:
title: Database Admin Password
description: "Provide admin password. Constraints: 12 - 30 characters. At least one uppercase letter, one lowercase letter, and one number. No special characters."
type: password
default: "WlsAtpDb1234#"
required: true
confirmation: true
pattern: ((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*[%!@^&)(]).{12,20})
Expand Down Expand Up @@ -149,18 +151,6 @@ variables:
eq:
- db_is_free_tier
- false
db_compute_model:
title: "The compute model of the Autonomous Database ECPUs"
description: "The compute model of the Autonomous Database ECPUs"
type: enum
enum:
- "ECPU"
default: "ECPU"
required: true
visible:
eq:
- db_is_free_tier
- false
db_compute_count:
title: The number of ECPUs cores to be made available to the database
description: "The number of ECPU cores to enable. For ECPUs count needs to be minimum 2 and maximum 512 ECPUs"
Expand Down Expand Up @@ -211,6 +201,19 @@ variables:
required: true
visible: true
# Workshop Settings
llm_region:
title: "Pick one of the listed regions that your tenancy it's subscribed to access the LLM"
description: "It is set to default to us-chicago-1 ; you need to use any region available in your tenancy subscribed to one of the available LLMs regions listed"
type: enum
enum:
- "us-chicago-1"
- "sa-saopaulo-1"
- "eu-frankfurt-1"
- "ap-osaka-1"
- "uk-london-1"
default: "us-chicago-1"
required: true
visible: true
llm_secret:
title: Secret API key used to connect to AI model
description: "Enter your secret API key"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- **Copyright © 2025, Oracle and/or its affiliates.
-- **Copyright © 2023, Oracle and/or its affiliates.
-- **All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ END;

-- Setup Select AI. Create profile.
declare
v_region varchar2(100) := '${region}'; -- Default region
llm_region varchar2(100) := '${llm_region}'; -- Default region
begin
admin.workshop.write('Setup ai profile', 2);

Expand All @@ -56,7 +56,7 @@ begin
'{"provider": "oci",
"credential_name": "OCI$RESOURCE_PRINCIPAL",
"comments":"true",
"region":"' || v_region || '",
"region":"' || llm_region || '",
"object_list": [
{"owner": "MOVIESTREAM", "name": "GENRE"},
{"owner": "MOVIESTREAM", "name": "CUSTOMER"},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
-- **Copyright © 2025, Oracle and/or its affiliates.
-- **Copyright © 2023, Oracle and/or its affiliates.
-- **All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.

-- Tables will be installed in the current schema
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2025, Oracle and/or its affiliates.
# Copyright © 2023, Oracle and/or its affiliates.
# All rights reserved. Licensed under the Universal Permissive License (UPL), Version 1.0 as shown at https://oss.oracle.com/licenses/upl.


Expand All @@ -13,7 +13,7 @@ variable "tenancy_ocid" {

variable "region" {
type = string
default = "us-chicago-1"
default = ""
}

variable "compartment_id" {
Expand All @@ -36,6 +36,7 @@ variable "private_key_path" {
default = ""
}


# ADW Database Variables:

variable "db_name" {
Expand All @@ -45,7 +46,7 @@ variable "db_name" {

variable "db_password" {
type = string
default = ""
default = "WlsAtpDb1234#"
}

variable "db_compute_model" {
Expand Down Expand Up @@ -108,6 +109,11 @@ variable "db_database_management_status" {

# Workshop Settings

variable "llm_region" {
type = string
default = "us-chicago-1"
}

variable "llm_secret" {
type = string
# default = "null"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Oracle Cloud Foundation Terraform Solution - Deploy ChatDB - Autonomous Database Select AI demonstration
# Oracle Cloud Foundation Terraform Solution - Deploy ChatDB - Autonomous Database OCI GenAI demonstration

![](https://oracle-livelabs.github.io/adb/movie-stream-story-lite/introduction/images/moviestream.jpeg)

Expand Down Expand Up @@ -50,7 +50,7 @@ Query and save the recommendations
Oracle Cloud provides an amazing platform to productively deliver secure, insightful, scalable and performant solutions. MovieStream designed their solution leveraging the world class Oracle Autonomous Database and Oracle Cloud Infrastructure (OCI) Data Lake services. Their data architecture is following the Oracle Reference Architecture [_Enterprise Data Warehousing - an Integrated Data Lake_](https://docs.oracle.com/en/solutions/oci-curated-analysis/index.html) - which is used by Oracle customers around the world. It's worthwhile to review the architecture so you can understand the value of integrating the data lake and data warehouse - as it enables you to answer more complex questions using all your data.


## Important - please deploy the solution in one of the listed regions below as the GenAI it's only available in this regions. If you deploy it in other regions, the solution will not work. If you don't have any of the regions available in your tenancy, please subscribe to one of them.
## Important - please deploy the solution in any region but you need to use for the variable llm_region - one of the listed regions below as the GenAI it's only available in this regions. If you deploy it in other regions, the solution will not work. If you don't have any of the regions available in your tenancy, please subscribe to one of them.


Some regions don't offer all the models. See the region for each pretrained model to find out which models are available in a region near you.
Expand All @@ -63,6 +63,15 @@ Some regions don't offer all the models. See the region for each pretrained mode
| UK South (London) | London | uk-london-1 | LHR |
| US Midwest (Chicago) | Chicago | us-chicago-1 | ORD |

```
There is this variable called llm_region :
variable "llm_region" {
type = string
default = "us-chicago-1"
}

It is set to default to us-chicago-1 ; you need to use any region available in your tenancy subscribed to one of the available LLMs regions listed above.
```


## <a name="deliverables"></a>Deliverables
Expand Down Expand Up @@ -412,6 +421,7 @@ The Workshop Settings are:

* Parameters:
* __tag__ - Pick the datasets to load. The default is gen-ai to start the graph lab.
* __llm_region__ - The region that you need to connect to your LLM. Some regions don't offer all the models. See the region for each pretrained model to find out which models are available in a region near you. It is set to default to us-chicago-1 ; you need to use any region available in your tenancy subscribed to one of the available LLMs regions listed : sa-saopaulo-1 , eu-frankfurt-1 , ap-osaka-1 , uk-london-1 , us-chicago-1
* __run_post_load_procedures__ - Run procedures after loading data


Expand Down Expand Up @@ -494,6 +504,11 @@ variable "tag" {
default = "gen-ai"
}

variable "llm_region" {
type = string
default = "us-chicago-1"
}

variable "run_post_load_procedures" {
type = bool
default = true
Expand Down Expand Up @@ -649,5 +664,3 @@ We welcome your feedback. To post feedback, submit feature ideas or report bugs,

## <a name="known-issues"></a>Known Issues
**At the moment, there are no known issues for this solution**


Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ resource "null_resource" "sqlcl-create-usr" {
rm -rf tables.sql
rm -rf ./scripts/f100-genai-project.sql
rm -rf ./scripts/f101.sql?raw=true
rm -rf ./scripts/install-apex-app.sql
EOT
}
depends_on = [module.adb]
Expand All @@ -36,4 +37,9 @@ depends_on = [module.adb]
resource "local_file" "this" {
content = templatefile("./scripts/tables.sql.tmpl", { tag = var.tag, run_post_load_procedures = var.run_post_load_procedures })
filename = "./tables.sql"
}

resource "local_file" "this2" {
content = templatefile("./scripts/install-apex-app.sql.tmpl", { llm_region = var.llm_region })
filename = "./scripts/install-apex-app.sql"
}
Loading