After the EDB Postgres service is
installed on IBM Cloud Pak® for Data, if you have access to
the cluster, you can use a custom resource file to deploy one or more instances of EDB Postgres. Using a custom resource to deploy
EDB Postgres provides more flexibility than
using the web console.
Procedure
-
Use the following sample YAML file as a template for your custom resource. Edit the values
needed for your environment. See ../sys-reqs/storage-requirements.html#compute-requirements__stg-class-edb, for a list of
compatible storage options for EDB Postgres.
apiVersion: edb.cpd.ibm.com/v1
kind: CPDEdbInstance
metadata:
name: <yourEDBInstanceName> #Replace with your instance name
spec:
type: Standard #Replace with your EDB instance type - Enterprise or Standard
members: 1
version: "12.11" #Replace with the version of your EDB instance
storageClass: <yourStorageClass> #Replace with your storage class
shutdown: false
storageSize: 100Gi
resources:
requests:
cpu: 1
memory: 4Gi
limits:
cpu: 1
memory: 4Gi
An
EDB Postgres Enterprise license is required to
enable
Oracle compatibility. Complete the
following steps to add the feature:
- Under
spec
, add oracleCompatibility: true
.
- Update
type
with Enterprise
.
- Apply the YAML file to the same namespace that Cloud Pak for Data was installed in by running the following
command:
oc apply -f CR-file.yaml -n ${PROJECT_CPD_INSTANCE}
It might take up to five minutes for the instance to be ready.
- Use the following command to check the status of the instance:
oc describe CPDEdbInstance cpdedbinstance-cr-compability-demo
Output of the command will look similar to the following:
Status:
Conditions:
Ansible Result:
Changed: 5
Completion: 2021-06-23T20:29:03.857898
Failures: 0
Ok: 27
Skipped: 5
Last Transition Time: 2021-06-23T20:28:08Z
Message: Awaiting next reconciliation
Reason: Successful
Status: True
Type: Running
Edb Status: In Progress
Edb URL: jdbc:edb://cpdedbinstance-cr-compability-demo-edb-db.zen:5432/edb
The instance is ready for use when Edb Status
changes from In
Progress
to Completed
.
What to do next
See Administering the EDB Postgres service, for details on what you can do with an EDB Postgres deployment.