Skip to content

Commit aab596a

Browse files
upgrading the Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs solution
1 parent 1390e5f commit aab596a

File tree

7 files changed

+67
-45
lines changed

7 files changed

+67
-45
lines changed

cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs/README.md

Lines changed: 48 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Oracle Cloud Foundation Terraform Solution - Deploy Autonomous Database and the MovieStream data sets for Oracle LiveLabs
1+
# Oracle Cloud Foundation Terraform Solution - Oracle MovieStream for LiveLabs - Use graph analytics to recommend movies
22

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

@@ -21,9 +21,33 @@
2121
## <a name="overview"></a>Overview
2222
----------------
2323

24-
This script is used to help you quickly get started with Oracle LiveLabs. It will deploy an Oracle Autonomous Database, create a user (named MOVIESTREAM) and then install data sets into the MOVIESTREAM schema. It is used by numerous Oracle LiveLabs as a prerequisite step.
24+
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**
2525

26-
For example, a graph workshop wants to focus on graph features - not necessarily on deploying an Autonomous Database instance and loading data sets (although this is easy to do!). Workshop owners can simply provide students with a URL that will take them to Oracle Cloud's Resource Manager. The student will then fill out a few fields that describe: 1) where to deploy the database, 2) a password for the admin user, 3) a name for the database, and 4) the data sets to install. After clicking apply, the complete environment will be available to use in just a few minutes.
26+
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.
27+
28+
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#).
29+
30+
31+
About graph
32+
33+
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).
34+
35+
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.
36+
37+
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.
38+
39+
Objectives
40+
41+
In this lab, you will use the Graph Studio feature of Autonomous Database to:
42+
43+
Use a notebook
44+
Run a few PGQL graph queries
45+
Use python to run Personalized SALSA from the algorithm library
46+
Query and save the recommendations
47+
48+
49+
50+
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.
2751

2852

2953
## <a name="deliverables"></a>Deliverables
@@ -35,15 +59,12 @@ For example, a graph workshop wants to focus on graph features - not necessarily
3559

3660
## <a name="architecture"></a>Architecture-Diagram
3761
----------------
38-
Oracle MovieStream is a fictitious on-line movie streaming company. It's business scenario is used to highlight how to develop intelligent applications using OCI and Oracle Autonomous Database. Let's take a look two key components of MovieStream's architecture.
3962

40-
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.
63+
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.
4164

4265

4366
![](https://oracle-livelabs.github.io/adb/movie-stream-story-lite/introduction/images/architecture.png)
4467

45-
For the workshop, the data is stored in a data lake in the Oracle LiveLabs tenancy. This script will deploy the Autonomous Database and load data from that data lake.
46-
4768

4869
## <a name="instructions"></a>Executing Instructions
4970
----------------
@@ -56,10 +77,10 @@ If you don't have the required permissions and quota, contact your tenancy admin
5677

5778
# <a name="Deploy-Using-Oracle-Resource-Manager"></a>Deploy Using Oracle Resource Manager
5879

59-
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/MovieStream_live_lab-RM.zip&zipUrlVariables={"tag":"graph-get-started","run_post_load_procedures":"true","db_name":"adblivelab"})
80+
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-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs-RM.zip)
6081

6182

62-
If you aren't already signed in, when prompted, enter the tenancy and user credentials. You'll notice that the URL contains overridden defaults for a few of the variables (e.g. "tag" and "db_name"). Change or remove these variables as you see fit.
83+
If you aren't already signed in, when prompted, enter the tenancy and user credentials.
6384

6485
2. Review and accept the terms and conditions.
6586
3. Select the region where you want to deploy the stack.
@@ -72,9 +93,9 @@ If you don't have the required permissions and quota, contact your tenancy admin
7293
## <a name="After-Deployment-via-Resource-Manager"></a>What to do after the Deployment via Resource Manager
7394
----------------
7495

75-
After the solution is deployed successfully from Terraform CLI you will have some outputs on the screen.
96+
- After the solution was deployed successfully from Terraform CLI you will have some outputs on the screen.
7697

77-
**Example of output:**
98+
Example of output:
7899

