Skip to content

Commit

Permalink
WMS ID #5241: add more tasks and fix some issues (#174)
Browse files Browse the repository at this point in the history
* upgrade to 23ai RAFT

* invisible the compartment

* add new tasks

* add more tasks
  • Loading branch information
minqiaowang authored Sep 23, 2024
1 parent ca907c0 commit 75f7810
Show file tree
Hide file tree
Showing 76 changed files with 301 additions and 160,519 deletions.
295 changes: 226 additions & 69 deletions sharding/create-sample-schema/create-sample-schema.md

Large diffs are not rendered by default.

57 changes: 33 additions & 24 deletions sharding/deploy-raft-replication/deploy-raft-replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This lab assumes you have already completed the following:

```
<copy>10.0.0.20 gsmhost.subnet1.primaryvcn.oraclevcn.com gsmhost
10.0.0.10 catahost.subnet1.primaryvcn.oraclevcn.com catahost
10.0.0.10 shardhost0.subnet1.primaryvcn.oraclevcn.com shardhost0
10.0.0.11 shardhost1.subnet1.primaryvcn.oraclevcn.com shardhost1
10.0.0.12 shardhost2.subnet1.primaryvcn.oraclevcn.com shardhost2
10.0.0.13 shardhost3.subnet1.primaryvcn.oraclevcn.com shardhost3</copy>
Expand Down Expand Up @@ -274,16 +274,16 @@ This lab assumes you have already completed the following:


3. from **opc** user, connec to the **catahost**,
3. from **opc** user, connec to the catalog host,

```
[opc@gsmhost ~]$ <copy>ssh -i <your_private_key> opc@catahost</copy>
The authenticity of host 'catahost (10.0.0.10)' can't be established.
ECDSA key fingerprint is SHA256:3Bebd2KRlGZHVp8fxOLOodVa4UyT7wdegMIuC/rpiFo.
[opc@gsmhost ~]$ ssh -i labkey opc@shardhost0
The authenticity of host 'shardhost0 (10.0.0.10)' can't be established.
ECDSA key fingerprint is SHA256:nUgw525hsLNOOoW277E5j35wxfblNHk2CXqN0RPt7VU.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'catahost,10.0.0.10' (ECDSA) to the list of known hosts.
Last login: Thu Aug 8 05:36:59 2024 from 202.45.129.202
[opc@catahost ~]$
Warning: Permanently added 'shardhost0,10.0.0.10' (ECDSA) to the list of known hosts.
Last login: Tue Jun 4 05:47:51 2024 from 144.25.17.122
[opc@shardhost0 ~]$
```

Expand All @@ -298,7 +298,7 @@ This lab assumes you have already completed the following:

```
<copy>10.0.0.20 gsmhost.subnet1.primaryvcn.oraclevcn.com gsmhost
10.0.0.10 catahost.subnet1.primaryvcn.oraclevcn.com catahost
10.0.0.10 shardhost0.subnet1.primaryvcn.oraclevcn.com shardhost0
10.0.0.11 shardhost1.subnet1.primaryvcn.oraclevcn.com shardhost1
10.0.0.12 shardhost2.subnet1.primaryvcn.oraclevcn.com shardhost2
10.0.0.13 shardhost3.subnet1.primaryvcn.oraclevcn.com shardhost3</copy>
Expand All @@ -309,17 +309,17 @@ This lab assumes you have already completed the following:
5. Then switch to **oracle** user

```
[opc@catahost ~]$ <copy>sudo su - oracle</copy>
[opc@shardhost0 ~]$ <copy>sudo su - oracle</copy>
Last login: Thu Aug 8 05:35:06 UTC 2024
[oracle@catahost ~]$
[oracle@shardhost0 ~]$
```


6. Connect to oracle database as sysdba

```
[oracle@catahost ~]$ <copy>sqlplus / as sysdba</copy>
[oracle@shardhost0 ~]$ <copy>sqlplus / as sysdba</copy>
SQL*Plus: Release 23.0.0.0.0 - for Oracle Cloud and Engineered Systems on Thu Aug 8 05:30:55 2024
Version 23.5.0.24.07
Expand Down Expand Up @@ -364,7 +364,7 @@ This lab assumes you have already completed the following:
8. PDB configuration settings

```
<copy>alter session set container=catapdb;
<copy>alter session set container=shard0;
alter user gsmcatuser account unlock;
create user mysdbadmin identified by WelcomePTS_2024#;
grant gsmadmin_role to mysdbadmin;</copy>
Expand Down Expand Up @@ -404,7 +404,7 @@ This lab assumes you have already completed the following:

