# Oracle Globally Distributed Database on Container
Oracle Globally Distributed Database is a scalability and availability feature for custom-designed OLTP applications that enables the distribution and replication of data across a pool of Oracle Databases that do not share hardware or software. The pool of databases is presented to the application as a single logical database.
## How to build and run
Review each section of this README in the order given. After reviewing the README, you can skip the image and container creation sections if you do not meet the requirements.
* Before you proceed to the next section, complete each of these steps:
* Install Podman engine
* See [Oracle Container Runtime for Podman Documentation](https://docs.oracle.com/en/operating-systems/oracle-linux/podman/toc.htm) to install and configure podman-engine. You can use an XFS file system with an overlay2 file system.
**IMPORTANT:** Oracle Global Service Manager container is useful when you want to configure the Global Data Service Framework. The Global Data Services framework consists of at least one global service manager, a Global Data Services catalog, and the GDS configuration databases.
## Using GSM and Oracle Database Image
To deploy a Oracle Globally Distributed Database topology, please execute the steps in the following sections below:
1. [Download Oracle Database Image](#download-oracle-database-image)
2. [Download Oracle GSM Image](#download-oracle-gsm-image)
3. [Create Network Bridge](#create-network-bridge)
4. [Password Setup](#password-setup)
5. [Deploying Catalog Container](#deploying-catalog-container)
6. [Deploying Shard Containers](#deploying-shard-containers)
7. [Deploying GSM Container](#deploying-gsm-container)
8. [User Defined Sharding](#user-defined-sharding)
9. [System Managed Sharding using RAFT Replication](#system-managed-sharding-using-raft-replication)
10. [Support](#support)
11. [License](#license)
12. [Copyright](#copyright)
### Download Oracle Database Image
You require an Oracle Database image for shards and the catalog. Download the prebuilt Oracle Database single instance image from [OCR](https://container-registry.oracle.com/ords/f?p=113:10::::::). To pull the database container image, run the following command:
```
podman pull container-registry.oracle.com/database/free:latest
```
### Download Oracle GSM Image
You require an Oracle GSM image, the GSM Master, and Standby containers. Download the prebuilt Oracle GSM image from [OCR](https://container-registry.oracle.com/ords/f?p=113:10::::::). To pull the GSM container image, run the following command:
```
podman pull container-registry.oracle.com/database/gsm:free-latest
```
**Note**
In this document, we are using the database free latest image `container-registry.oracle.com/database/free:latest`. If you are trying to install with another version, then change the image name accordingly.
### Create Network Bridge
Before creating a container, create the Podman network by creating a Podman network bridge based on your environment. If you are using the bridge name with the network subnet mentioned in this README.md, then you can use the same IPs mentioned in the [Create Containers](#create-containers) section.
#### Macvlan Bridge
```
# podman network create -d macvlan --subnet=10.0.20.0/24 --gateway=10.0.20.1 -o parent=eth0 shard_pub1_nw
```
#### Ipvlan Bridge
```
# podman network create -d ipvlan --subnet=10.0.20.0/24 --gateway=10.0.20.1 -o parent=eth0 shard_pub1_nw
```
If you are planning to create a test environment within a single machine, then you can use a Podman bridge. However, these IPs will not be reachable on the user network.
#### Bridge
```
# podman network create --driver=bridge --subnet=10.0.20.0/24 shard_pub1_nw
```
**Note:** You can change the subnet and choose one of the Podman network bridge options indicated above, based on your environment.
### Create Containers
Before creating the GSM container, you must build the catalog and shard containers. To create the containers, complete each of the following steps:
#### Set up Hostfile
All containers will share a host file for name resolution. The shared host file must be available to all containers. Create the shared host file (if it doesn't exist) at `/opt/containers/shard_host_file`.
For example:
```
# mkdir /opt/containers
# touch /opt/containers/shard_host_file
```
Because Oracle Database containers do not have root access to modify the `/etc/hosts` file, add the following host entries in `/opt/containers/shard_host_file`. This file must be prepopulated. You can change these entries based on your environment and network setup.
```
127.0.0.1 localhost.localdomain localhost
10.0.20.100 oshard-gsm1.example.com oshard-gsm1
10.0.20.101 oshard-gsm2.example.com oshard-gsm2
10.0.20.102 oshard-catalog-0.example.com oshard-catalog-0
10.0.20.103 oshard1-0.example.com oshard1-0
10.0.20.104 oshard2-0.example.com oshard2-0
10.0.20.105 oshard3-0.example.com oshard3-0
10.0.20.106 oshard4-0.example.com oshard4-0
```
#### Password Setup
Specify the secret volume for resetting database user passwords during catalog and shard setup. The secret volume can be a shared volume among all the containers:
```
mkdir /opt/.secrets/
cd /opt/.secrets
openssl genrsa -out key.pem
openssl rsa -in key.pem -out key.pub -pubout
```
Edit the `/opt/.secrets/pwdfile.txt` and seed the password. It will be a common password for all the database users. To edit the file, run the following command:
```
vi /opt/.secrets/pwdfile.txt
```
**Note**: Enter your secure password in the `pwdfile.txt` file and save the file.
After seeding the password and saving the `/opt/.secrets/pwdfile.txt` file, run the following commands:
```
openssl pkeyutl -in /opt/.secrets/pwdfile.txt -out /opt/.secrets/pwdfile.enc -pubin -inkey /opt/.secrets/key.pub -encrypt
rm -rf /opt/.secrets/pwdfile.txt
```
Oracle recommends using Podman secrets inside the containers. Run the following commands to create the Podman secrets:
```
podman secret create pwdsecret /opt/.secrets/pwdfile.enc
podman secret create keysecret /opt/.secrets/key.pem
```
**Note:** This password and key secrets are used for the initial Oracle Globally Distributed Database topology setup. After the Oracle Globally Distributed Database topology setup is complete, you must change the topology passwords based on your enviornment.
#### Deploying Catalog Container
The _shard catalog_ is a special-purpose Oracle Database that is a persistent store for Oracle Globally Distributed Database configuration data. The shard catalog plays a key role in the automated deployment and centralized management of an Oracle Globally Distributed Database. It also hosts the gold schema of the application, and the master copies of common reference data (duplicated tables).
##### Create Directory
You must create a mountpoint on the Podman host to save datafiles for the shard catalog database, and expose it as a volume to the catalog container. This volume can be local on a Podman host, or exposed from your central storage. It contains a file system, such as EXT4. During the setup of this README.md, we used the directory `/oradata/dbfiles/CATALOG` and exposed it as volume to the catalog container.
```
mkdir -p /oradata/dbfiles/CATALOG
chown -R 54321:54321 /oradata/dbfiles/CATALOG
```
**Notes**:
* Because the catalog container must be writable by the oracle user "oracle" (uid: 54321) inside the container, you must change the ownership for the data volume `/oradata/dbfiles/CATALOG` that is exposed to the catalog container.
* If ownership is not changed, then database creation will fail. For details, see: [oracle/docker-images for Single Instance Database](https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance).
##### Create Container
Before creating the catalog container, review the following notes carefully:
**Notes**
* Change environment variables such as ORACLE_SID and ORACLE_PDB, based on your environment.
* Change `/oradata/dbfiles/CATALOG` based on your environment.
* By default, the setup creates a new database under `/opt/oracle/oradata` based on the ORACLE_SID environment variable.
```
podman run -d --hostname oshard-catalog-0 \
--dns-search=example.com \
--network=shard_pub1_nw \
--ip=10.0.20.102 \
-e DOMAIN=example.com \
-e ORACLE_SID=FREE \
-e ORACLE_PDB=FREEPDB1 \
-e ORACLE_FREE_PDB=CAT1PDB \
-e DB_UNIQUE_NAME=CATCDB \
-e OP_TYPE=catalog \
-e COMMON_OS_PWD_FILE=pwdsecret \
-e PWD_KEY=keysecret \
-e SHARD_SETUP="true" \
-e ENABLE_ARCHIVELOG=true \
--secret pwdsecret \
--secret keysecret \
-v /oradata/dbfiles/CATALOG:/opt/oracle/oradata \
-v /opt/containers/shard_host_file:/etc/hosts \
--privileged=false \
--name catalog container-registry.oracle.com/database/free:latest
Mandatory Parameters:
COMMON_OS_PWD_FILE: Specify the Podman secret created with the encrypted password file
PWD.key: Specify the Podman secret with the password key file to decrypt the encrypted password
OP_TYPE: Specify the operation type. For Shards, it has to be set to catalog.
DOMAIN: Specify the domain name
ORACLE_SID: CDB name, which has to be "FREE" for Oracle Database FREE
ORACLE_PDB: PDB name, which has to be "FREEPDB1" for Oracle Database FREE
ORACLE_FREE_PDB PDB name that you want to create for the setup
DB_UNIQUE_NAME DB_UNIQUE_NAME name that you want to set
Optional Parameters:
CUSTOM_SHARD_SCRIPT_DIR: Specify the location of custom scripts that you want to run after setting up the catalog.
CUSTOM_SHARD_SCRIPT_FILE: Specify the file name that you want to run after catalog setup This file name must be available in the CUSTOM_SHARD_SCRIPT_DIR location.
```
To check the catalog container and services creation logs, run a `tail` command on the Podman logs. It will take approximately 20 minutes to create the catalog container service.
```
podman logs -f catalog
```
**IMPORTANT:** The resulting images will consist of an image with the Oracle Database binaries installed. On first startup of the container, a new database will be created. When the Shard database is ready to be used, you will see lines such as these:
==============================================
GSM Catalog Setup Completed
==============================================
#### Deploying Shard Containers
A _database shard_ in Oracle Globally Distributed Database is a horizontal partition of data in a database or search engine. Each individual partition is referred to as a shard or database shard. You must create a mountpoint on the Podman host to save datafiles for Oracle Globally Distributed Database, and expose the mountpoint as a volume to the shard container. This volume can be local on a Podman host, or exposed from your central storage. It contains a file system, such as EXT4. During the setup of this README.md, we used the directory `/oradata/dbfiles/ORCL1CDB` and exposed it as volume to the shard container.
##### Create Directories
```
mkdir -p /oradata/dbfiles/ORCL1CDB
mkdir -p /oradata/dbfiles/ORCL2CDB
chown -R 54321:54321 /oradata/dbfiles/ORCL2CDB
chown -R 54321:54321 /oradata/dbfiles/ORCL1CDB
```
**Notes**:
* Because these containers must be writable by the oracle user "oracle" (uid: 54321) inside the container, you must change the ownership for the data volumes `/oradata/dbfiles/ORCL1CDB` and `/oradata/dbfiles/ORCL2CDB` that are exposed to the shard container.
* If ownership is not changed, then database creation will fail. For details, see: [oracle/docker-images for Single Instance Database](https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance).
##### Shard1 Container
Before creating the shard1 container, review the following notes carefully:
**Notes**
* Change environment variables such as ORACLE_SID and ORACLE_PDB based on your environment.
* Change `/oradata/dbfiles/ORCL1CDB` based on your environment.
* By default, the setup creates a new database under `/opt/oracle/oradata` based on the ORACLE_SID environment variable.
```
podman run -d --hostname oshard1-0 \
--dns-search=example.com \
--network=shard_pub1_nw \
--ip=10.0.20.103 \
-e DOMAIN=example.com \
-e ORACLE_SID=FREE \
-e ORACLE_PDB=FREEPDB1 \
-e ORACLE_FREE_PDB=ORCL1PDB \
-e DB_UNIQUE_NAME=ORCL1CDB \
-e OP_TYPE=primaryshard \
-e COMMON_OS_PWD_FILE=pwdsecret \
-e PWD_KEY=keysecret \
-e SHARD_SETUP="true" \
-e ENABLE_ARCHIVELOG=true \
--secret pwdsecret \
--secret keysecret \
-v /oradata/dbfiles/ORCL1CDB:/opt/oracle/oradata \
-v /opt/containers/shard_host_file:/etc/hosts \
--privileged=false \
--name shard1 container-registry.oracle.com/database/free:latest
Mandatory Parameters:
COMMON_OS_PWD_FILE: Specify the Podman secret created with the encrypted password file.
PWD.key: Specify the Podman secret with the password key file to decrypt the encrypted password.
OP_TYPE: Specify the operation type. For Shards it must be set to primaryshard or standbyshard.
DOMAIN: Specify the domain name.
ORACLE_SID: CDB name, which must be "FREE" for Oracle Database FREE.
ORACLE_PDB: PDB name, which must be "FREEPDB1" for Oracle Database FREE.
ORACLE_FREE_PDB PDB name that you want to create for the setup.
DB_UNIQUE_NAME DB_UNIQUE_NAME name that you want to set.
Optional Parameters:
CUSTOM_SHARD_SCRIPT_DIR: Specify the location of custom scripts that you want to run after setting up shard setup.
CUSTOM_SHARD_SCRIPT_FILE: Specify the file name that you want to run after the shard database setup. This file must be available in the CUSTOM_SHARD_SCRIPT_DIR location.
```
To check the shard1 container and services creation logs, run a `tail` command on the Podman logs. It will take approximately 20 minutes to create the shard1 container service.
```
podman logs -f shard1
```
##### Shard2 Container
Before creating the shard2 container, review the following notes carefully:
**Notes**
* Change environment variables such as ORACLE_SID and ORACLE_PDB based on your environment.
* Change `/oradata/dbfiles/ORCL2CDB` based on your environment.
* By default, the setup creates new database under `/opt/oracle/oradata` based on the ORACLE_SID environment variable.
```
podman run -d --hostname oshard2-0 \
--dns-search=example.com \
--network=shard_pub1_nw \
--ip=10.0.20.104 \
-e DOMAIN=example.com \
-e ORACLE_SID=FREE \
-e ORACLE_PDB=FREEPDB1 \
-e ORACLE_FREE_PDB=ORCL2PDB \
-e DB_UNIQUE_NAME=ORCL2CDB \
-e OP_TYPE=primaryshard \
-e COMMON_OS_PWD_FILE=pwdsecret \
-e PWD_KEY=keysecret \
-e SHARD_SETUP="true" \
-e ENABLE_ARCHIVELOG=true \
--secret pwdsecret \
--secret keysecret \
-v /oradata/dbfiles/ORCL2CDB:/opt/oracle/oradata \
-v /opt/containers/shard_host_file:/etc/hosts \
--privileged=false \
--name shard2 container-registry.oracle.com/database/free:latest
Mandatory Parameters:
COMMON_OS_PWD_FILE: Specify the Podman secret created with the encrypted password file.
PWD.key: Specify the Podman secret with the password key file to decrypt the encrypted password.
OP_TYPE: Specify the operation type. For Shards, it must be set to primaryshard or standbyshard.
DOMAIN: Specify the domain name.
ORACLE_SID: CDB name, which must be "FREE" for Oracle Database FREE.
ORACLE_PDB: PDB name, which must be "FREEPDB1" for Oracle Database FREE.
ORACLE_FREE_PDB PDB name that you want to create for the setup.
DB_UNIQUE_NAME DB_UNIQUE_NAME name that you want to set.
Optional Parameters:
CUSTOM_SHARD_SCRIPT_DIR: Specify the location of custom scripts that you want to run after running the shard setup.
CUSTOM_SHARD_SCRIPT_FILE: Specify the file name of a script that you want to run after the shard database setup. This file must be available in the CUSTOM_SHARD_SCRIPT_DIR location.
```
**Note**: You can add more shards based on your requirements.
To check the shard2 container and services creation logs, run a `tail` command on the Podman logs. It will take approximately 20 minutes to create the shard2 container service
```
podman logs -f shard2
```
**IMPORTANT:** The resulting images will be an image with the Oracle binaries installed. On first startup of the container, a new database will be created. The Shard database is ready to be used when you see these lines:
==============================================
GSM Shard Setup Completed
==============================================
#### Deploying GSM Container
The Global Data Services framework consists of at least one global service manager, a Global Data Services catalog, and the GDS configuration databases. You must create the mountpoint on the Podman host to save GSM setup-related files for Oracle Global Service Manager and expose the mountpoint as a volume to the GSM container. This volume can be local on a Podman host, or exposed from your central storage. It contains a file system, such as EXT4. During the setup of this README.md, we used the directory `/oradata/dbfiles/GSMDATA` and exposed it as volume to the GSM container.
##### Create Directory
```
mkdir -p /oradata/dbfiles/GSMDATA
chown -R 54321:54321 /oradata/dbfiles/GSMDATA
```
##### Create GSM Master Container
```
podman run -d --hostname oshard-gsm1 \
--dns-search=example.com \
--network=shard_pub1_nw \
--ip=10.0.20.100 \
-e DOMAIN=example.com \
-e SHARD_DIRECTOR_PARAMS="director_name=sharddirector1;director_region=region1;director_port=1522" \
-e SHARD1_GROUP_PARAMS="group_name=shardgroup1;deploy_as=primary;group_region=region1" \
-e CATALOG_PARAMS="catalog_host=oshard-catalog-0;catalog_db=CATCDB;catalog_pdb=CAT1PDB;catalog_port=1521;catalog_name=shardcatalog1;catalog_region=region1,region2;catalog_chunks=12" \
-e SHARD1_PARAMS="shard_host=oshard1-0;shard_db=ORCL1CDB;shard_pdb=ORCL1PDB;shard_port=1521;shard_group=shardgroup1" \
-e SHARD2_PARAMS="shard_host=oshard2-0;shard_db=ORCL2CDB;shard_pdb=ORCL2PDB;shard_port=1521;shard_group=shardgroup1" \
-e SERVICE1_PARAMS="service_name=oltp_rw_svc;service_role=primary" \
-e SERVICE2_PARAMS="service_name=oltp_ro_svc;service_role=primary" \
-e SHARD_SETUP="true" \
-e COMMON_OS_PWD_FILE=pwdsecret \
-e PWD_KEY=keysecret \
-e OP_TYPE=gsm \
-e MASTER_GSM="TRUE" \
--secret pwdsecret \
--secret keysecret \
-v /oradata/dbfiles/GSMDATA:/opt/oracle/gsmdata \
-v /opt/containers/shard_host_file:/etc/hosts \
-p 1522:1522 \
--privileged=false \
--name gsm1 container-registry.oracle.com/database/gsm:free-latest
Mandatory Parameters:
SHARD_DIRECTOR_PARAMS: Accept a key value pair separated by a semicolon. For example: =;= for following = pairs:
key=director_name, value=shard director name
key=director_region, value=shard director region
key=director_port, value=shard director port
SHARD[1-9]_GROUP_PARAMS: Accept a key value pair separated by a semicolon. For example: =;= for following = pairs:
key=group_name, value=shard group name
key=deploy_as, value=deploy shard group as primary or active_standby
key=group_region, value=shard group region name
**Notes**:
SHARD[1-9]_GROUP_PARAMS is in regex form. You can specify environment parameters based on your environment, such as SHARD1_GROUP_PARAMS, or SHARD2_GROUP_PARAMS.
Each SHARD[1-9]_GROUP_PARAMS must have the key value pair that you specify above.
CATALOG_PARAMS: Accept a key value pair separated by a semicolon. For example:
=;= for the following = pairs:
key=catalog_host, value=catalog hostname
key=catalog_db, value=catalog cdb name
key=catalog_pdb, value=catalog pdb name
key=catalog_port, value=catalog db port name
key=catalog_name, value=catalog name in GSM
key=catalog_region, value=specify comma-delimited region name for the catalog database deployment
key=catalog_chunks, value=number of chunks. In this example we used 12 for Oracle 23ai FREE Database
SHARD[1-9]_PARAMS: Accept a key value pair separated by semicolon. For example:
=;= for following = pairs:
key=shard_host, value=shard hostname
key=shard_db, value=shard cdb name
key=shard_pdb, value=shard pdb name
key=shard_port, value=shard db port
key=shard_group value=shard group name
**Notes**
SHARD[1-9]_PARAMS is in regex form. You can specify environment parameters based on your environment, such as SHARD1_PARAMS, SHARD2_PARAMS.
Each SHARD[1-9]_PARAMS must have the above key value pair.
SERVICE[1-9]_PARAMS: Accept a key value pair separated by a semicolon. For example:
=;= for following = pairs:
key=service_name, value=service name
key=service_role, value=service role. For example: primary, or physical_standby
**Notes**:
SERVICE[1-9]_PARAMS is in regex form. You can specify environment parameters based on your environment, such SERVICE1_PARAMS, SERVICE2_PARAMS.
Each SERVICE[1-9]_PARAMS must have the above key value pair.
COMMON_OS_PWD_FILE: Specify the Podman secret created with the encrypted password file
PWD.key: Specify the Podman secret with the password key file to decrypt the encrypted password
OP_TYPE: Specify the operation type. For GSM, it must be set to gsm.
DOMAIN: Domain of the container.
MASTER_GSM: Set value to "TRUE" if you want the GSM to be a master GSM. Otherwise, do not set it.
Optional Parameters:
SAMPLE_SCHEMA: Specify a value to "DEPLOY" if you want to deploy sample app schema in catalog DB during GSM setup.
CUSTOM_SHARD_SCRIPT_DIR: Specify the location of custom scripts that you want to run after setting up GSM.
CUSTOM_SHARD_SCRIPT_FILE: Specify the file name which must be available on CUSTOM_SHARD_SCRIPT_DIR location to be executed after GSM setup.
BASE_DIR: Specify BASE_DIR if you want to change the base location of the scripts to setup GSM. Note that the CUSTOM_SHARD_SCRIPT_DIR/CUSTOM_SHARD_SCRIPT_FILE will run after GSM setup, but BASE_DIR specifies the location of the scripts used to set up the GSM. The default is set to `$INSTALL_DIR/startup/scripts`.
SCRIPT_NAME: Specify the script name that will be run from BASE_DIR. The default is set to `main.py`.
EXECUTOR: Specify the script executor, such as `/bin/python` or `/bin/bash`. The default is set to `/bin/python`.
```
**Note:** Change environment variables such as DOMAIN, CATALOG_PARAMS, PRIMARY_SHARD_PARAMS, COMMON_OS_PWD_FILE and PWD_KEY according to your environment.
To check the gsm1 container and services creation logs, run a `tail` command on the Podman logs. It will take approximately two minutes to create the GSM container service.
```
podman logs -f gsm1
```
#### Create GSM Standby Container
You need a GSM standby container to serve the connection when the primary GSM fails.
##### Create Directory
```
mkdir -p /oradata/dbfiles/GSM2DATA
chown -R 54321:54321 /oradata/dbfiles/GSM2DATA
```
##### Create Container
```
podman run -d --hostname oshard-gsm2 \
--dns-search=example.com \
--network=shard_pub1_nw \
--ip=10.0.20.101 \
-e DOMAIN=example.com \
-e SHARD_DIRECTOR_PARAMS="director_name=sharddirector2;director_region=region2;director_port=1522" \
-e SHARD1_GROUP_PARAMS="group_name=shardgroup1;deploy_as=standby;group_region=region2" \
-e CATALOG_PARAMS="catalog_host=oshard-catalog-0;catalog_db=CATCDB;catalog_pdb=CAT1PDB;catalog_port=1521;catalog_name=shardcatalog1;catalog_region=region1,region2;catalog_chunks=12" \
-e SHARD1_PARAMS="shard_host=oshard1-0;shard_db=ORCL1CDB;shard_pdb=ORCL1PDB;shard_port=1521;shard_group=shardgroup1" \
-e SHARD2_PARAMS="shard_host=oshard2-0;shard_db=ORCL2CDB;shard_pdb=ORCL2PDB;shard_port=1521;shard_group=shardgroup1" \
-e SHARD3_PARAMS="shard_host=oshard3-0;shard_db=ORCL3CDB;shard_pdb=ORCL3PDB;shard_port=1521;shard_group=shardgroup1" \
-e SERVICE1_PARAMS="service_name=oltp_rw_svc;service_role=standby" \
-e SERVICE2_PARAMS="service_name=oltp_ro_svc;service_role=standby" \
-e CATALOG_SETUP="True" \
-e COMMON_OS_PWD_FILE=pwdsecret \
-e PWD_KEY=keysecret \
-e OP_TYPE=gsm \
--secret pwdsecret \
--secret keysecret \
-v /oradata/dbfiles/GSM2DATA:/opt/oracle/gsmdata \
-v /opt/containers/shard_host_file:/etc/hosts \
-p 1522:1522 \
--privileged=false \
--name gsm2 container-registry.oracle.com/database/gsm:free-latest
**Note:** Change environment variables such as DOMAIN, CATALOG_PARAMS, COMMON_OS_PWD_FILE and PWD_KEY according to your environment.
Mandatory Parameters:
CATALOG_SETUP: Accept True. if set, then it only restricts until catalog connection and setup are complete.
CATALOG_PARAMS: Accept key value pair separated by semicolon. For example: =;=. complete this for the following = pairs:
key=catalog_host, value=catalog hostname
key=catalog_db, value=catalog cdb name
key=catalog_pdb, value=catalog pdb name
key=catalog_port, value=catalog database port name
key=catalog_name, value=catalog name in GSM
key=catalog_region, value=specify comma-delimited region names for catalog database deployment
```
To check the gsm2 container and services creation logs, run a `tail` command on the Podman logs. It will take approximately two minutes to create the GSM container service.
```
podman logs -f gsm2
```
**IMPORTANT:** The resulting images will consist of an image with the Oracle GSM binaries installed. On first startup of the container, a new GSM setup will be created. When the GSM setup is ready to be used, the following lines are displayed:
```
==============================================
GSM Setup Completed
==============================================
```
## User Defined Sharding
The deployment of Oracle Globally Distributed Database described above uses System-Managed Sharding. If you want to use User-Defined Sharding to deploy an Oracle Globally Distributed Database, then see: [Container Based Sharding Deployment](https://github.com/oracle/db-sharding/blob/master/container-based-sharding-deployment/README.md).
## System-Managed Sharding using RAFT Replication
The deployment described above of Oracle Globally Distributed Database is using System-Managed Sharding. If you want to use System-Managed Sharding using RAFT Replication to deploy an Oracle Globally Distributed Database, then see: [Container Based Sharding Deployment](https://github.com/oracle/db-sharding/blob/master/container-based-sharding-deployment/README.md).
## Support
Oracle Global Service Manager (GSM) and Oracle Globally Distributed Database on Docker is supported on Oracle Linux 7.
Oracle Database 23ai GSM and Oracle Globally Distributed Database on Podman is supported on Oracle Linux 8 and onwards.
## License
To download and run Oracle GSM and Oracle Database, regardless whether inside or outside a Podman container, you must download the binaries from the Oracle website and accept the license indicated at that page.
All scripts and files hosted in this project and GitHub docker-images/OracleDatabase repository required to build the Podman images are, unless otherwise noted, released under UPL 1.0 license.
## Copyright
Copyright (c) 2014-2024 Oracle and/or its affiliates.