79100
```
80101
Apply complete! Resources: 5 added, 0 changed, 0 destroyed.
@@ -131,11 +152,11 @@ Database_Actions = [
131152
]
132153
adb_admin_password = "WlsAtpDb1234#"
133154
database_fully_qualified_name = "sz5km3vsrs3lie5-moviestreamlabseven.adb.eu-amsterdam-1.oraclecloudapps.com"
134-
graph_password = "watchS0meMovies#"
155+
adb_user_password = "watchS0meMovies#"
135156
graph_studio_url = [
136157
"https://SZ5KM3VSRS3LIE5-MOVIESTREAMLABSEVEN.adb.eu-amsterdam-1.oraclecloudapps.com/graphstudio/",
137158
]
138-
graph_username = "MOVIESTREAM"
159+
adb_user_name = "MOVIESTREAM"
139160
machine_learning_user_management_url = [
140161
"https://SZ5KM3VSRS3LIE5-MOVIESTREAMLABSEVEN.adb.eu-amsterdam-1.oraclecloudapps.com/omlusers/",
141162
]
@@ -144,7 +165,7 @@ machine_learning_user_management_url = [
144165

145166
## Oracle MovieStream demonstration deployment
146167

147-
This stack installs everything required to run your Oracle MovieStream LiveLab. This may be your first step in a workshop. Or, in some cases, it may allow you to jump to a specific lab within a workshop. For example, the **Deploy to Oracle Cloud** link above allows you to jump directly to Lab 7 in the [Integrate, Analyze and Act on All data using Autonomous Database](https://apexapps.oracle.com/pls/apex/r/dbpm/livelabs/run-workshop?p210_wid=889&p210_wec=&session=112456050571777) workshop.
168+
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
148169

149170
You can find details for connecting to these services in the Stack's Job Details Output.
150171

@@ -156,13 +177,13 @@ A database user was created during the deployment. You can connect as that user
156177
* User: `MOVIESTREAM`, Password: `watchS0meMovies#`
157178
* User: `ADMIN`, Password: `WlsAtpDb1234#`
158179

159-
**Please change these passwords after deployment.**
180+
Please change these passwords after deployment.
160181

161182
## Using database tools and applications
162183

163-
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.
184+
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.
164185

165-
* **Database Actions:** Load, explore, transform, model, and catalog your data. Use run queries with the SQL worksheet, build REST interfaces and low-code apps, manage users and connections, load data from multiple sources, build and apply machine learning models, and more!
186+
* **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.
166187

167188
Access Link is the graph_studio_url URL from the output. Example:
168189
https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/ords/sql-developer
@@ -196,7 +217,7 @@ https://RDDAINSUH6U1OKC-ORACLEMOVIESTREAM.adb.us-ashburn-1.oraclecloudapps.com/o
196217
Now, you'll want a local copy of this repo. You can make that with the commands:
197218

198219
git clone https://github.com/oracle-devrel/terraform-oci-oracle-cloud-foundation.git
199-
cd terraform-oci-oracle-cloud-foundation/cloud-foundation/solutions/MovieStream_live_lab
220+
cd terraform-oci-oracle-cloud-foundation/cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs
200221
ls
201222

202223
## Deployment
@@ -285,7 +306,7 @@ You can also get the fingerprint from running the following command on your loca
285306

286307
#### **Getting the Region**
287308

288-
Even though, you may know your region name, you will need its identifier for the variables.tf file (for example, US East Ashburn has us-ashburn-1 as its identifier).
309+
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).
289310
In order to obtain your region identifier, you will need to Navigate in the OCI Console to Administration -> Region Management
290311
Select the region you are interested in, and save the region identifier.
291312

@@ -339,10 +360,10 @@ Also in the modules folder there is a folder called provisioner - that will prov
339360
* **outputs.tf** - Defines project's outputs that you will see after the code runs successfuly
340361
* **provider.tf** - The terraform provider that will be used (OCI)
341362
* **README.md** - This file
342-
* **schema.yaml** - Schema documents are recommended for Terraform configurations when using Resource Manager. 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.
363+
* **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.
343364
* **variables.tf** - Project's global variables
344365

345-
Secondly, populate the `terraform.tf` file with the desired configuration following the information:
366+
Secondly, populate the `terraform.tf` file with the disared configuration following the information:
346367

347368

348369
# Autonomous Data Warehouse
@@ -372,7 +393,7 @@ Below is an example:
372393
```
373394
variable "db_name" {
374395
type = string
375-
default = "MovieStreamlabseven"
396+
default = "MovieStreamWorkshop"
376397
}
377398
378399
variable "db_password" {
@@ -445,7 +466,7 @@ $ terraform destroy --auto-approve
445466
## <a name="After-Deployment-via-Terraform-CLI"></a>What to do after the Deployment via Terraform CLI
446467
----------------
447468

448-
- After the solution is deployed successfully from Terraform CLI, you will see screen output that describes your platform.
469+
- After the solution was deployed successfully from Terraform CLI you will have some outputs on the screen.
449470

450471
Example of output:
451472

@@ -504,20 +525,20 @@ Database_Actions = [
504525
]
505526
adb_admin_password = "WlsAtpDb1234#"
506527
database_fully_qualified_name = "sz5km3vsrs3lie5-moviestreamlabseven.adb.eu-amsterdam-1.oraclecloudapps.com"
507-
graph_password = "watchS0meMovies#"
528+
adb_user_password = "watchS0meMovies#"
508529
graph_studio_url = [
509530
"https://SZ5KM3VSRS3LIE5-MOVIESTREAMLABSEVEN.adb.eu-amsterdam-1.oraclecloudapps.com/graphstudio/",
510531
]
511-
graph_username = "MOVIESTREAM"
532+
adb_user_name = "MOVIESTREAM"
512533
machine_learning_user_management_url = [
513534
"https://SZ5KM3VSRS3LIE5-MOVIESTREAMLABSEVEN.adb.eu-amsterdam-1.oraclecloudapps.com/omlusers/",
514535
]
515536
516537
```
517538