```
<copy>10.0.0.20 gsmhost.subnet1.primaryvcn.oraclevcn.com gsmhost
10.0.0.10 catahost.subnet1.primaryvcn.oraclevcn.com catahost
10.0.0.10 shardhost0.subnet1.primaryvcn.oraclevcn.com shardhost0
10.0.0.11 shardhost1.subnet1.primaryvcn.oraclevcn.com shardhost1
10.0.0.12 shardhost2.subnet1.primaryvcn.oraclevcn.com shardhost2
10.0.0.13 shardhost3.subnet1.primaryvcn.oraclevcn.com shardhost3</copy>
Expand Down Expand Up @@ -535,7 +535,7 @@ This lab assumes you have already completed the following:

8. Exit and back to gsmhost.

11. Repeat Task 3 steps to configure other shards.
11. Repeat Task 3 steps to configure other shards(shard2 and shard3).


Expand Down Expand Up @@ -571,23 +571,23 @@ This lab assumes you have already completed the following:
3. Create shard catalog, the `-repl NATIVE` for native RAFT replication.

```
<copy>create shardcatalog -database catahost:1521/catapdb -user mysdbadmin/WelcomePTS_2024# -repl native -repfactor 3 -chunks 18</copy>
<copy>create shardcatalog -database shardhost0:1521/shard0 -user mysdbadmin/WelcomePTS_2024# -repl native -repfactor 3 -chunks 18</copy>
```


4. Connect to catalog database:

```
<copy>connect mysdbadmin/WelcomePTS_2024#@catahost:1521/catapdb</copy>
<copy>connect mysdbadmin/WelcomePTS_2024#@shardhost0:1521/shard0</copy>
```


5. Add GSM named sharddirector1

```
<copy>add gsm -gsm sharddirector1 -catalog catahost:1521/catapdb -pwd WelcomePTS_2024#</copy>
<copy>add gsm -gsm sharddirector1 -catalog shardhost0:1521/shard0 -pwd WelcomePTS_2024#</copy>
```

Expand Down Expand Up @@ -632,7 +632,7 @@ This lab assumes you have already completed the following:
7. Add invited nodes

```
<copy>add invitednode catahost
<copy>add invitednode shardhost0
add invitednode shardhost1
add invitednode shardhost2
add invitednode shardhost3
Expand All @@ -655,9 +655,9 @@ This lab assumes you have already completed the following:
GDSCTL> config vncr
Name Group ID
---- --------
catahost
catahost.subnet1.primaryvcn.o
raclevcn.com
shardhost0
shardhost0.subnet1.primaryvcn
.oraclevcn.com
shardhost1
shardhost1.subnet1.primaryvcn
Expand All @@ -669,7 +669,7 @@ This lab assumes you have already completed the following:
shardhost3
shardhost3.subnet1.primaryvcn
.oraclevcn.com
.oraclevcn.com
```

Expand Down Expand Up @@ -864,7 +864,16 @@ This lab assumes you have already completed the following:


18. Exit to the **oracle** user, check the status of the listener.
18. Exit to the **oracle** user

```
GDSCTL> <copy>exit</copy>
[oracle@gsmhost ~]$
```
18. Check the status of the listener.

```
[oracle@gsmhost ~]$ <copy>lsnrctl status sharddirector1</copy>
Expand Down
30 changes: 19 additions & 11 deletions sharding/setup-environment/setup-environment.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ This lab assumes you have already completed the following:

Click on the link below to download the Resource Manager zip files you need to build your enviornment.

