Running MongoDB and PGSQL on OCP 4.x
The key objective is to document detailed steps to bring up Mongodb and PGSQL pods in an OCS 4.x environment.
NB:
-
The scripts are taken from here
-
Currently, the PVC Access Mode = RWO for both the workloads. Need to change the Access Mode for PGSQL once RAW Block- volume support is introduced.
-
In all the scripts, the names of pods, their DeploymentConfigs and their respective namespaces are kept SIMILAR for simplicity.
-
Both mongodb and pgsql folder have a README copied from here for better understanding.
Pre-requisites
-
Clone the github repo $ git clone https://github.com/nehaberry/workloads.git
-
Edit the deploy-mongodb.sh to change volumeCapacity and memoryLimit as per test requirement.
-
Edit the run-workload-mongodb.sh to change following params based on test requirement:
threads, recordCount, operationCount, iterations
-
Edit the wrapper scripts (pod-create.sh and run-io.sh) as per test requirements.
-
Navigate to mongodb folder
$ cd ./mongodb
-
Create Mongodb pod (sh deploy-mongodb.sh <name of pod/namespace>
e.g.: $ sh deploy-mongodb.sh mongodb-1 csi-rbd
-
Create the ycsb pod (syntax: sh ycsb.sh )
e.g.: $ sh ycsb.sh ycsb-1 mongodb-1
-
Start the Workload (syntax: sh run-workload-mongodb.sh )
e.g.: $ sh run-workload-mongodb.sh mongodb-1 ycsb-1
-
Check the run logs in files prefixed with output-* in the current folder
-
Create a set of mongodb & ycsb pods (syntax: sh pod-create.sh )
e.g.: $ sh pod-create.sh mongodb csi-rbd ycsb
-
Run Workload (syntax: run-io.sh )
e.g.: $ sh run-io.sh sh mongodb ycsb ./iter1/
NB: The workload is run in background using nohup.
-
Check IO Navigate to the LogLocation folder and check the run logs.
Pre-requisites
-
Clone the github repo
$ git clone https://github.com/nehaberry/workloads.git`
-
Edit the deploy-pgsql.sh to change volumeCapacity and memoryLimit as per test requirement.
-
Edit the run-workload-pgsql.sh to change following params based on test requirement: scaling, clients, threads, transactions, iterations
-
Edit the wrapper scripts (pod-create.sh and run-io.sh) as per test requirements.
-
Navigate to pgsql folder
$ cd ./pgsql
-
Create PGSQL pod (syntax: sh deploy-pgsql.sh )
e.g.: $ sh deploy-pgsql.sh pgsql-1 csi-rbd
-
Run Workload (syntax: sh run-workload-pgsql.sh )
e.g.: $ sh run-workload-pgsql.sh pgsql-1
-
Check the run logs in files prefixed with output-* in the current folder
-
Create multiple pods (syntax: sh pod-create.sh )
e.g.: $ sh pod-create.sh pgsql csi-rbd
-
Run Workload (syntax: run-io.sh )
e.g.: $ sh run-io.sh pgsql ./iter1/
-
Check IO Navigate to the Log Location folder and check the logs.