From 3275d310f09671ef010f5e4074325ce3ce0371d7 Mon Sep 17 00:00:00 2001 From: ionelpanaitescu Date: Wed, 24 Jul 2024 17:28:53 +0200 Subject: [PATCH] added the new solutions --- ...us-Database-oci-genai-demonstration-RM.zip | Bin 0 -> 41153 bytes .../.gitignore | 6 + .../CONTRIBUTING.md | 32 + .../LICENSE | 27 + .../README.md | 638 ++++++++++++++++++ .../locals.tf | 66 ++ .../main.tf | 8 + .../database/adb/main.tf | 42 ++ .../database/adb/outputs.tf | 64 ++ .../database/adb/variables.tf | 27 + .../outputs.tf | 52 ++ .../provider.tf | 31 + .../provisioners.tf | 36 + .../schema.yaml | 293 ++++++++ .../scripts/init.sql | 34 + .../scripts/install-apex-app.sql | 69 ++ .../scripts/install-apex-workspace.sql | 31 + .../scripts/tables.sql.tmpl | 16 + .../variables.tf | 119 ++++ cloud-foundation/solutions/README.md | 27 +- 20 files changed, 1613 insertions(+), 5 deletions(-) create mode 100644 cloud-foundation/solutions-for-oracle-res-mgr/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration-RM.zip create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/.gitignore create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/CONTRIBUTING.md create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/LICENSE create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/README.md create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/locals.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/main.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/main.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/outputs.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/variables.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/outputs.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provider.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provisioners.tf create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/schema.yaml create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/init.sql create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-app.sql create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-workspace.sql create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/tables.sql.tmpl create mode 100644 cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/variables.tf diff --git a/cloud-foundation/solutions-for-oracle-res-mgr/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration-RM.zip b/cloud-foundation/solutions-for-oracle-res-mgr/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration-RM.zip new file mode 100644 index 0000000000000000000000000000000000000000..471e41362448bb15eb21a2601df19ed8841c22e5 GIT binary patch literal 41153 zcmdSA1#n#3mL(`=W@ct)W=b(*ikX?2(PCz1W@cH;%wVBK7Fm)#ey=*Je)s(DnfX-_ z6O|D+>1O1)vG&^Qth4Vv%JSe47$AQ=^m`Sw|9>Rxr#jT9pB*Yj+ z-Q64=9PJ(5T^S{e-Hc6)UCkLCO|2O%%^i%b8O_Y?9UWZVT#VhU9UYi8)Dc0TQS-i< z$Ke)P6#hBfz2HGWA)Y`%K>i+2`R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%IdE5&S@Ppu7hrV2}`WvHXqEzgKO~02@&3C*Xn~BMr=ShY1*@53L&b_d4x8FZv&% z1x&Ao2^fTqaYShCt=mt41wXkMm>UffFz77iVZi!6#@J_y^g)gVR0qHW464IABB=J# z>_8z=TPqUs#@H` zfVJ1a$sa)lRR^A~c6*f!bpJULy4p*#9{>f+zJs5N2aKJB2^eHSd>Eh(8h`f#zyP)2 z0RxJuU;+kBLPtR#31A0l_ygd8J~i+iY<4e4Z1TeZw|A?WJx1ffGZ&x`JY>6b-y9VSq~TZ~^t_Fad)!uN)Cv`)T(Bz<`Jg zzOZ?B#N{b>7{Ks0y0l)#?4u6pidE0=ppFeDU{D`)SnH9XwXb?V zfDCXh_#&d+tiN^bFp%w6E%XolYd7l?Xde+``)PLoV1V5YUX9$>4+9u1xn!5m|3kEP zuf`InK1bqTKUq}-@A*Jc1AMsykV*v;sORe(1}PYC{bXIk4=@BYg}2^eH!dNh#kk@xxo7y-TDVFZ$KVFCuJS{ylyd#LyW=zzRQ_>9Wk z+nlH6Q9yT4>f{d)1k{5^a5oppSsyWi2Wff$kbq6U-(P@)N|-E&-m*Cikg)w_-we0I zY&<}MB}^7TCv1-dQkcg7KHU;VnSg5FV+*7K+CP_a`0Zr}@DX^X0Mg}PvH%)@YW*t^|Jzwu ze(?3KKaS`Jq=Fn|2_TUGCSXvU*Z;&4`+k`{&4GdnD9i! +# Contributing to Oracle Cloud Foundation Terraform Framework + +## Contributing to Oracle Cloud Foundation Terraform Framework + +Oracle welcomes contributions to this repository from anyone. + +If you want to submit a pull request to fix a bug or enhance an existing +feature, please first open an issue and link to that issue when you +submit your pull request. + +If you have any questions about a possible submission, feel free to open +an issue too. + +## Pull request process + +1. Fork this repository +1. Create a branch in your fork to implement the changes. We recommend using +the issue number as part of your branch name, e.g. `1234-fixes` +1. Ensure that there is at least one test that would fail without the fix and +passes post fix +1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly +what your changes are meant to do and provide simple steps on how to validate +your changes, ideally referencing the test. Ensure that you reference the issue +you created as well. We will assign the pull request to 1-2 people for review +before it is submitted internally and the PR is closed. \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/LICENSE b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/LICENSE new file mode 100644 index 0000000..e7eefb0 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/LICENSE @@ -0,0 +1,27 @@ +Copyright © 2023 Oracle and/or its affiliates. All rights reserved. + +The Universal Permissive License (UPL), Version 1.0 + +Subject to the condition set forth below, permission is hereby granted to any person obtaining a copy of this +software, associated documentation and/or data (collectively the "Software"), free of charge and under any and +all copyright rights in the Software, and any and all patent rights owned or freely licensable by each licensor +hereunder covering either (i) the unmodified Software as contributed to or provided by such licensor, or +(ii) the Larger Works (as defined below), to deal in both + +(a) the Software, and +(b) any piece of software and/or hardware listed in the lrgrwrks.txt file if one is included with the Software +(each a “Larger Work” to which the Software is contributed by such licensors), + +without restriction, including without limitation the rights to copy, create derivative works of, display, +perform, and distribute the Software and make, use, sell, offer for sale, import, export, have made, and have +sold the Software and the Larger Work(s), and to sublicense the foregoing rights on either these or other terms. + +This license is subject to the following condition: +The above copyright notice and either this complete permission notice or at a minimum a reference to the UPL must +be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO +THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF +CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS +IN THE SOFTWARE. \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/README.md b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/README.md new file mode 100644 index 0000000..38d44c0 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/README.md @@ -0,0 +1,638 @@ +# Oracle Cloud Foundation Terraform Solution - Deploy ChatDB - Autonomous Database Select AI demonstration + +![](https://oracle-livelabs.github.io/adb/movie-stream-story-lite/introduction/images/moviestream.jpeg) + +## Table of Contents +1. [Overview](#overview) +1. [Deliverables](#deliverables) +1. [Architecture](#Architecture-Diagram) +1. [Executing Instructions](#instructions) + 1. [Deploy Using Oracle Resource Manager](#Deploy-Using-Oracle-Resource-Manager) + 1. [What to do after the Deployment via Resource Manager](#After-Deployment-via-Resource-Manager) + 1. [Deploy Using the Terraform CLI](#Deploy-Using-the-Terraform-CLI) + 1. [What to do after the Deployment via Terraform CLI](#After-Deployment-via-Terraform-CLI) +1. [Documentation](#documentation) +1. [The Team](#team) +1. [Feedback](#feedback) +1. [Known Issues](#known-issues) +1. [Contribute](#CONTRIBUTING.md) + + +## Overview +---------------- + +Location of the lab: [Integrate, Analyze and Act on All data using Autonomous Database](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/view-workshop?wid=889) - **Lab 7: Use Graph analytics for product recommendations** + +In this lab, you will use Oracle Graph analytics to detect and create customer communities based on movie viewing behavior. Once you've created communities - make recommendations based on what your community members have watched. + +Watch the video below for a quick walk-through of the lab. [_click here_](https://cdnapisec.kaltura.com/html5/html5lib/v2.98/mwEmbedFrame.php/p/2171811/uiconf_id/35965902/entry_id/1_ret5ywcn?wid=_2171811&iframeembed=true&playerId=kaltura_player&entry_id=1_ret5ywcn&flashvars[streamerType]=auto#). + + +About graph + +When you model your data as a graph, you can run graph algorithms to analyze connections and relationships in your data. You can also use graph queries to find patterns in your data, such as cycles, paths between vertices, anomalous patterns, and others. Graph algorithms are invoked using a Java or Python API, and graph queries are run using PGQL (Property Graph Query Language, see pgql-lang.org). + +In this lab you will use a graph created from the tables MOVIE, CUSTOMER_PROMOTIONS, and CUSTSALES_PROMOTIONS. MOVIE and CUSTOMER_PROMOTIONS are vertex tables (every row in these tables becomes a vertex). CUSTSALES_PROMOTIONS connects the two tables, and is the edge table. Every time a customer in CUSTOMER_PROMOTIONS rents a movie in the table MOVIE, that is an edge in the graph. This graph has been created for you for use in this lab. + +You have the choice of over 60 pre-built algorithms when analyzing a graph. In this lab you will use the Personalized SALSA algorithm, which is a good choice for product recommendations. Customer vertices map to hubs and movies map to authorities. Higher hub scores indicate a closer relationship between customers. Higher authority scores indicate that the vertex (or movie) is plays a more important role in establishing that closeness. + +Objectives + +In this lab, you will use the Graph Studio feature of Autonomous Database to: + +Use a notebook +Run a few PGQL graph queries +Use python to run Personalized SALSA from the algorithm library +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. + + +## Deliverables +---------------- + + This repository encloses one deliverable: + +- A reference implementation written in Terraform HCL (Hashicorp Language) that provisions fully functional resources in an OCI tenancy. + +## Architecture-Diagram +---------------- + +In this workshop, we'll start with two key components of MovieStream's architecture. MovieStream is storing their data across Oracle Object Storage and Autonomous Database. Data is captured from various sources into a landing zone in object storage. This data is then processed (cleansed, transformed and optimized) and stored in a gold zone on object storage. Once the data is curated, it is loaded into an Autonomous Database where it is analyzed by many (and varied) members of the user community. + + +![](https://oracle-livelabs.github.io/adb/movie-stream-story-lite/introduction/images/architecture.png) + + +## Executing Instructions +---------------- + +## Prerequisites + +- Permission to `manage` the following types of resources in your Oracle Cloud Infrastructure tenancy: `autonomous database` +- Quota to create the following resources: 1 ADW database instance inside OCI. +If you don't have the required permissions and quota, contact your tenancy administrator. See [Policy Reference](https://docs.cloud.oracle.com/en-us/iaas/Content/Identity/Reference/policyreference.htm), [Service Limits](https://docs.cloud.oracle.com/en-us/iaas/Content/General/Concepts/servicelimits.htm), [Compartment Quotas](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcequotas.htm). + +# Deploy Using Oracle Resource Manager + +1. Click [![Deploy to Oracle Cloud](https://oci-resourcemanager-plugin.plugins.oci.oraclecloud.com/latest/deploy-to-oracle-cloud.svg)](https://cloud.oracle.com/resourcemanager/stacks/create?region=home&zipUrl=https://github.com/oracle-devrel/terraform-oci-oracle-cloud-foundation/releases/download/v1.0.0/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration-RM.zip) + + + If you aren't already signed in, when prompted, enter the tenancy and user credentials. + +2. Review and accept the terms and conditions. +3. Select the region where you want to deploy the stack. +4. Follow the on-screen prompts and instructions to create the stack. +5. After creating the stack, click **Terraform Actions**, and select **Plan**. +6. Wait for the job to be completed, and review the plan. + To make any changes, return to the Stack Details page, click **Edit Stack**, and make the required changes. Then, run the **Plan** action again. +7. If no further changes are necessary, return to the Stack Details page, click **Terraform Actions**, and select **Apply**. + +## What to do after the Deployment via Resource Manager +---------------- + +- After the solution was deployed successfully from Terraform CLI you will have some outputs on the screen. + +Example of output: + +``` +Apply complete! Resources: 5 added, 0 changed, 0 destroyed. +Outputs: +ADW_Database_db_connection = tolist([ + { + "all_connection_strings" = tomap({ + "HIGH" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_high.adb.oraclecloud.com" + "LOW" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_low.adb.oraclecloud.com" + "MEDIUM" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_medium.adb.oraclecloud.com" + }) + "dedicated" = "" + "high" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_high.adb.oraclecloud.com" + "low" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_low.adb.oraclecloud.com" + "medium" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_medium.adb.oraclecloud.com" + "profiles" = tolist([ + { + "consumer_group" = "HIGH" + "display_name" = "moviestreamworkshopg_high" + "host_format" = "FQDN" + "protocol" = "TCPS" + "session_mode" = "DIRECT" + "syntax_format" = "LONG" + "tls_authentication" = "MUTUAL" + "value" = "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=rddainsuh6u1okc_moviestreamworkshopg_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" + }, + { + "consumer_group" = "LOW" + "display_name" = "moviestreamworkshopg_low" + "host_format" = "FQDN" + "protocol" = "TCPS" + "session_mode" = "DIRECT" + "syntax_format" = "LONG" + "tls_authentication" = "MUTUAL" + "value" = "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=rddainsuh6u1okc_moviestreamworkshopg_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" + }, + { + "consumer_group" = "MEDIUM" + "display_name" = "moviestreamworkshopg_medium" + "host_format" = "FQDN" + "protocol" = "TCPS" + "session_mode" = "DIRECT" + "syntax_format" = "LONG" + "tls_authentication" = "MUTUAL" + "value" = "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=rddainsuh6u1okc_moviestreamworkshopg_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" + }, + ]) + }, +]) +Database_Actions = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer", +] +adb_admin_password = +adb_user_name = "MOVIESTREAM" +adb_user_password = "****************" +apex_url = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/ords/apex", +] +database_fully_qualified_name = "rddainsuh6u1okc-moviestreamworkshopg.adb.us-ashburn-1.oraclecloudapps.com" +graph_studio_url = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/", +] +machine_learning_user_management_url = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/omlusers/", +] +select_ai_demo_url = "https://rddainsuh6u1okc-moviestreamworkshopg.adb.us-ashburn-1.oraclecloudapps.com/ords/r/moviestream/chatdb" + +``` + +## Oracle MovieStream demonstration deployment + +This stack installs everything required to run the Oracle MovieStream Live Lab. Now you can follow the steps for the MovieStream Live lab 7 from https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=889&p210_wec=&session=112456050571777 + +You can find details for connecting to these services in the Stack's Job Details Output. + +## Connect to Autonomous Database +Go to Autonomous Database in the OCI console. The default name given to the database instance is: **OracleMovieStream**. You specified the ADMIN password when deploying the Oracle MovieStream stack. + +A database user was created during the deployment. You can connect as that user to look at the database schema, use analytic features, etc. + +* User: `MOVIESTREAM`, Password: `watchS0meMovies#` +* User: `ADMIN`, Password: `WlsAtpDb1234#` + +Please change these passwords after deployment. + +## Using database tools and applications + +All of the Autonomous Database tools are available to you, including SQL worksheet, Data Studio, Machine Learning and Graph notebooks, etc. Go to Database Actions to access these tools. + +* **Database Actions:** Load, explore, transform, model, and catalog your data. Use an SQL worksheet, build REST interfaces and low-code apps, manage users and connections, build and apply machine learning models. + +Access Link is the graph_studio_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer + + +* **Graph Studio:** Oracle Graph Studio lets you create scalable property graph databases. Graph Studio automates the creation of graph models and in-memory graphs from database tables. It includes notebooks and developer APIs that allow you to execute graph queries using PGQL (an SQL-like graph query language) and over 50 built-in graph algorithms. Graph Studio also offers dozens of visualization, including native graph visualization. + +Access Link is the graph_studio_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/ + + +* **Application Express:** Oracle Application Express (APEX) is a low-code development platform that enables you to build scalable, secure enterprise apps that can be deployed anywhere. + +Access Link is the graph_studio_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer + + +* **Oracle Machine Learning User Notebooks:** Oracle Machine Learning notebooks provide easy access to Oracle's parallelized, scalable in-database implementations of a library of Oracle Advanced Analytics' machine learning algorithms (classification, regression, anomaly detection, clustering, associations, attribute importance, feature extraction, times series, etc.), SQL, PL/SQL and Oracle's statistical and analytical SQL functions. + +The stack's job output also includes URLs that take you directly to the tools. + +Access Link is the machine_learning_user_management_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/omlusers/ + + + +# Deploy Using the Terraform CLI + + +## Clone the Module +Now, you'll want a local copy of this repo. You can make that with the commands: + + git clone https://github.com/oracle-devrel/terraform-oci-oracle-cloud-foundation.git + cd terraform-oci-oracle-cloud-foundation/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration + ls + +## Deployment + +- Follow the instructions from Prerequisites links in order to install terraform. +- Download the terraform version suitable for your operating system. +- Unzip the archive. +- Add the executable to the PATH. +- You will have to generate an API signing key (public/private keys) and the public key should be uploaded in the OCI console, for the iam user that will be used to create the resources. Also, you should make sure that this user has enough permissions to create resources in OCI. In order to generate the API Signing key, follow the steps from: https://docs.us-phoenix-1.oraclecloud.com/Content/API/Concepts/apisigningkey.htm#How + The API signing key will generate a fingerprint in the OCI console, and that fingerprint will be used in a terraform file described below. +- You will also need to generate an OpenSSH public key pair. Please store those keys in a place accessible like your user home .ssh directory. + +## Prerequisites + +- Install Terraform v0.15 or greater: https://www.terraform.io/downloads.html +- Install sqlcl on your operating system: https://docs.oracle.com/en/database/oracle/apex/22.1/aeadm/downloading-and-installing-sqlcl.html +- Install Python 3.6: https://www.digitalocean.com/community/tutorials/how-to-install-python-3-and-set-up-a-local-programming-environment-on-centos-7 +- Generate an OCI API Key +- Create your config under \$home*directory/.oci/config (run \_oci setup config* and follow the steps) +- Gather Tenancy related variables (tenancy_id, user_id, local path to the oci_api_key private key, fingerprint of the oci_api_key_public key, and region) + +### Installing Terraform + +Go to [terraform.io](https://www.terraform.io/downloads.html) and download the proper package for your operating system and architecture. Terraform is distributed as a single binary. +Install Terraform by unzipping it and moving it to a directory included in your system's PATH. You will need the latest version available. + +### Prepare Terraform Provider Values + +**variables.tf** is located in the root directory. This file is used in order to be able to make API calls in OCI, hence it will be needed by all terraform automations. + +In order to populate the **variables.tf** file, you will need the following: + +- Tenancy OCID +- User OCID +- Local Path to your private oci api key +- Fingerprint of your public oci api key +- Region + + +#### **Getting the Tenancy and User OCIDs** + +You will have to login to the [console](https://console.us-ashburn-1.oraclecloud.com) using your credentials (tenancy name, user name and password). If you do not know those, you will have to contact a tenancy administrator. + +In order to obtain the tenancy ocid, after logging in, from the menu, select Administration -> Tenancy Details. The tenancy OCID, will be found under Tenancy information and it will be similar to **ocid1.tenancy.oc1..aaa…** + +In order to get the user ocid, after logging in, from the menu, select Identity -> Users. Find your user and click on it (you will need to have this page open for uploading the oci_api_public_key). From this page, you can get the user OCID which will be similar to **ocid1.user.oc1..aaaa…** + +#### **Creating the OCI API Key Pair and Upload it to your user page** + +Create an oci_api_key pair in order to authenticate to oci as specified in the [documentation](https://docs.cloud.oracle.com/en-us/iaas/Content/API/Concepts/apisigningkey.htm#How): + +Create the .oci directory in the home of the current user + +`$ mkdir ~/.oci` + +Generate the oci api private key + +`$ openssl genrsa -out ~/.oci/oci_api_key.pem 2048` + +Make sure only the current user can access this key + +`$ chmod go-rwx ~/.oci/oci_api_key.pem` + +Generate the oci api public key from the private key + +`$ openssl rsa -pubout -in ~/.oci/oci_api_key.pem -out ~/.oci/oci_api_key_public.pem` + +You will have to upload the public key to the oci console for your user (go to your user page -> API Keys -> Add Public Key and paste the contents in there) in order to be able to do make API calls. + +After uploading the public key, you can see its fingerprint into the console. You will need that fingerprint for your variables.tf file. +You can also get the fingerprint from running the following command on your local workstation by using your newly generated oci api private key. + +`$ openssl rsa -pubout -outform DER -in ~/.oci/oci_api_key.pem | openssl md5 -c` + +#### **Generating an SSH Key Pair on UNIX or UNIX-Like Systems Using ssh-keygen** + +- Run the ssh-keygen command. + +`ssh-keygen -b 2048 -t rsa` + +- The command prompts you to enter the path to the file in which you want to save the key. A default path and file name are suggested in parentheses. For example: /home/user_name/.ssh/id_rsa. To accept the default path and file name, press Enter. Otherwise, enter the required path and file name, and then press Enter. +- The command prompts you for a passphrase. Enter a passphrase, or press ENTER if you don't want to havea passphrase. + Note that the passphrase isn't displayed when you type it in. Remember the passphrase. If you forget the passphrase, you can't recover it. When prompted, enter the passphrase again to confirm it. +- The command generates an SSH key pair consisting of a public key and a private key, and saves them in the specified path. The file name of the public key is created automatically by appending .pub to the name of the private key file. For example, if the file name of the SSH private key is id_rsa, then the file name of the public key would be id_rsa.pub. + Make a note of the path where you've saved the SSH key pair. + When you create instances, you must provide the SSH public key. When you log in to an instance, you must specify the corresponding SSH private key and enter the passphrase when prompted. + +#### **Getting the Region** + +Even though, you may know your region name, you will needs its identifier for the variables.tf file (for example, US East Ashburn has us-ashburn-1 as its identifier). +In order to obtain your region identifier, you will need to Navigate in the OCI Console to Administration -> Region Management +Select the region you are interested in, and save the region identifier. + + +#### **Prepare the variables.tf file** + +You will have to modify the **variables.tf** file to reflect the values that you’ve captured. + +``` +variable "tenancy_ocid" { + type = string + default = "" (tenancy ocid, obtained from OCI console - Profile -> Tenancy) +} + +variable "region" { + type = string + default = "" (the region used for deploying the infrastructure - ex: eu-frankfurt-1) +} + +variable "compartment_id" { + type = string + default = "" (the compartment used for deploying the solution - ex: compartment1) +} + +variable "user_ocid" { + type = string + default = "" (user ocid, obtained from OCI console - Profile -> User Settings) +} + +variable "fingerprint" { + type = string + default = "" (fingerprint obtained after setting up the API public key in OCI console - Profile -> User Settings -> API Keys -> Add Public Key) +} + +variable "private_key_path" { + type = string + default = "" (the path of your local oci api key - ex: /root/.ssh/oci_api_key.pem) +} + +``` + +## Repository files + + +* **modules(folder)** - ( this folder will be pressent only for the Resource Manager zipped files) Contains folders with subsystems and modules for each section of the project: networking, autonomous database, analytics cloud, object storage, data catalog etc. +Also in the modules folder there is a folder called provisioner - that will provision your full infrastructure with the data model. +* **scripts(folder)** - this folder contains the necessary scripts that will run on the DB. +* **CONTRIBUTING.md** - Contributing guidelines, also called Contribution guidelines, the CONTRIBUTING.md file, or software contribution guidelines, is a text file which project managers include in free and open-source software packages or other open media packages for the purpose of describing how others may contribute user-generated content to the project.The file explains how anyone can engage in activities such as formatting code for submission or submitting patches +* **LICENSE** - The Universal Permissive License (UPL), Version 1.0 +* **local.tf** - Local values can be helpful to avoid repeating the same values or expressions multiple times in a configuration, but if overused they can also make a configuration hard to read by future maintainers by hiding the actual values used.Here is the place where all the resources are defined. +* **main.tf** - Main Terraform script used for instantiating the Oracle Cloud Infrastructure provider and all subsystems modules +* **outputs.tf** - Defines project's outputs that you will see after the code runs successfuly +* **provider.tf** - The terraform provider that will be used (OCI) +* **README.md** - This file +* **schema.yaml** - Schema documents are recommended for Terraform configurations when using Resource Manager. Including a schema document allows you to extend pages in the Oracle Cloud Infrastructure Console. Facilitate variable entry in the Create Stack page by surfacing SSH key controls and by naming, grouping, dynamically prepopulating values, and more. Define text in the Application Information tab of the stack detail page displayed for a created stack. +* **variables.tf** - Project's global variables + +Secondly, populate the `terraform.tf` file with the disared configuration following the information: + + +# Autonomous Data Warehouse + +The ADW subsystem / module is able to create ADW/ATP databases. + +* Parameters: + * __db_name__ - The database name. The name must begin with an alphabetic character and can contain a maximum of 14 alphanumeric characters. Special characters are not permitted. The database name must be unique in the tenancy. + * __db_password__ - The password must be between 12 and 30 characters long, and must contain at least 1 uppercase, 1 lowercase, and 1 numeric character. It cannot contain the double quote symbol (") or the username "admin", regardless of casing. The password is mandatory if source value is "BACKUP_FROM_ID", "BACKUP_FROM_TIMESTAMP", "DATABASE" or "NONE". + * __db_compute_model__ - The compute model of the Autonomous Database. This is required if using the computeCount parameter. If using cpuCoreCount then it is an error to specify computeModel to a non-null value. + * __db_compute_count__ - The compute amount available to the database. Minimum and maximum values depend on the compute model and whether the database is on Shared or Dedicated infrastructure. For an Autonomous Database on Shared infrastructure, the 'ECPU' compute model requires values in multiples of two. Required when using the computeModel parameter. When using cpuCoreCount parameter, it is an error to specify computeCount to a non-null value. + * __db_size_in_tbs__ - The size, in gigabytes, of the data volume that will be created and attached to the database. This storage can later be scaled up if needed. The maximum storage value is determined by the infrastructure shape. See Characteristics of Infrastructure Shapes for shape details. + * __db_workload__ - The Autonomous Database workload type. The following values are valid: + - OLTP - indicates an Autonomous Transaction Processing database + - DW - indicates an Autonomous Data Warehouse database + - AJD - indicates an Autonomous JSON Database + - APEX - indicates an Autonomous Database with the Oracle APEX Application Development workload type. *Note: db_workload can only be updated from AJD to OLTP or from a free OLTP to AJD. + * __db_version__ - A valid Oracle Database version for Autonomous Database.db_workload AJD and APEX are only supported for db_version 19c and above. + * __db_enable_auto_scaling__ - Indicates if auto scaling is enabled for the Autonomous Database OCPU core count. The default value is FALSE. + * __db_is_free_tier__ - Indicates if this is an Always Free resource. The default value is false. Note that Always Free Autonomous Databases have 1 CPU and 20GB of memory. For Always Free databases, memory and CPU cannot be scaled. When db_workload is AJD or APEX it cannot be true. + * __db_license_model__ - The Oracle license model that applies to the Oracle Autonomous Database. Bring your own license (BYOL) allows you to apply your current on-premises Oracle software licenses to equivalent, highly automated Oracle PaaS and IaaS services in the cloud. License Included allows you to subscribe to new Oracle Database software licenses and the Database service. Note that when provisioning an Autonomous Database on dedicated Exadata infrastructure, this attribute must be null because the attribute is already set at the Autonomous Exadata Infrastructure level. When using shared Exadata infrastructure, if a value is not specified, the system will supply the value of BRING_YOUR_OWN_LICENSE. It is a required field when db_workload is AJD and needs to be set to LICENSE_INCLUDED as AJD does not support default license_model value BRING_YOUR_OWN_LICENSE. + * __db_data_safe_status__ - (Updatable) Status of the Data Safe registration for this Autonomous Database. Could be REGISTERED or NOT_REGISTERED. + * __db_operations_insights_status__ - (Updatable) Status of Operations Insights for this Autonomous Database. Values supported are ENABLED and NOT_ENABLED + * __db_database_management_status__ - Status of Database Management for this Autonomous Database. Values supported are ENABLED and NOT_ENABLED + +The Workshop Settings are: + +* Parameters: + * __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 + + +Below is an example: + +``` + +variable "db_name" { + type = string + default = "MovieStreamWorkshop" +} + +variable "db_password" { + type = string + default = "" +} + +variable "db_compute_model" { + type = string + default = "ECPU" +} + +variable "db_compute_count" { + type = number + default = 4 +} + +variable "db_size_in_tbs" { + type = number + default = 1 +} + +variable "db_workload" { + type = string + default = "DW" +} + +variable "db_version" { + type = string + default = "19c" +} + +variable "db_enable_auto_scaling" { + type = bool + default = false +} + +variable "db_is_free_tier" { + type = bool + default = false +} + +variable "db_license_model" { + type = string + default = "LICENSE_INCLUDED" +} + +variable "db_data_safe_status" { + type = string + default = "NOT_REGISTERED" + # default = "REGISTERED" +} + +variable "db_operations_insights_status" { + type = string + default = "NOT_ENABLED" + # default = "ENABLED" +} + +variable "db_database_management_status" { + type = string + default = "NOT_ENABLED" + # default = "ENABLED" +} + +# Workshop Settings + +variable "tag" { + type = string + default = "gen-ai" +} + +variable "run_post_load_procedures" { + type = bool + default = true +} +``` + +## Running the code + +``` +# Run init to get terraform modules +$ terraform init + +# Create the infrastructure +$ terraform apply --auto-approve + +# If you are done with this infrastructure, take it down +$ terraform destroy --auto-approve +``` + +## What to do after the Deployment via Terraform CLI +---------------- + +- After the solution was deployed successfully from Terraform CLI you will have some outputs on the screen. + +Example of output: + +``` +Apply complete! Resources: 5 added, 0 changed, 0 destroyed. +Outputs: +ADW_Database_db_connection = tolist([ + { + "all_connection_strings" = tomap({ + "HIGH" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_high.adb.oraclecloud.com" + "LOW" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_low.adb.oraclecloud.com" + "MEDIUM" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_medium.adb.oraclecloud.com" + }) + "dedicated" = "" + "high" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_high.adb.oraclecloud.com" + "low" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_low.adb.oraclecloud.com" + "medium" = "adb.us-ashburn-1.oraclecloud.com:1522/rddainsuh6u1okc_moviestreamworkshopg_medium.adb.oraclecloud.com" + "profiles" = tolist([ + { + "consumer_group" = "HIGH" + "display_name" = "moviestreamworkshopg_high" + "host_format" = "FQDN" + "protocol" = "TCPS" + "session_mode" = "DIRECT" + "syntax_format" = "LONG" + "tls_authentication" = "MUTUAL" + "value" = "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=rddainsuh6u1okc_moviestreamworkshopg_high.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" + }, + { + "consumer_group" = "LOW" + "display_name" = "moviestreamworkshopg_low" + "host_format" = "FQDN" + "protocol" = "TCPS" + "session_mode" = "DIRECT" + "syntax_format" = "LONG" + "tls_authentication" = "MUTUAL" + "value" = "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=rddainsuh6u1okc_moviestreamworkshopg_low.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" + }, + { + "consumer_group" = "MEDIUM" + "display_name" = "moviestreamworkshopg_medium" + "host_format" = "FQDN" + "protocol" = "TCPS" + "session_mode" = "DIRECT" + "syntax_format" = "LONG" + "tls_authentication" = "MUTUAL" + "value" = "(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-ashburn-1.oraclecloud.com))(connect_data=(service_name=rddainsuh6u1okc_moviestreamworkshopg_medium.adb.oraclecloud.com))(security=(ssl_server_dn_match=yes)))" + }, + ]) + }, +]) +Database_Actions = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer", +] +adb_admin_password = +adb_user_name = "MOVIESTREAM" +adb_user_password = "****************" +apex_url = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/ords/apex", +] +database_fully_qualified_name = "rddainsuh6u1okc-moviestreamworkshopg.adb.us-ashburn-1.oraclecloudapps.com" +graph_studio_url = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/", +] +machine_learning_user_management_url = [ + "https://RDDAINSUH6U1OKC-MOVIESTREAMWORKSHOPG.adb.us-ashburn-1.oraclecloudapps.com/omlusers/", +] +select_ai_demo_url = "https://rddainsuh6u1okc-moviestreamworkshopg.adb.us-ashburn-1.oraclecloudapps.com/ords/r/moviestream/chatdb" + +``` + +## Oracle MovieStream demonstration deployment + +This stack installs everything required to run the Oracle MovieStream Live Lab. Now you can follow the steps for the MovieStream Live lab 7 from https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=889&p210_wec=&session=112456050571777 + +You can find details for connecting to these services in the Stack's Job Details Output. + +## Connect to Autonomous Database +Go to Autonomous Database in the OCI console. The default name given to the database instance is: **OracleMovieStream**. You specified the ADMIN password when deploying the Oracle MovieStream stack. + +A database user was created during the deployment. You can connect as that user to look at the database schema, use analytic features, etc. + +* User: `MOVIESTREAM`, Password: `watchS0meMovies#` +* User: `ADMIN`, Password: `WlsAtpDb1234#` + +Please change these passwords after deployment. + +## Using database tools and applications + +All of the Autonomous Database tools are available to you, including SQL worksheet, Data Studio, Machine Learning and Graph notebooks, etc. Go to Database Actions to access these tools. + +* **Database Actions:** Load, explore, transform, model, and catalog your data. Use an SQL worksheet, build REST interfaces and low-code apps, manage users and connections, build and apply machine learning models. + +Access Link is the graph_studio_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer + + +* **Graph Studio:** Oracle Graph Studio lets you create scalable property graph databases. Graph Studio automates the creation of graph models and in-memory graphs from database tables. It includes notebooks and developer APIs that allow you to execute graph queries using PGQL (an SQL-like graph query language) and over 50 built-in graph algorithms. Graph Studio also offers dozens of visualization, including native graph visualization. + +Access Link is the graph_studio_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/graphstudio/ + + +* **Application Express:** Oracle Application Express (APEX) is a low-code development platform that enables you to build scalable, secure enterprise apps that can be deployed anywhere. + +Access Link is the graph_studio_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer + + +* **Oracle Machine Learning User Notebooks:** Oracle Machine Learning notebooks provide easy access to Oracle's parallelized, scalable in-database implementations of a library of Oracle Advanced Analytics' machine learning algorithms (classification, regression, anomaly detection, clustering, associations, attribute importance, feature extraction, times series, etc.), SQL, PL/SQL and Oracle's statistical and analytical SQL functions. + +The stack's job output also includes URLs that take you directly to the tools. + +Access Link is the machine_learning_user_management_url URL from the output. Example: +https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/omlusers/ + + +## Documentation + +[Autonomous Databases Overview](https://docs.oracle.com/en-us/iaas/Content/Database/Concepts/adboverview.htm) + +[Terraform Autonomous Databases Resource](https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/database_autonomous_database) + + +## The Team +- **Owners**: [Panaitescu Ionel](https://github.com/ionelpanaitescu) , [Marty Gubar](https://github.com/martygubar) + +## Feedback +We welcome your feedback. To post feedback, submit feature ideas or report bugs, please use the Issues section on this repository. + +## Known Issues +**At the moment, there are no known issues for this solution** + + diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/locals.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/locals.tf new file mode 100644 index 0000000..ee33bd4 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/locals.tf @@ -0,0 +1,66 @@ +# 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" { + compartment_id = var.tenancy_ocid +} + +data "oci_identity_tenancy" "tenancy" { + tenancy_id = var.tenancy_ocid +} + +data "template_file" "ad_names" { + count = length(data.oci_identity_availability_domains.ADs.availability_domains) + template = lookup(data.oci_identity_availability_domains.ADs.availability_domains[count.index], "name") +} + +data "oci_core_services" "sgw_services" { + filter { + name = "cidr_block" + values = ["all-.*-services-in-oracle-services-network"] + regex = true + } +} + +data "oci_identity_region_subscriptions" "home_region_subscriptions" { + tenancy_id = var.tenancy_ocid + + filter { + name = "is_home_region" + values = [true] + } +} + +locals{ + ad_names = compact(data.template_file.ad_names.*.rendered) + conn_db = module.adb.db_connection[0].profiles[1].value + +# Create Autonomous Data Warehouse + adw_params = { + adw = { + compartment_id = var.compartment_id + compute_model = var.db_compute_model + compute_count = var.db_compute_count + size_in_tbs = var.db_size_in_tbs + db_name = var.db_name + db_workload = var.db_workload + db_version = var.db_version + enable_auto_scaling = var.db_enable_auto_scaling + is_free_tier = var.db_is_free_tier + license_model = var.db_license_model + create_local_wallet = true + database_admin_password = var.db_password + database_wallet_password = var.db_password + data_safe_status = var.db_data_safe_status + operations_insights_status = var.db_operations_insights_status + database_management_status = var.db_database_management_status + is_mtls_connection_required = null + subnet_id = null + nsg_ids = null + defined_tags = {} + }, +} + +# End + +} diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/main.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/main.tf new file mode 100644 index 0000000..29b55b3 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/main.tf @@ -0,0 +1,8 @@ +# 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 +module "adb" { + source = "./modules/cloud-foundation-library/database/adb" + adw_params = local.adw_params +} \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/main.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/main.tf new file mode 100644 index 0000000..547572e --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/main.tf @@ -0,0 +1,42 @@ +# 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 { + adw_download_wallet = { for key, value in var.adw_params : key => value if value.create_local_wallet == true } +} + +resource "oci_database_autonomous_database_wallet" "autonomous_database_wallet" { + for_each = var.adw_params + autonomous_database_id = oci_database_autonomous_database.adw[each.key].id + password = each.value.database_wallet_password + base64_encode_content = "true" +} + +resource "local_file" "autonomous_data_warehouse_wallet_file" { + for_each = local.adw_download_wallet + content_base64 = oci_database_autonomous_database_wallet.autonomous_database_wallet[each.key].content + filename = "${path.cwd}/wallet_${each.value.db_name}.zip" +} + +resource "oci_database_autonomous_database" "adw" { + for_each = var.adw_params + admin_password = each.value.database_admin_password + compartment_id = each.value.compartment_id + compute_model = each.value.compute_model + compute_count = each.value.compute_count + data_storage_size_in_tbs = each.value.size_in_tbs + db_name = each.value.db_name + display_name = each.value.db_name + db_workload = each.value.db_workload + db_version = each.value.db_version + license_model = each.value.license_model + is_mtls_connection_required = each.value.is_mtls_connection_required + subnet_id = each.value.subnet_id + nsg_ids = each.value.nsg_ids + defined_tags = each.value.defined_tags + is_auto_scaling_enabled = each.value.enable_auto_scaling + is_free_tier = each.value.is_free_tier + data_safe_status = each.value.data_safe_status + operations_insights_status = each.value.operations_insights_status + database_management_status = each.value.database_management_status +} diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/outputs.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/outputs.tf new file mode 100644 index 0000000..05a8498 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/outputs.tf @@ -0,0 +1,64 @@ +# 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" { + value = { + for adw in oci_database_autonomous_database.adw: + adw.display_name => adw.id + } +} + +output "ad" { + value = { + for idx, ad in oci_database_autonomous_database.adw: + ad.db_name => { "connection_strings" : ad.connection_strings.0.all_connection_strings} + } +} + +output "db_connection" { + value = one([ for b in oci_database_autonomous_database.adw : b.connection_strings]) +} + +output "private_endpoint_ip" { + value = one([for b in oci_database_autonomous_database.adw : b.private_endpoint_ip]) +} + +output "private_endpoint" { + value = ([for b in oci_database_autonomous_database.adw : b.private_endpoint]) +} + +output "url" { + value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.sql_dev_web_url] +} + +output "graph_studio_url" { + value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.graph_studio_url] +} + +output "machine_learning_user_management_url" { + value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.machine_learning_user_management_url] +} + +output "adb_wallet_content" { +value = oci_database_autonomous_database_wallet.autonomous_database_wallet["adw"].content +} + +output "database_fully_qualified_name" { + value = lower(trimsuffix(trimprefix(join("\n", [for b in oci_database_autonomous_database.adw : b.connection_urls.0.graph_studio_url]), "https://"), "/graphstudio/")) +} + +output "adw" { + value = { + for adw in oci_database_autonomous_database.adw: + adw.display_name => adw.id + } +} + +output "apex_url" { + value = [for b in oci_database_autonomous_database.adw : b.connection_urls.0.apex_url] +} + +output "select_ai_demo_url" { + value = join("", [lower(trimsuffix(join("\n", [for b in oci_database_autonomous_database.adw : b.connection_urls.0.graph_studio_url]), "/graphstudio/")),"/ords/r/moviestream/chatdb"]) +} + diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/variables.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/variables.tf new file mode 100644 index 0000000..e134afa --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/modules/cloud-foundation-library/database/adb/variables.tf @@ -0,0 +1,27 @@ +# 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" { + type = map(object({ + compartment_id = string + compute_model = string + compute_count = number + size_in_tbs = number + db_name = string + db_workload = string + db_version = string + license_model = string + database_admin_password = string + database_wallet_password = string + enable_auto_scaling = bool + is_free_tier = bool + create_local_wallet = bool + is_mtls_connection_required = bool + subnet_id = string + data_safe_status = string + operations_insights_status = string + database_management_status = string + nsg_ids = list(string) + defined_tags = map(string) + })) +} diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/outputs.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/outputs.tf new file mode 100644 index 0000000..0e76925 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/outputs.tf @@ -0,0 +1,52 @@ +# 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: + +output "adb_admin_password" { + description = "ADB Admin password" + value = var.db_password + sensitive = true +} + +output "adb_user_name" { + description = "Workshop user name" + value = "MOVIESTREAM" +} + +output "adb_user_password" { + description = "Workshop user initial password" + value = "watchS0meMovies#" +} + +output "ADW_Database_db_connection" { + value = module.adb.db_connection +} + +output "database_fully_qualified_name" { + value = module.adb.database_fully_qualified_name +} + +output "ADW_Database_ip" { + value = module.adb.private_endpoint_ip +} + +output "Database_Actions" { + value = module.adb.url +} + +output "graph_studio_url" { + value = module.adb.graph_studio_url +} + +output "machine_learning_user_management_url" { + value = module.adb.machine_learning_user_management_url +} + +output "apex_url" { + value = module.adb.apex_url +} + +output "select_ai_demo_url" { + value = module.adb.select_ai_demo_url +} diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provider.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provider.tf new file mode 100644 index 0000000..3daf300 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provider.tf @@ -0,0 +1,31 @@ +# 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 { + required_version = ">= 1.2.0" + required_providers { + oci = { + source = "oracle/oci" + version = ">= 5.9.0" + } + } +} + +provider "oci" { + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = var.region + disable_auto_retries = false +} + +provider "oci" { + alias = "homeregion" + tenancy_ocid = var.tenancy_ocid + user_ocid = var.user_ocid + fingerprint = var.fingerprint + private_key_path = var.private_key_path + region = data.oci_identity_region_subscriptions.home_region_subscriptions.region_subscriptions[0].region_name + disable_auto_retries = false +} \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provisioners.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provisioners.tf new file mode 100644 index 0000000..44c13c1 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/provisioners.tf @@ -0,0 +1,36 @@ +# 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" { + + provisioner "local-exec" { + command = <<-EOT + + echo 'Download the apex applications' + chmod 777 ./scripts/ + wget https://objectstorage.us-ashburn-1.oraclecloud.com/p/JnW5Gl5btrPK_vx66MqWktIB_GKmdEkosRDcehPvc5hTGheJdD41pq2PmsBbdUUU/n/c4u04/b/building_blocks_utilities/o/select-ai-apex-demo/f101.sql -P ./scripts/ + wget https://objectstorage.us-ashburn-1.oraclecloud.com/p/JnW5Gl5btrPK_vx66MqWktIB_GKmdEkosRDcehPvc5hTGheJdD41pq2PmsBbdUUU/n/c4u04/b/building_blocks_utilities/o/select-ai-apex-demo/f100-genai-project.sql -P ./scripts/ + + # install the data + + sql -cloudconfig wallet_${var.db_name}.zip admin/${var.db_password}@'${local.conn_db}' @./scripts/init.sql + + echo 'Start running install-apex-workspace.sql script' + sql -cloudconfig wallet_${var.db_name}.zip admin/${var.db_password}@'${local.conn_db}' @./scripts/install-apex-workspace.sql + + echo 'Start running tables.sql script to install data sets' + sql -cloudconfig wallet_${var.db_name}.zip moviestream/watchS0meMovies#@'${local.conn_db}' @./tables.sql + + echo 'Start running install-apex-app.sql script to install the apex app' + sql -cloudconfig wallet_${var.db_name}.zip moviestream/watchS0meMovies#@'${local.conn_db}' @./scripts/install-apex-app.sql + + rm -rf tables.sql + EOT + } +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" +} \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/schema.yaml b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/schema.yaml new file mode 100644 index 0000000..08ee88a --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/schema.yaml @@ -0,0 +1,293 @@ +# Copyright © 2024, 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" +stackDescription: "Creates an ADB with MovieStream data plus the ChatDB APEX demo app" +schemaVersion: 1.1.0 +version: "20230112" +locale: "en" +groupings: + - title: "General Settings" + visible: true + variables: + - tenancy_ocid + - region + - compartment_id + - display_name_prefix + - title: "Autonomous Database Configuration" + variables: + - db_name + - db_is_free_tier + - db_license_model + - db_password + - 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: + - tag + - run_post_load_procedures + - title: "Hidden Variables" + visible: false + variables: + - user_ocid + - fingerprint + - private_key_path +# General Configuration Variables +variables: + tenancy_ocid: + title: Tenancy ID + description: The Oracle Cloud Identifier (OCID) for your tenancy. + type: string + required: true + visible: false + region: + title: Region + description: Select Region where all resources will be created. + type: oci:identity:region:name + required: true + visible: true + compartment_id: + title: Compartment + description: Choose the compartment where all resources will be provisioned. + type: oci:identity:compartment:id + required: true + visible: true + display_name_prefix: + title: Display Name Prefix + type: string + default: "Oracle MovieStream" + description: Enter the Display name for the solution. + required: true + visible: true +# Autonomous Database Configuration Variables + db_name: + title: Database Name + description: "Provide Database name. Constraints: 12 alphanumeric characters only. No Spaces." + required: true + type: string + maxLength: 30 + db_is_free_tier: + title: Do do want a always Free Oracle Autonomous Database instance? + description: "Provision Always Free Oracle Autonomous Database instance (20 GB Storage)?" + type: enum + enum: + - "true" + - "false" + default: "false" + required: true + visible: true + db_license_model: + title: "Provision Paid Oracle Autonomous Database instance (4 ECPUs 1 TB Storage) - License Included or BYOL?" + description: "Note: This configuration can be changed later from the OCI console." + type: enum + enum: + - LICENSE_INCLUDED + - BRING_YOUR_OWN_LICENSE + default: LICENSE_INCLUDED + required: true + visible: + eq: + - db_is_free_tier + - false + db_password: + 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 + required: true + confirmation: true + pattern: ((?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?!.*[%!@^&)(]).{12,20}) + db_version: + title: "A valid Oracle Database version for Autonomous Database" + description: "A valid Oracle Database version for Autonomous Database" + type: enum + enum: + - "19c" + - "23ai" + default: "19c" + required: true + visible: true + db_size_in_tbs: + title: "The quantity of data in the database, in terabytes." + description: "The quantity of data in the database, in terabytes." + type: enum + enum: + - 1 + - 2 + - 4 + - 6 + - 8 + - 10 + - 12 + - 16 + - 24 + - 36 + - 52 + - 128 + default: 1 + required: true + visible: + eq: + - db_is_free_tier + - false + db_enable_auto_scaling: + title: Indicates if auto scaling is enabled for the Autonomous Database CPU core count. + description: "Indicates if auto scaling is enabled for the Autonomous Database CPU core count. " + type: enum + enum: + - true + - false + default: false + required: true + visible: + 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" + type: string + default: 4 + required: true + visible: + eq: + - db_is_free_tier + - false + db_workload: + title: Autonomous Database Type of workload. + description: "Autonomous Database Type of workload." + type: enum + enum: + - "DW" + default: "DW" + required: true + visible: false + db_data_safe_status: + title: "Status of the Data Safe registration for this Autonomous Database" + description: "Status of the Data Safe registration for this Autonomous Database. Could be REGISTERED or NOT_REGISTERED." + type: enum + enum: + - "NOT_REGISTERED" + - "REGISTERED" + default: "NOT_REGISTERED" + required: true + visible: true + db_database_management_status: + title: "Status of Database Management for this Autonomous Database" + description: "Status of Database Management for this Autonomous Database. Values supported are ENABLED and NOT_ENABLED" + type: enum + enum: + - "NOT_ENABLED" + - "ENABLED" + default: "NOT_ENABLED" + required: true + visible: true + db_operations_insights_status: + title: "Status of Operations Insights for this Autonomous Database" + description: "Status of Operations Insights for this Autonomous Database. Values supported are ENABLED and NOT_ENABLED" + type: enum + enum: + - "NOT_ENABLED" + - "ENABLED" + default: "NOT_ENABLED" + required: true + visible: true +# Workshop Settings + tag: + title: Pick the datasets to load. + description: "Pick one from below" + type: enum + enum: + - "gen-ai" + default: "gen-ai" + required: true + visible: true + run_post_load_procedures: + title: Run procedures after loading data + description: "Pick one from below" + type: enum + enum: + - true + - false + default: true + required: true + visible: true +outputs: + ADW_Database_db_connection: + type: string + title: ADW_Database_db_connection + visible: true + ADW_Database_private_endpoint_ip: + type: string + title: ADW_Database_private_endpoint_ip + visible: true + Database_Actions: + type: link + title: url + visible: true + database_fully_qualified_name: + type: string + title: database_fully_qualified_name + visible: true + graph_studio_url: + type: link + title: graph_studio_url + visible: false + machine_learning_user_management_url: + type: link + title: machine_learning_user_management_url + visible: true + apex_url: + type: link + title: apex_url + visible: true + select_ai_demo_url: + type: link + title: select_ai_demo_url + visible: true + adb_admin_password: + type: string + title: adb_admin_password + visible: false + adb_user_name: + type: string + title: adb_user_name + visible: true + adb_user_password: + type: string + title: adb_user_password + visible: true +outputGroups: + - title: Database details + outputs: + - ADW_Database_db_connection + - ADW_Database_private_endpoint_ip + - database_fully_qualified_name + - title: ADB user details + outputs: + - Database_Actions + - apex_url + - graph_studio_url + - machine_learning_user_management_url + - adb_user_name + - adb_user_password +primaryOutputButton: graph_studio_url + diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/init.sql b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/init.sql new file mode 100644 index 0000000..f097cdf --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/init.sql @@ -0,0 +1,34 @@ +-- **Copyright © 2024, 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. + + +-- **To install the database objects required for the demo. Connect to ADB as ADMIN:** + +declare + l_uri varchar2(500) := 'https://objectstorage.us-ashburn-1.oraclecloud.com/n/c4u04/b/building_blocks_utilities/o/setup/workshop-setup.sql'; +begin + dbms_cloud_repo.install_sql( + content => to_clob(dbms_cloud.get_object(object_uri => l_uri)) + ); +end; +/ + +-- Add the MOVIESTREAM user +begin + workshop.write('Begin demo install'); + workshop.write('add user MOVIESTREAM', 1); + workshop.add_adb_user('MOVIESTREAM','watchS0meMovies#'); + + ords_admin.enable_schema ( + p_enabled => TRUE, + p_schema => 'MOVIESTREAM', + p_url_mapping_type => 'BASE_PATH', + p_auto_rest_auth => TRUE + ); + + -- Allow MOVIESTREAM to use the resource principal + dbms_cloud_admin.enable_resource_principal(username => 'MOVIESTREAM'); + +end; +/ + diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-app.sql b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-app.sql new file mode 100644 index 0000000..b828912 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-app.sql @@ -0,0 +1,69 @@ +-- as moviestream +-- Chat ADB app +BEGIN + admin.workshop.write('setup for app install as moviestream', 2); + + -- Set the name of the workspace in which the app needs to be installed + apex_application_install.set_workspace('MOVIESTREAM'); + + -- Setting the application id to 101 + apex_application_install.set_application_id(101); + apex_application_install.generate_offset(); + + -- Setting the Schema + apex_application_install.set_schema('MOVIESTREAM'); + + -- Setting application alias + apex_application_install.set_application_alias('CHATDB'); + + -- Set Auto Install Supporting Objects + apex_application_install.set_auto_install_sup_obj( p_auto_install_sup_obj => true ); + +END; +/ +@./scripts/f101.sql + +-- GenAI Projects App +BEGIN + -- Setting the application id to 100 + apex_application_install.set_application_id(100); + apex_application_install.generate_offset(); + + -- Setting application alias + apex_application_install.set_application_alias('GENAI-PROJECTS'); + + -- Set Auto Install Supporting Objects + apex_application_install.set_auto_install_sup_obj( p_auto_install_sup_obj => true ); +END; +/ +@./scripts/f100-genai-project.sql + +-- Setup Select AI. Create 2 profiles. One for chat and the other for GenAI projects +begin + admin.workshop.write('Setup ai profile for chat', 2); + + -- Chat + dbms_cloud_ai.drop_profile( + profile_name => 'genai', + force => true + ); + + dbms_cloud_ai.create_profile( + profile_name => 'genai', + attributes => + '{"provider": "oci", + "credential_name": "OCI$RESOURCE_PRINCIPAL", + "comments":"true", + "object_list": [ + {"owner": "MOVIESTREAM", "name": "GENRE"}, + {"owner": "MOVIESTREAM", "name": "CUSTOMER"}, + {"owner": "MOVIESTREAM", "name": "PIZZA_SHOP"}, + {"owner": "MOVIESTREAM", "name": "STREAMS"}, + {"owner": "MOVIESTREAM", "name": "MOVIES"}, + {"owner": "MOVIESTREAM", "name": "ACTORS"} + ] + }' + ); + +end; +/ \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-workspace.sql b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-workspace.sql new file mode 100644 index 0000000..974cc82 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/install-apex-workspace.sql @@ -0,0 +1,31 @@ +-- download the app using wget: +-- wget https://martygubar.github.io/adb/shared/adb-speaks-human/apex-setup/f101.sql + +-- as admin +DECLARE + l_workspace_name VARCHAR2(100) := 'MOVIESTREAM'; + l_schema_name VARCHAR2(100) := 'MOVIESTREAM'; + l_workspace_usr_pwd VARCHAR2(100) := 'watchS0meMovies#'; +begin + admin.workshop.write('install APEX workspace', 1); + admin.workshop.write('add workspace as admin', 2); + apex_instance_admin.add_workspace( + p_workspace_id => null, + p_workspace => l_workspace_name, + p_primary_schema => l_schema_name); + + -- We must set the APEX workspace security group ID in our session before we can call create_user + apex_util.set_security_group_id( apex_util.find_security_group_id( p_workspace => l_workspace_name)); + apex_util.create_user( + p_user_name => 'MOVIESTREAM', + p_email_address => 'admin@o.com', + p_default_schema => l_schema_name, + p_allow_access_to_schemas => l_schema_name, + p_web_password => l_workspace_usr_pwd, + p_change_password_on_first_use => 'N', + p_developer_privs => 'ADMIN:CREATE:DATA_LOADER:EDIT:HELP:MONITOR:SQL' ); -- workspace administrator + + + commit; +end; +/ \ No newline at end of file diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/tables.sql.tmpl b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/tables.sql.tmpl new file mode 100644 index 0000000..e55ea76 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/scripts/tables.sql.tmpl @@ -0,0 +1,16 @@ +-- **Copyright © 2024, 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 + -- Connect as the MOVIESTREAM user + + begin + workshop.add_dataset + ( + tag => '${tag}', + run_post_load_procedures => ${run_post_load_procedures} + ); + + end; + / + diff --git a/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/variables.tf b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/variables.tf new file mode 100644 index 0000000..0b7b446 --- /dev/null +++ b/cloud-foundation/solutions/Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration/variables.tf @@ -0,0 +1,119 @@ +# Copyright © 2024, 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 { + required_version = ">= 0.15.0" +} + +variable "tenancy_ocid" { + type = string + default = "" +} + +variable "region" { + type = string + # default = "" +} + +variable "compartment_id" { + type = string + # default = "" +} + +variable "user_ocid" { + type = string + default = "" +} + +variable "fingerprint" { + type = string + default = "" +} + +variable "private_key_path" { + type = string + default = "" +} + +# ADW Database Variables: + +variable "db_name" { + type = string + default = "MovieStreamWorkshop" +} + +variable "db_password" { + type = string + default = "" +} + +variable "db_compute_model" { + type = string + default = "ECPU" +} + +variable "db_compute_count" { + type = number + default = 4 +} + +variable "db_size_in_tbs" { + type = number + default = 1 +} + +variable "db_workload" { + type = string + default = "DW" +} + +variable "db_version" { + type = string + default = "19c" +} + +variable "db_enable_auto_scaling" { + type = bool + default = false +} + +variable "db_is_free_tier" { + type = bool + default = false +} + +variable "db_license_model" { + type = string + default = "LICENSE_INCLUDED" +} + +variable "db_data_safe_status" { + type = string + default = "NOT_REGISTERED" + # default = "REGISTERED" +} + +variable "db_operations_insights_status" { + type = string + default = "NOT_ENABLED" + # default = "ENABLED" +} + +variable "db_database_management_status" { + type = string + default = "NOT_ENABLED" + # default = "ENABLED" +} + +# Workshop Settings + +variable "tag" { + type = string + default = "gen-ai" +} + +variable "run_post_load_procedures" { + type = bool + default = true +} \ No newline at end of file diff --git a/cloud-foundation/solutions/README.md b/cloud-foundation/solutions/README.md index 0ef1ddb..3e75fd9 100644 --- a/cloud-foundation/solutions/README.md +++ b/cloud-foundation/solutions/README.md @@ -2,7 +2,18 @@ ## Overview -For the moment we have implemented the following solutions: +Solutions implemented: + +DEMOS and AI: + +- Telco-Asset_Value_Maximization - Data in Industry - VERTICAL DEMO - (https://mysites.oracle.com/db-outbound/ai-and-ml---the-art-of-possible/ai-and-ml-demos-and-examples.html) +- PublicSector-Crowd_Counting - Data in Industry - VERTICAL DEMO - (https://mysites.oracle.com/db-outbound/ai-and-ml---the-art-of-possible/ai-and-ml-demos-and-examples.html) + - OracleDataModel-Manufacturing - Data in Industry - VERTICAL DEMO - (https://mysites.oracle.com/Data-In-Industry/) +- Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration +- Deploy-ChatDB-Autonomous-Database-oci-genai-demonstration + +Architecture Center: + - Data platform - data lakehouse - Data platform - departmental data warehouse for line of business (LOB) - Data platform - data warehouse with e-business integration @@ -19,11 +30,17 @@ For the moment we have implemented the following solutions: - Machine learning platform on Autonomous Data Warehouse - Modern data warehousing a polyglot integration example - ATP Deployment -- OCI-Observability-Solution-Level1 -- OCI-Observability-Solution-Level2 -- OCI-Observability-Hybrid-Configurations-monitoring-on-prem-DBs-from-the-cloud - S3_tfstate_backend_cloud_foundation_automation - Sam-Workbench + + +Exadata: + - Deploy-Exadata-Database-Service-with-cross-region-Data-Guard - Deploy-Exadata-Database-Service-with-in-region-Data-Guard -- Deploy-ChatDB-Autonomous-Database-Select-AI-demonstration \ No newline at end of file + + +Monitoring: +- OCI-Observability-Solution-Level1 +- OCI-Observability-Solution-Level2 +- OCI-Observability-Hybrid-Configurations-monitoring-on-prem-DBs-from-the-cloud \ No newline at end of file