-
Notifications
You must be signed in to change notification settings - Fork 133
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LWMS ID: 11730 - Created and tested New Lab GenAI (#682)
* LWMS ID: 11730 - Created and tested New Lab GenAI LWMS ID: 11730 - Created and tested New Lab for GenAI Created and tested the following labs: Lab 1: Create a HeatWave instance Lab 2: Create a Compute instance Lab 3: Connect to the HeatWave Instance from Visual Studio Code Lab 4: Use HeatWave In-database LLM to Generate and Summarize Content Lab 5: Perform Retrieval Augmented Generation Lab 6: Build HeatWave RAG Chat Application * LWMS ID: 11730 - Updated flowchart image LWMS ID: 11730 - Updated flowchart image * LWMS ID: 11730 - Removed unused image LWMS ID: 11730 - Removed unused image * LWMS ID: 11730 - anacoman11 requested changes on this pull request. Hi @plforacle, please hide all private information from the images. Also, please replace the URL https://bit.ly/golivelabs from index.html with https://livelabs.oracle.com * LWMS ID: 11730 - Removed personal email address from image 3-profile.png Removed personal email address from image 3-profile.png * LWMS ID: 11730 Removed personal information from images Removed personal information from images
- Loading branch information
Showing
220 changed files
with
1,678 additions
and
0 deletions.
There are no files selected for viewing
161 changes: 161 additions & 0 deletions
161
heatwave-genai/connect-dbs-vscode/connect-dbs-vscode.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,161 @@ | ||
# Connect to the HeatWave Instance | ||
|
||
## Introduction | ||
|
||
In this lab you will setup MySQL Shell for Visual Studio Code, and connect to the HeatWave instance you created in Lab 1 from VS Code. | ||
|
||
_Estimated Time:_ 30 minutes | ||
|
||
### Objectives | ||
|
||
In this lab, you will be guided through the following tasks: | ||
|
||
- Setup MySQL Shell for Visual Studio Code. | ||
- Connect to the OCI tenancy. | ||
- Connect to the HeatWave instance. | ||
|
||
### Prerequisites | ||
|
||
- You have completed Lab 2. | ||
- Visual Studio Code is installed. If you do not have it installed, download and install from [here](https://code.visualstudio.com/download). | ||
|
||
## Task 1: Setup MySQL Shell for Visual Studio Code | ||
|
||
1. Launch **Visual Studio Code**. | ||
|
||
2. Click **Extensions** and search for **MySQL Shell for VS Code**. | ||
|
||
3. Click **Install**. | ||
![Installing MySQL Shell for VS Code](./images/1-installing-mysql-shell-for-vscode.png "Installing MySQL Shell for VS Code") | ||
|
||
4. After MySQL Shell for VS Code is installed, you can see the following icon: | ||
![MySQL Shell installed](./images/2-installed-mysql-shell-for-vscode.png "MySQL Shell installed") | ||
|
||
|
||
<!-- ## Task 2: Connect to the OCI tenancy | ||
Before you can get started, you must set up a DB Connection to the HeatWave instance on the Oracle Cloud Infrastructure (OCI). This has to be done once since MySQL Shell for VS Code will store all registered DB connections. | ||
1. On the right side of the OCI Console, click **Profile**, and select **My Profile**. | ||
![My profile](./images/3-profile.png "My profile") | ||
2. Under **Resources**, click **API keys**, and click **Add API key**. | ||
3. Click **Download private key**. | ||
1. Store the API key in a .oci folder inside your home directory. | ||
2. Rename the API key to oci\_api\_key.pem. | ||
```bash | ||
<copy>oci_api_key.pem</copy> | ||
``` | ||
![OCI API Key](./images/17-oci-api-key.png "OCI API Key") | ||
4. Switch to OCI Console, and in the **Add API key** panel, click **Add**. | ||
![Download private key](./images/4-add-api-key.png "Download private key") | ||
5. Copy the configuration file text and switch to VS Code. | ||
![Copy configuration file](./images/5-copy-config.png "Copy configuration file") | ||
6. In VS Code, select the **MySQL Shell for VS Code** extension. | ||
7. Click **Configure the OCI Profile List** in the **ORACLE CLOUD INFRASTRUCTURE** view, and paste the configuration file text into the config file. | ||
- Rename the top section from [DEFAULT] to the name of the tenancy, [TenancyName] | ||
- Update the path to the API Key you had stored in your home directory. | ||
![Save configuration file](./images/6-save-config.png "Save configuration file") | ||
8. Close the file and reload the **ORACLE CLOUD INFRASTRUCTURE** view. Within a couple of minutes, you can browse the resources of your OCI tenancy. | ||
![Tenancy details](./images/7-tenancy-details.png "Tenancy details") --> | ||
|
||
## Task 2: Connect to the HeatWave instance | ||
|
||
1. In Visual Studio Code, click the **MySQL Shell for VS Code** icon in the activity bar. | ||
|
||
2. Click **Create New DB Connection**. | ||
|
||
![Create New DB Connection](./images/connect-database.png "Create New DB Connection") | ||
|
||
3. In the **Database Connection Configuration** dialog, enter/select the following: | ||
|
||
- **Database Type**: **MySQL** | ||
|
||
- **Caption**: | ||
|
||
```bash | ||
<copy>heatwave-genai-db-connection</copy> | ||
``` | ||
|
||
4. Under **Connection Details**, in the **Basic** tab, enter the following: | ||
|
||
- **Hostname or IP Address**: Private IP address of the DB system that you had noted in Lab 1, Task 5, Step 19. | ||
|
||
- **User Name**: | ||
|
||
```bash | ||
<copy>admin</copy> | ||
``` | ||
|
||
- **Tunneling Options**: Select **Connect Using SSH Tunnel**. | ||
|
||
![Database Connection Configuration](./images/database-connection-details.png "Database Connection Configuration") | ||
|
||
5. Click **Store Passsword**, and enter the password. | ||
|
||
![Enter password](./images/password.png "Enter password") | ||
|
||
6. Under **Connection Details**, click **SSH Tunnel**. | ||
|
||
![Click SSH tunnel](./images/ssh-tunnel.png "Click SSH tunnel") | ||
|
||
7. Enter the following details: | ||
|
||
- **SSH URI**: opc@ComputeIPAddress. Replace ComputeIPAddress with the IP address of the compute that you had noted in Lab 2, Task 1, Step 13. | ||
|
||
- **SSH Private Key File**: Browse to the SSH folder and select the SSH key | ||
|
||
- **Custom Path for the SSH Configuration File**: Browse to the SSH folder and select the SSH key | ||
|
||
![SSH details](./images/ssh-details.png "SSH details") | ||
|
||
8. Click **OK**. | ||
|
||
9. Under **DATABASE CONNECTIONS**, click **Open New Database Connection** icon next to your HeatWave instance to connect to it. | ||
|
||
![Open New Database Connection](./images/open-connection.png "Open New Database Connection") | ||
|
||
10. Click **Yes** to confirm your connection request. | ||
|
||
![Confirm New Database Connection](./images/confrm-connection.png "Confirm New Database Connection") | ||
|
||
11. Check whether you are connected to the HeatWave instance by entering the following command and clicking **Execute the selection or full block on HeatWave and create a new block**. | ||
|
||
```bash | ||
<copy>show databases;</copy> | ||
``` | ||
|
||
![New Database Connection](./images/12-show-databases.png "New Database Connection") | ||
|
||
You may now **proceed to the next lab**. | ||
|
||
## Learn More | ||
|
||
- [HeatWave User Guide](https://dev.mysql.com/doc/heatwave/en/) | ||
|
||
- [HeatWave on OCI User Guide](https://docs.oracle.com/en-us/iaas/mysql-database/index.html) | ||
|
||
- [MySQL Documentation](https://dev.mysql.com/) | ||
|
||
## Acknowledgements | ||
|
||
- **Author** - Aijaz Fatima, Product Manager | ||
- **Contributors** - Mandy Pang, Senior Principal Product Manager | ||
- **Last Updated By/Date** - Aijaz Fatima, Product Manager, August 2024 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+166 KB
heatwave-genai/connect-dbs-vscode/images/1-installing-mysql-shell-for-vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+105 KB
heatwave-genai/connect-dbs-vscode/images/11-open-database-connection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+49.9 KB
heatwave-genai/connect-dbs-vscode/images/16-default-identity-domain.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+54.4 KB
heatwave-genai/connect-dbs-vscode/images/2-installed-mysql-shell-for-vscode.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+96.4 KB
heatwave-genai/connect-dbs-vscode/images/database-connection-details.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,94 @@ | ||
# Create Linux Compute Instance | ||
|
||
|
||
## Introduction | ||
|
||
Oracle Cloud Infrastructure Compute lets you provision and manage compute hosts, known as instances . You can create instances as needed to meet your compute and application requirements. After you create an instance, you can access it securely from your computer or cloud shell. | ||
|
||
|
||
**Create Linux Compute Instance** | ||
|
||
In this lab, you use Oracle Cloud Infrastructure to create an Oracle Linux instance. | ||
|
||
_Estimated Time:_ 10 minutes | ||
|
||
### Objectives | ||
|
||
In this lab, you will be guided through the following tasks: | ||
|
||
- Create Compute Instance | ||
|
||
### Prerequisites | ||
|
||
- An Oracle Free Tier or Paid Cloud Account | ||
- You have completed Lab 2. | ||
|
||
## Task 1: Create Compute Instance | ||
|
||
You need a compute instance to connect to the Heatwave instance. | ||
|
||
1. Click the **Navigation menu** in the upper left, navigate to **Compute**, and under **Compute**, select **Instances**. | ||
|
||
![Click compute](./images/click-compute.png "Click compute") | ||
|
||
2. Ensure **heatwave-genai** compartment is selected, and click click **Create instance**. | ||
|
||
![Create instance](./images/create-instance.png "Create instance") | ||
|
||
3. On **Create compute instance** page, enter the name of the compute instance. | ||
|
||
```bash | ||
<copy>heatwave-genai-compute</copy> | ||
``` | ||
|
||
4. Ensure **heatwave-genai** compartment is selected. | ||
|
||
![Compute instance name](./images/compute-name.png "Compute instance name") | ||
|
||
5. In the **Placement** field, keep the selected **Availability Domain**. | ||
|
||
6. In the **Image and Shape** field, keep the selected image, **Oracle Linux 8**, and the default shape. | ||
|
||
![Compute image and shape](./images/compute-image-shape.png "Compute image and shape") | ||
|
||
7. In **Primary VNIC information** field, ensure the following settings are selected: | ||
|
||
- **Primary Network**: **heatwave-genai-vcn** | ||
|
||
- **Subnet**: **public-subnet-heatwave-genai-vcn** | ||
|
||
8. In **Primary VNIC IP addresses** field, ensure the following settings are selected: | ||
|
||
- **Private IPv4 address**: **Automatically assign private IPv4 address** | ||
|
||
- **Public IPv4 address**: Selected | ||
|
||
![Network settings](./images/networking.png "Network settings") | ||
|
||
9. In **Add SSH keys** field, click **Generate a key pair for me**. | ||
|
||
![Add SSH Keys](./images/ssh-keys.png "Add SSH Keys") | ||
|
||
10. Save the downloaded SSH keys in your .ssh folder. and rename the key. For example: | ||
|
||
```bash | ||
<copy>ssh-key-2024</copy> | ||
``` | ||
|
||
![Save SSH keys](./images/ssh-key-store.png "Save SSH Keys") | ||
|
||
11. Click '**Create**' to create your compute instance. | ||
|
||
12. The compute instance will be ready to use after a few minutes. The state is shown as **Provisioning** while the instance is creating. | ||
|
||
13. When the compute instance is ready to use, the state is shown as **Running**. *Note* the **Public IP address** and the **Username**. | ||
|
||
![Compute instance is created](./images/compute.png "Compute instance is created") | ||
|
||
You may now **proceed to the next lab**. | ||
|
||
## Acknowledgements | ||
|
||
- **Author** - Aijaz Fatima, Product Manager | ||
- **Contributors** - Mandy Pang, Senior Principal Product Manager | ||
- **Last Updated By/Date** - Aijaz Fatima, Product Manager, September 2024 |
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file added
BIN
+24.6 KB
heatwave-genai/create-compute/images/notepad-rsa-key-compute-mds-1.png
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.