Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update README.md #27

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
35 changes: 17 additions & 18 deletions docker-based-sharding-deployment/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,35 +33,35 @@ To deploy a Oracle Sharding topology, please execute the steps in the following
12. [Copyright](#copyright)

### Create Oracle Global Service Manager Image
**IMPORTANT:** You will have to provide the installation binaries of Oracle Global Service Manager Oracle Database 19c (19.3) for Linux x86-64 and put them into the `dockerfiles/<version>` folder. You only need to provide the binaries for the edition you are going to install. The binaries can be downloaded from the [Oracle Technology Network](http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html). You also have to make sure to have internet connectivity for yum.
**IMPORTANT:** You will have to provide the installation binaries of Oracle Global Service Manager Oracle Database 21c (21.3) or 19c (19.3) for Linux x86-64 and put them into the `dockerfiles/<version>` folder. You only need to provide the binaries for the edition you are going to install. The binaries can be downloaded from the [Oracle Technology Network](http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html). You also have to make sure to have internet connectivity for yum.
**Note:** You must not uncompress the binaries.

The `buildContainerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their preferred set of parameters. Before you build the image make sure that you have provided the installation binaries and put them into the right folder. Go into the **dockerfiles** folder and run the **buildContainerImage.sh** the script as root or with sudo privileges:
The `buildContainerImage.sh` script is just a utility shell script that performs MD5 checks and is an easy way for beginners to get started. Expert users are welcome to directly call `docker build` with their preferred set of parameters. Before you build the image make sure that you have provided the installation binaries and put them into the right folder. Go into the **dockerfiles** folder and run the **buildContainerImage.sh** the script as root or with sudo privileges. For example: For 21c, use the below command:

```
./buildContainerImage.sh -v (Software Version)
./buildContainerImage.sh -v 19.3.0
./buildContainerImage.sh -v 21.3.0
```
For detailed usage of command, please execute following command:
```
./buildContainerImage.sh -h
```
### Create Oracle Database Image
To build Oracle Sharding on docker/container, you need to download and build Oracle 19.3 Database image, please refer [README.MD](https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md) of Oracle Single Database available on Oracle GitHub repository.
To build Oracle Sharding on docker container, you need to download and build Oracle Database image for the required version, please refer [README.MD](https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md) of Oracle Single Database available on Oracle GitHub repository.

**Note**: You just need to create the image as per the instructions given in [README.MD](https://github.com/oracle/docker-images/blob/master/OracleDatabase/SingleInstance/README.md) but you will create the container as per the steps given in this document under [Create Containers](#create-containers) section.

### Create Extended Oracle Database Image with Sharding Feature
After creating the base image using buildContainerImage.sh in the previous step, use buildExtensions.sh present under the extensions folder to build an extended image that will include the Sharding Feature. Please refer [README.MD](https://github.com/oracle/docker-images/blob/main/OracleDatabase/SingleInstance/extensions/README.md) of extensions folder of Oracle Single Database available on Oracle GitHub repository.

For example:
For example: To extend the 21.3 Database Image with Sharding Feature, use the command like below:
```
./buildExtensions.sh -a -x sharding -b oracle/database:19.3.0-ee -t oracle/database-ext-sharding:19.3.0-ee
./buildExtensions.sh -a -x sharding -b oracle/database:21.3.0-ee -t oracle/database-ext-sharding:21.3.0-ee

Where:
"-x sharding" is to specify to have sharding feature in the extended image
"-b oracle/database:19.3.0-ee" is to specify the Base image created in previous step
"oracle/database-ext-sharding:19.3.0-ee" is to specify the name:tag for the extended image with Sharding Feature
"-b oracle/database:21.3.0-ee" is to specify the Base image created in previous step
"oracle/database-ext-sharding:21.3.0-ee" is to specify the name:tag for the extended image with Sharding Feature
```

### Create Network Bridge
Expand Down Expand Up @@ -154,7 +154,7 @@ Before performing catalog container, review the following notes carefully:
* Change environment variable such as ORACLE_SID, ORACLE_PDB based on your env.
* Change /oradata/dbfiles/CATALOG based on your enviornment.
* By default, sharding setup creates new database under `/opt/oracle/oradata` based on ORACLE_SID enviornment variable.
* If you are planing to perform seed cloning to expedite the sharding setup using existing cold DB backup, you need to replace following `--name catalog oracle/database:19.3.0-ee` to `--name catalog oracle/database:19.3.0-ee /opt/oracle/scripts/setup/runOraShardSetup.sh`
* If you are planing to perform seed cloning to expedite the sharding setup using existing cold DB backup, you need to replace following `--name catalog oracle/database:21.3.0-ee` to `--name catalog oracle/database:21.3.0-ee /opt/oracle/scripts/setup/runOraShardSetup.sh`
* In this case, /oradata/dbfiles/CATALOG must contain the DB backup and it must not be in zipped format. E.g. /oradata/dbfiles/CATALOG/SEEDCDB where SEEDCDB is the cold backup and contains datafiles and PDB.
```
docker run -d --hostname oshard-catalog-0 \
Expand All @@ -172,7 +172,7 @@ docker run -d --hostname oshard-catalog-0 \
-v /opt/containers/shard_host_file:/etc/hosts \
--volume /opt/.secrets:/run/secrets \
--privileged=false \
--name catalog oracle/database:19.3.0-ee
--name catalog oracle/database:21.3.0-ee

Mandatory Parameters:
COMMON_OS_PWD_FILE: Specify the encrypted password file to be read inside the ontainer
Expand Down Expand Up @@ -225,7 +225,7 @@ Before creating shard1 container, review the following notes carefully:
* Change environment variable such as ORACLE_SID, ORACLE_PDB based on your env.
* Change /oradata/dbfiles/ORCL1CDB based on your enviornment.
* By default, sharding setup creates new database under `/opt/oracle/oradata` based on ORACLE_SID enviornment variable.
* If you are planing to perform seed cloning to expedite the sharding setup using existing cold DB backup, you need to replace following `--name shard1 oracle/database:19.3.0-ee` to `--name shard1 oracle/database:19.3.0-ee /opt/oracle/scripts/setup/runOraShardSetup.sh`
* If you are planing to perform seed cloning to expedite the sharding setup using existing cold DB backup, you need to replace following `--name shard1 oracle/database:21.3.0-ee` to `--name shard1 oracle/database:21.3.0-ee /opt/oracle/scripts/setup/runOraShardSetup.sh`
* In this case, `/oradata/dbfiles/ORCL1CDB` must contain the DB backup and it must not be zipped. E.g. `/oradata/dbfiles/ORCL1CDB/SEEDCDB` where `SEEDCDB` is the cold backup and contains datafiles and PDB.

```
Expand All @@ -244,7 +244,7 @@ docker run -d --hostname oshard1-0 \
-v /opt/containers/shard_host_file:/etc/hosts \
--volume /opt/.secrets:/run/secrets \
--privileged=false \
--name shard1 oracle/database:19.3.0-ee
--name shard1 oracle/database:21.3.0-ee

Mandatory Parameters:
COMMON_OS_PWD_FILE: Specify the encrypted password file to be read inside container
Expand Down Expand Up @@ -275,7 +275,7 @@ Before creating shard1 container, review the following notes carefully:
* Change environment variable such as ORACLE_SID, ORACLE_PDB based on your env.
* Change /oradata/dbfiles/ORCL2CDB based on your enviornment.
* By default, sharding setup creates new database under `/opt/oracle/oradata` based on ORACLE_SID enviornment variable.
* If you are planing to perform seed cloning to expedite the sharding setup using existing cold DB backup, you need to replace following `--name shard2 oracle/database:19.3.0-ee` to `--name shard2 oracle/database:19.3.0-ee /opt/oracle/scripts/setup/runOraShardSetup.sh`
* If you are planing to perform seed cloning to expedite the sharding setup using existing cold DB backup, you need to replace following `--name shard2 oracle/database:21.3.0-ee` to `--name shard2 oracle/database:21.3.0-ee /opt/oracle/scripts/setup/runOraShardSetup.sh`
* In this case, `/oradata/dbfiles/ORCL2CDB` must contain the DB backup and it must not be zipped. E.g. `/oradata/dbfiles/ORCL2CDB/SEEDCDB` where `SEEDCDB` is the cold backup and contains datafiles and PDB.

```
Expand All @@ -294,7 +294,7 @@ docker run -d --hostname oshard2-0 \
-v /opt/containers/shard_host_file:/etc/hosts \
--volume /opt/.secrets:/run/secrets \
--privileged=false \
--name shard2 oracle/database:19.3.0-ee
--name shard2 oracle/database:21.3.0-ee

Mandatory Parameters:
COMMON_OS_PWD_FILE: Specify the encrypted password file to be read inside the container
Expand Down Expand Up @@ -356,7 +356,7 @@ chown -R 54321:54321 /oradata/dbfiles/GSMDATA
-e OP_TYPE=gsm \
-e MASTER_GSM="TRUE" \
--privileged=false \
--name gsm1 oracle/database-gsm:19.3.0
--name gsm1 oracle/database-gsm:21.3.0

Mandatory Parameters:
SHARD_DIRECTOR_PARAMS: Accept key value pair separated by semicolon e.g. <key>=<value>;<key>=<value> for following <key>=<value> pairs:
Expand Down Expand Up @@ -447,7 +447,7 @@ chown -R 54321:54321 /oradata/dbfiles/GSM2DATA
--volume /opt/.secrets:/run/secrets \
-e OP_TYPE=gsm \
--privileged=false \
--name gsm2 oracle/database-gsm:19.3.0
--name gsm2 oracle/database-gsm:21.3.0
**Note:** Change environment variables such as DOMAIN, CATALOG_PARAMS, COMMON_OS_PWD_FILE and PWD_KEY according to your environment.

Mandatory Parameters:
Expand All @@ -469,11 +469,10 @@ docker logs -f gsm2

**IMPORTANT:** The resulting images will be an image with the Oracle GSM binaries installed. On first startup of the container a new GSM setup will be created, the following lines highlight when the GSM setup is ready to be used:

```

##############################################
Oracle GSM Setup Completed Successfully!
###############################################
```

## Support

Expand Down