- [gdd-raft-23ai-v4.zip](https://github.com/minqiaowang/globally-distributed-database-with-raft/raw/main/setup-environment/gdd-raft-23ai-v4.zip) - Packaged terraform resources creation script.
- [gdd-raft-23ai-v5.zip](https://github.com/minqiaowang/globally-distributed-database-with-raft/raw/main/setup-environment/gdd-raft-23ai-v5.zip) - Packaged terraform resources creation script.



Expand Down Expand Up @@ -85,7 +85,7 @@ When using Resource Manager to deploy an environment, execute a terraform **App

2. Once this job succeeds, you will get an apply complete notification from Terraform. Click **Outputs**, you can get the **public ip address** for the GSM host instance.

(If you encouter with error message like:
If you encouter with error message like:

```
Error Message: work request did not succeed, workId: ocid1.coreservicesworkrequest.oc1.ap-seoul-1.abu...hmltq, entity: database, action: CREATED. Message: Create DB System operation failed. Refer to work request ID fe65f...t1f when opening a Service Request at My Oracle Support.
Expand All @@ -95,6 +95,14 @@ When using Resource Manager to deploy an environment, execute a terraform **App
Suggestion: Please retry or contact support for help with service: Database Db System
```

or

```
Error: 400-InvalidParameter, Cannot access Object Storage using the subnet with the following OCID: ocid1.subnet.oc1.ap-seoul-1.aaa...xfa. Review your VCN configuration. If you need further assistance, contact Oracle Support.
Suggestion: Please update the parameter(s) in the Terraform config as per error message Cannot access Object Storage using the subnet with the following OCID: ocid1.subnet.oc1.ap-seoul-1.aaa...xfa. Review your VCN configuration. If you need further assistance, contact Oracle Support.
```

In this situation, some base databases have been provisioned, others with error. You can click **Apply** again in the stack details page to provision the rest resources).

![image-output](images/image-output.png)
Expand All @@ -103,15 +111,15 @@ When using Resource Manager to deploy an environment, execute a terraform **App

3. Write down the gsmhost public ip address. It's will be used in the next Tasks.

4. Now, you have gotten the lab resources like the following (**Note:** the DB Unique Name may different if you input the different suffix name when creating the stack).
4. Now, you have gotten the lab resources like the following (**Note:** the DB Unique Name may different if you input the different suffix name when creating the stack). The shardhost0 is used for catalog database.

| Host | Private IP | DB Name | DB Unique Name | PDB Name |
| ---------- | ---------- | ------- | ---------------- | -------- |
| catahost | 10.0.0.10 | catalog | catalog_workshop | catapdb |
| shardhost1 | 10.0.0.11 | sdb1 | sdb1_workshop | shard1 |
| shardhost2 | 10.0.0.12 | sdb2 | sdb2_workshop | shard2 |
| shardhost3 | 10.0.0.13 | sdb3 | sdb3_workshop | shard3 |
| gsmhost | 10.0.0.20 | | | |
| Host | Private IP | DB Name | DB Unique Name | PDB Name |
| ---------- | ---------- | ------- | -------------- | -------- |
| shardhost0 | 10.0.0.10 | sdb0 | sdb0_workshop | shard0 |
| shardhost1 | 10.0.0.11 | sdb1 | sdb1_workshop | shard1 |
| shardhost2 | 10.0.0.12 | sdb2 | sdb2_workshop | shard2 |
| shardhost3 | 10.0.0.13 | sdb3 | sdb3_workshop | shard3 |
| gsmhost | 10.0.0.20 | | | |

The `db_domain` is `subnet1.primaryvcn.oraclevcn.com`. The default password for database dba is `WelcomePTS_2024# `.

Expand All @@ -122,7 +130,7 @@ When using Resource Manager to deploy an environment, execute a terraform **App
1. Open up a terminal (MAC) or cygwin emulator connect the gsmhost instance as the opc user. Enter yes when prompted.

````
ssh -i ~/.ssh/optionskey opc@<Your GSM host Public IP Address>
ssh -i <ssh_private_key> opc@<Your GSM host Public IP Address>
````

The output like this:
Expand Down
117 changes: 0 additions & 117 deletions sharding/setup-nonshard-app/nonshard-app-schema.sql

This file was deleted.

Binary file removed sharding/setup-nonshard-app/sdb_demo_app.zip
Binary file not shown.
Binary file not shown.
34 changes: 0 additions & 34 deletions sharding/setup-nonshard-app/sdb_demo_app/build.xml

This file was deleted.

Loading

0 comments on commit 75f7810

Please sign in to comment.