518-
## Oracle MovieStream Autonomous Database deployment
539+
## Oracle MovieStream demonstration deployment
519540

520-
Now that your Autonomous Database is deployed and your required data sets are installed, you can now start on your workshop!
541+
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
521542

522543
You can find details for connecting to these services in the Stack's Job Details Output.
523544

cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs/main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
# Create ADW Database with Endpoint in private subnet or public ADW
55
module "adw_database_private_endpoint" {
66
source = "../../../cloud-foundation/modules/cloud-foundation-library/database/adw_private_endpoint"
7-
adw_params = local.adw_params
7+
adw_params = local.adw_params
88
}

cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs/outputs.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ output "adb_admin_password" {
77
value = "WlsAtpDb1234#"
88
}
99

10-
output "graph_username" {
10+
output "adb_user_name" {
1111
value = "MOVIESTREAM"
1212
}
1313

14-
output "graph_password" {
14+
output "adb_user__password" {
1515
value = "watchS0meMovies#"
1616
}
1717

cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs/provisioners.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ resource "null_resource" "sqlcl-create-usr" {
1313
./sqlcl/bin/sql -cloudconfig wallet_${var.db_name}.zip moviestream/watchS0meMovies#@'${local.conn_db}' @./tables.sql
1414
rm -rf sqlcl-21.4.1.17.1458.zip
1515
rm -rf sqlcl
16-
rm -rf tables.sql
16+
rm -rf tables.sql
1717
EOT
1818
}
1919

cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs/schema.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,8 @@ variables:
172172
enum:
173173
- "movieapp"
174174
- "graph-get-started"
175-
default: "graph-get-started"
175+
- "end-to-end"
176+
default: "end-to-end"
176177
required: true
177178
visible: true
178179
run_post_load_procedures:
@@ -182,7 +183,7 @@ variables:
182183
enum:
183184
- true
184185
- false
185-
default: false
186+
default: true
186187
required: true
187188
visible: true
188189
outputs:
@@ -214,27 +215,27 @@ outputs:
214215
type: string
215216
title: adb_admin_password
216217
visible: true
217-
graph_username:
218+
adb_user_name:
218219
type: string
219-
title: graph_username
220+
title: adb_user_name
220221
visible: true
221-
graph_password:
222+
adb_user_password:
222223
type: string
223-
title: graph_password
224+
title: adb_user_password
224225
visible: true
225226
outputGroups:
226227
- title: Database details
227228
outputs:
228229
- ADW_Database_db_connection
229230
- ADW_Database_private_endpoint_ip
230231
- database_fully_qualified_name
231-
- title: Graph details
232+
- title: ADB user details
232233
outputs:
233234
- Database_Actions
234235
- graph_studio_url
235236
- machine_learning_user_management_url
236237
- adb_admin_password
237-
- graph_username
238-
- graph_password
238+
- adb_user_name
239+
- adb_user_password
239240
primaryOutputButton: graph_studio_url
240241

cloud-foundation/solutions/Deploy-Autonomous-Database-and-the-MovieStream-data-sets-for-Oracle-LiveLabs/variables.tf

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ variable "private_key_path" {
4040

4141
variable "db_name" {
4242
type = string
43-
default = "MovieStreamlabseven"
43+
default = "MovieStreamWorkshop"
4444
}
4545

4646
variable "db_password" {
@@ -86,12 +86,12 @@ variable "db_license_model" {
8686

8787
variable "tag" {
8888
type = string
89-
default = "graph-get-started"
90-
# default = "movieapp"
89+
#default = "graph-get-started"
90+
default = "end-to-end"
9191
}
9292

9393
variable "run_post_load_procedures" {
9494
type = bool
95-
default = false
96-
# default = true
95+
#default = false
96+
default = true
9797
}

0 commit comments

Comments
 (0)