Before using the Product Master service, you need to create the schema for your database
by using a script that Product Master provides.
This is a one-time activity.
About this task
Create your database schema.Attention: Perform the following procedure only if
the schema is not present in your database.
Procedure
- Access the
productmaster-admin-<container-name> pod by using the
following command.
oc rsh productmaster-admin-<container-name>
- Load the environment variables by using the following command.
source /home/default/.bash_profile
- Run the script create_schema.sh from the
$TOP/bin/db/ directory to create your database schema.
cd $TOP/bin/db/
nohup ./create_schema.sh --silent &
- Check the schema creation status by using the following command.
- Verify schema by using the following command to run the test_db.sh
script.
sh-4.4$ source /home/default/.bash_profile
sh-4.4$ cd $TOP/bin
sh-4.4$ ./test_db.sh
====================================================
database user name: db2inst1
database user passwd: *****
JDBC driver type: 4
JDBC URL: jdbc:db2://x.x.x.x:50000/sampledb
====================================================
Connecting using JDBC SUCCESS
If the script displays success
, schema was successfully created. The
Product Master schema creation creates a default company 'trigo' with 'Admin' and 'Basic' users. The
password for both users is 'trinitron'.