Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions sharding/raft23ai/cleanup/cleanup.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ You have successfully cleaned up your instance.
[Raft Replication Documentation] (https://docs.oracle.com/en/database/oracle/oracle-database/23/shard/raft-replication.html#GUID-AF14C34B-4F55-4528-8B28-5073A3BFD2BE)

## Acknowledgements
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database Database, Product Management
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database, Product Management
* **Contributors** - Pankaj Chandiramani, Shefali Bhargava, Param Saini, Jyoti Verma
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, July 2025
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, August 2025
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.
41 changes: 30 additions & 11 deletions sharding/raft23ai/initialize-environment/initialize-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,44 @@ In this lab we will review and startup all components required to successfully r
*Estimated Lab Time:* 10 Minutes.

### Objectives
- Initialize the workshop environment.
- Verify and Initialize the workshop environment at anytime.

### Prerequisites
This lab assumes you have:
- A Free Tier, Paid or LiveLabs Oracle Cloud account
- You have completed:
- Lab: Prepare Setup (*Free-tier* and *Paid Tenants* only)
- Lab: Environment Setup
- Lab: Environment Setup (*Free-tier* and *Paid Tenants* only)
- Lab: Get started (*Login to the LiveLabs Sandbox Environment* only)

## Task 1: Validate That Required Processes are Up and Running.
## Task 1: Verify default browser windows.

1. By default, two browser windows are shown. On the left, "Introduction" About Raft Replication and on the right, "RAFT 23ai LiveLabs Demo: All Customers List" like below:

![default_windows_raft_livelabs](images/default_windows_raft_livelabs.png " ")

2. Reload the browser windows at anytime (when not shown for some reason)

a. Click on Activities (shown on top left corner) >> Terminal icon (shown on the bottom of the screen which is next to Chrome icon) to Launch the Terminal.

![activities_terminal_icon](images/activities_terminal_icon.png " ")

b. Enter ".livelabs/init\_ll\_windows.sh" like below:

![re init default windows](images/re_init_default_windows.png " ")

This would re-display the two browser windows as shown above in the step 1.

## Task 2: Validate That Required Processes are Up and Running from a terminal window.
1. Now with access to your remote desktop session, proceed as indicated below to validate your environment before you start executing the subsequent labs. The following Processes should be up and running:

- Oracle Sharding GSM1 Container
- Oracle Sharding GSM2 Container
- Oracle Sharding GSM1 Container
- Oracle Sharding GSM2 Container
- Oracle Sharding Catalog container
- Three Oracle shard Database containers
- Appclient Container

2. Open a terminal session and proceed as indicated below to validate the services.
2. Click on Activities (shown on top left) >> Terminal icon (shown on center of the screen which is next to Chrome icon) to Launch the Terminal when its not already opened. Proceed as indicated below to validate the services.

- Oracle Sharding container Details

Expand All @@ -34,9 +53,9 @@ This lab assumes you have:
sudo podman ps -a
</copy>
```
![sharding docker](images/podman-containers.png " ")
![sharding podman](images/podman-containers.png " ")

- If a container is stopped and not in running state then try to restart it by using below docker command.
- If a container is stopped and not in running state then try to restart it by using podman command.

```
<copy>
Expand All @@ -46,7 +65,7 @@ This lab assumes you have:
sudo podman start <container ID/NAME>
</copy>
```
- For multiple containers, run the following to restart all at once:
- For multiple containers, run the following to restart all at once when needed:

```
<copy>
Expand All @@ -60,6 +79,6 @@ This lab assumes you have:
You may now proceed to the next lab.

## Acknowledgements
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database Database, Product Management
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database, Product Management
* **Contributors** - Pankaj Chandiramani, Shefali Bhargava, Param Saini, Jyoti Verma
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, July 2025
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, August 2025
4 changes: 2 additions & 2 deletions sharding/raft23ai/intro/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ You may now proceed to the next lab.
- [Raft Replication Documentation](https://docs.oracle.com/en/database/oracle/oracle-database/23/shard/raft-replication.html#GUID-AF14C34B-4F55-4528-8B28-5073A3BFD2BE)

## Acknowledgements
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database Database, Product Management
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database, Product Management
* **Contributors** - Pankaj Chandiramani, Shefali Bhargava, Param Saini, Jyoti Verma
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, July 2025
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, August 2025
4 changes: 2 additions & 2 deletions sharding/raft23ai/prepare-setup/prepare-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,6 @@ When you are finished don't forget to rate this workshop! We rely on this feedb
If you selected the **Green Button** for this workshop and still have an active reservation, you can also rate by going to My Reservations -> Launch Workshop.

## Acknowledgements
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database Database, Product Management
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database, Product Management
* **Contributors** - Pankaj Chandiramani, Shefali Bhargava, Param Saini, Jyoti Verma
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, July 2025
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, August 2025
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Diff not rendered.
Diff not rendered.
104 changes: 41 additions & 63 deletions sharding/raft23ai/topology/topology.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,48 @@ This lab assumes you have:
- A Free Tier, Paid or LiveLabs Oracle Cloud account
- You have completed:
- Lab: Prepare Setup (*Free-tier* and *Paid Tenants* only)
- Lab: Environment Setup
- Lab: Environment Setup (*Free-tier* and *Paid Tenants* only)
- Lab: Get started (*Login to the LiveLabs Sandbox Environment* only)
- Lab: Initialize Environment


## Task 1: Check for containers in your VM

1. Please open three terminal windows.
1. To open a new terminal (skip this step if already opened a terminal as mentioned in previous lab initialize environment's Task 1), Click on Activities (shown on top left corner) >> Terminal icon (shown on the bottom of the screen which is next to Chrome icon) to Launch the Terminal.

First terminal logged in as **oracle** user.

![<terminal_oracle>](./images/terminal-1-oracle.png " ")

Second Terminal switched to **GSM** level.
From podman container Details, verify all containers are running:

```
<copy>
sudo podman ps -a
</copy>
```

![<podman_containers>](./images/t1-podman-containers-1.png " ")

```
<copy>
sudo podman exec -i -t gsm1 /bin/bash
</copy>
```
Click on the "+" sign (on the top-left corner of the same terminal window) to open another tab and switched to **GSM** level:

![<terminal_gsm>](./images/terminal-2-gsm.png " ")
![<click_plus_sign_top_left_terminal_window>](./images/click-plus-sign-top-left-terminal-window.png " ")

Third Terminal switched to **appclient** container.
```
<copy>
sudo podman exec -i -t gsm1 /bin/bash
</copy>
```

```
<copy>
sudo podman exec -it appclient /bin/bash
</copy>
```

![<terminal_appclient>](./images/terminal-3-appclient.png " ")
![<terminal_gsm>](./images/terminal_tab_2_gsm1.png " ")

2. Run the below command on terminal window that is logged in as as **oracle** user.
Similarly, Click on the "+" sign (on the top-left corner of the same terminal window) to open one more tab and switched to **appclient** container.

```
<copy>
sudo podman ps -a
sudo podman exec -it appclient /bin/bash
</copy>
```

![<terminal_appclient>](./images/terminal_tab_3_appclient.png " ")

![<podman containers>](./images/t1-podman-containers-1.png " ")
Alternatively, you can open multiple terminals for different tasks from each terminals.

## Task 2: Explore the Raft configuration

Expand All @@ -79,17 +80,8 @@ Changes to data made by a DML are recorded in the Raft log. A commit record is a

For more details check [Raft Replication Configuration and Management] (https://docs.oracle.com/en/database/oracle/oracle-database/23/shard/raft-replication.html#GUID-AF14C34B-4F55-4528-8B28-5073A3BFD2BE)

1. Run the below command to switch to **GSM**, if you are using a new terminal.

```
<copy>
sudo podman exec -i -t gsm1 /bin/bash
</copy>
```

![<connect to GSM1>](./images/t2-1-podman-gsm1.png " ")

2. Use the terminal window that is switched to **GSM**. Verify sharding topology using the **CONFIG** command.
1. Use the terminal tab (2nd tab) that is switched to **gsm1**. Verify sharding topology using the **gdsctl config shard** command.

```
<copy>
Expand Down Expand Up @@ -132,11 +124,11 @@ For more details check [Raft Replication Configuration and Management] (https://

## Task 3: Changing the Replication Unit Leader

Using SWITCHOVER RU, you can change which replica is the leader for the specified replication unit.
Using SWITCHOVER RU, you can change which replica is the leader for the specified replication unit.

The -shard option makes the replication unit member on the specified shard database the new leader of the given RU.
The -shard option makes the replication unit member on the specified shard database the new leader of the given RU.

1. Run the below command on **GSM** terminal window to view the status of all the leaders
1. Run the below command on **GSM** terminal's 2nd tab to view the status of all the leaders

```
<copy>
Expand Down Expand Up @@ -186,17 +178,7 @@ For more details check [Raft Replication Configuration and Management] (https://

Please use the below steps to run the workload using the "app_schema" account with the available configuration files on the "appclient" container:

1. You can use the below command if you need to switch to appclient container in a new terminal window.

```
<copy>
sudo podman exec -it appclient /bin/bash
</copy>
```

![<appclient_container>](./images/t4-1-appclient-container.png " ")

2. Use the terminal window that is switched to the "appclient" container. Switch to the "oracle" user.
1. Use the terminal's 3rd tab that is switched to the "appclient" container. Switch to the "oracle" user.

```
<copy>
Expand All @@ -205,7 +187,7 @@ Please use the below steps to run the workload using the "app_schema" account wi
```


3. Change the path to $DEMO_MASTER location
2. Change the path to $DEMO_MASTER location

```
<copy>
Expand All @@ -217,18 +199,17 @@ Please use the below steps to run the workload using the "app_schema" account wi

![<appclient_container_loc>](./images/t4-3-appclient-container.png " ")

4. Run the workload using the below command
3. Run the workload using the below command

```
<copy>
sh run.sh demo
</copy>
```


![<run_workload>](./images/t4-4-run-workload.png " ")

5. During this time, you can continue to check the RU details from another terminal window switched to **gsm** .
4. During this time, you can continue to check the RU details from terminal's 2nd tab which is switched to **gsm** .
Notice that the log index is increasing as read and write operations are going on.

```
Expand All @@ -239,15 +220,15 @@ Notice that the log index is increasing as read and write operations are going o

![<workload_RU_log_index>](./images/t4-5-workload-log-index.png " ")

6. You can keep running the workload for some time while you perform the next task.
5. You can keep running the workload for a few seconds and enter CTRL-C to stop the workload. You can check RAFT UI Demo main page to confirm the count is increased. You can also restart this workload as in step 3 and keep running during the next task "Perform Failover Test".


## Task 5: Perform Failover Test

What happens when one of the available shard databases goes down or is taken down for maintenance?
Failover test by stopping shard1 to create shard1 down situation.

1. You can run the below command in a terminal window logged in as **oracle** user to check the status for all the containers.
1. From the terminal window make sure all containers are running. You can run the below command in a terminal window logged in as **oracle** user to check the status for all the containers.

```
<copy>
Expand All @@ -269,15 +250,15 @@ Failover test by stopping shard1 to create shard1 down situation.
![<stop_shard_1>](./images/t5-2-stop-shard1.png " ")


3. Below command can be used to switch to **GSM**, if you are using a new terminal.
3. From the 2nd tab of the terminal window connected to **gsm1** ( Below command can be used to switch to **gsm1**, if you are using a new terminal/tab).

```
<copy>
sudo podman exec -i -t gsm1 /bin/bash
</copy>
```

Run below in the terminal window that is switched to **GSM** and check the status of shards, RU's and you will see that database orcl1cdb_orcl1pdb is not present.
Run below in the terminal window that is switched to **gsm1** and check the status of shards, RU's and you will see that database orcl1cdb_orcl1pdb is not present.

```
<copy>
Expand Down Expand Up @@ -331,9 +312,9 @@ Start the shard1 using the podman start command, to reflect that shard1 is joini

![<chunk_status_after_startup_shard1>](./images/t5-5-status-chunks-after-startup-shard1.png " ")

You can stop the workload that ran in the previous task using Ctrl+C.
Navigate to the third tab ( using appclient container) where the workload is running and enter CTRL-C to stop the workload.

6. Run the below command in terminal that is switched to **GSM** to auto rebalance the leaders.
6. Run the below command in terminal that is switched to **GSM** to auto rebalance the leaders.

```
<copy>
Expand All @@ -343,12 +324,9 @@ You can stop the workload that ran in the previous task using Ctrl+C.
![<change_the_ru_leader>](./images/t3-2-auto-rebalance.png " ")





You may now proceed to the next lab.

## Acknowledgements
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database Database, Product Management
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database, Product Management
* **Contributors** - Pankaj Chandiramani, Shefali Bhargava, Param Saini, Jyoti Verma
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, July 2025
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, August 2025
4 changes: 2 additions & 2 deletions sharding/raft23ai/troubleshooting/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,6 @@ This lab assumes you have:


## Acknowledgements
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database Database, Product Management
* **Authors** - Deeksha Sehgal, Ajay Joshi, Oracle Globally Distributed Database, Product Management
* **Contributors** - Pankaj Chandiramani, Shefali Bhargava, Param Saini, Jyoti Verma
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, July 2025
* **Last Updated By/Date** - Ajay Joshi, Oracle Globally Distributed Database, Product Management, August 2025
Loading