Skip to content

Commit d26a51b

Browse files
Merge branch 'rcitton' into 'master'
ords dockerfile fix, oneprem readme change See merge request rac-docker-dev/oracle-database-operator!203
2 parents 26c58b9 + c3f2920 commit d26a51b

File tree

2 files changed

+36
-14
lines changed

2 files changed

+36
-14
lines changed

docs/onpremdb/README.md

Lines changed: 35 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
The On-Premise Database Controller enables provisioning of Oracle Databases (PDBs) both on a Kubernetes cluster or outside of a Kubernetes cluster. The following sections explain the setup and functionality of this controller:
44

55
* [Prerequisites for On-Premise Database Controller](ORACLE_ONPREMDB_CONTROLLER_README.md#prerequisites-and-setup)
6-
* [Kubernetes Secrets](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-secrets)
7-
* [Kubernetes CRD for CDB](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-crd-for-cdb)
6+
* [Kubernetes Secrets](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-secrets)
7+
* [Kubernetes CRD for CDB](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-crd-for-cdb)
88
* [Kubernetes CRD for PDB](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-crd-for-pdb)
99
* [PDB Lifecycle Management Operations](ORACLE_ONPREMDB_CONTROLLER_README.md#pdb-lifecycl-management-operations)
1010
* [Validation and Errors](ORACLE_ONPREMDB_CONTROLLER_README.md#validation-and-errors)
@@ -14,7 +14,7 @@ The On-Premise Database Controller enables provisioning of Oracle Databases (PDB
1414
+ ### Prepare CDB for PDB Lifecycme Management (PDB-LM)
1515

1616
Pluggable Database management is performed in the Container Database (CDB) and includes create, clone, plug, unplug, delete, modify and map operations.
17-
You cannot have an ORDS enabled schema in the container database. To perform the PDB lifecycle management operations, the default CDB administrator credentials must be defined.
17+
You cannot have an ORDS enabled schema in the container database. To perform the PDB lifecycle management operations, the default CDB administrator credentials must be defined.
1818

1919
To define the default CDB administrator credentials, perform the following steps on the target CDB(s) where PDB-LM operations are to be performed:
2020

@@ -26,34 +26,56 @@ The On-Premise Database Controller enables provisioning of Oracle Databases (PDB
2626
```
2727
+ ### Building the Oracle REST Data Service (ORDS) Image
2828

29-
Oracle On-Premise Database controller enhances the Oracle REST Data Services (ORDS) image to enable it for PDB Lifecycle Management. You can build this image by following the instructions below:
30-
* After cloning the repository, go to the "ords" folder, and run:
29+
Oracle On-Premise Database controller enhances the Oracle REST Data Services (ORDS) image to enable it for PDB Lifecycle Management. You can build this image by following the instructions below:
30+
* After cloning the repository, go to the "ords" folder, and run:
3131
```sh
3232
docker build -t oracle/ords-dboper:latest .
3333
```
34-
* Once the image is ready, you need to push it to your Docker Images Repository to pull it during CDB Resource creation.
34+
35+
> **_NOTE1:_** Required file to build this image is Oracle Rest Data Services 'ords-< version >.zip',
36+
you can download such file from http://www.oracle.com/technetwork/developer-tools/rest-data-services/downloads/index.html
37+
38+
> **_NOTE2:_** to build the ords image you need to Accept the Oracle Standard Terms and Restrictions for Java/jdk repository on Oracle Container Registry at https://container-registry.oracle.com
39+
40+
> **_NOTE3:_** docker needs access to container-registry.oracle.com for which following command may be required:
41+
```sh
42+
docker login container-registry.oracle.com
43+
```
44+
> **_NOTE4:_** if you are going to deploy inside minikube, you need to switch the env to it, issuing:
45+
```sh
46+
eval $(minikube docker-env)
47+
```
48+
* Once the image is ready, you may need to push it to your Docker Images Repository to pull it during CDB controller resource creation.
3549

3650
+ ### Install cert-manager
3751

3852
Validating webhook is an endpoint Kubernetes can invoke prior to persisting resources in ETCD. This endpoint returns a structured response indicating whether the resource should be rejected or accepted and persisted to the datastore.
3953

4054
Webhook requires a TLS certificate that the apiserver is configured to trust . Install the cert-manager with the following command:
41-
55+
4256
```sh
4357
kubectl apply -f https://github.com/jetstack/cert-manager/releases/latest/download/cert-manager.yaml
4458
```
4559

4660
## Kubernetes Secrets
4761

48-
Both CDBs and PDBs make use of Kubernetes Secrets to store usernames and passwords.
62+
Both CDBs and PDBs make use of Kubernetes Secrets to store usernames and passwords.
4963

5064
For CDB, create a secret file as shown here: [config/samples/onpremdb/cdb_secret.yaml](../../config/samples/onpremdb/cdb_secret.yaml)
5165

5266
```sh
5367
$ kubectl apply -f cdb_secret.yaml
5468
secret/cdb1-secret created
5569
```
56-
On successful creation of the CDB Resource, the CDB secrets would be deleted from the Kubernetes system.
70+
> **_NOTE:_** the entries such user and password must be 'base64 encoded', example:
71+
"cdbadmin_user=C##DBAPI_CDB_ADMIN" become cdbadmin_user: "QyMjREJBUElfQ0RCX0FETUlOCg==" using command:
72+
73+
```sh
74+
echo C##DBAPI_CDB_ADMIN | base64
75+
QyMjREJBUElfQ0RCX0FETUlOCg==
76+
```
77+
78+
On successful creation of the CDB Resource, the CDB secrets would be deleted from the Kubernetes system.
5779

5880
For PDB, create a secret file as shown here: [config/samples/onpremdb/pdb_secret.yaml](../../config/samples/onpremdb/pdb_secret.yaml)
5981

@@ -68,7 +90,7 @@ The On-Premise Database Controller enables provisioning of Oracle Databases (PDB
6890
$ kubectl create secret generic pdb1-secret --from-literal sysadmin_user=pdbadmin --from-literal sysdamin_pwd=WE2112#232#
6991
secret/pdb1-secret created
7092
```
71-
93+
7294
## Kubernetes CRD for CDB
7395
7496
The Oracle Database Operator creates the CDB kind as a custom resource that models a target CDB as a native Kubernetes object. This is only used to create Pods to connect to the target CDB to perform PDB-LM operations. These CDB resources can be scaled up and down based on the expected load using replicas. Each CDB resource follows the CDB CRD as defined here: [config/crd/bases/database.oracle.com_cdbs.yaml](../../config/crd/bases/database.oracle.com_cdbs.yaml)
@@ -77,7 +99,7 @@ The On-Premise Database Controller enables provisioning of Oracle Databases (PDB
7799
78100
A sample .yaml file is available here: [config/samples/onpremdb/cdb.yaml](../../config/samples/onpremdb/cdb.yaml)
79101
80-
**Note:** The password and username fields in the above `cdb.yaml` yaml are Kubernetes Secrets. Please see the section [Kubernetes Secrets](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-secrets) for more information.
102+
**Note:** The password and username fields in the above `cdb.yaml` yaml are Kubernetes Secrets. Please see the section [Kubernetes Secrets](ORACLE_ONPREMDB_CONTROLLER_README.md#kubernetes-secrets) for more information.
81103
82104
+ ### Check the status of the all CDBs
83105
```sh
@@ -153,7 +175,7 @@ The On-Premise Database Controller enables provisioning of Oracle Databases (PDB
153175
+ ### Map PDB
154176
155177
This is used to map an existing PDB in the CDB as a Kubernetes Custom Resource.
156-
A sample .yaml file is available here: [config/samples/onpremdb/pdb_map.yaml](../../config/samples/onpremdb/pdb_map.yaml)
178+
A sample .yaml file is available here: [config/samples/onpremdb/pdb_map.yaml](../../config/samples/onpremdb/pdb_map.yaml)
157179
158180
## Validation and Errors
159181
@@ -210,4 +232,4 @@ $ kubectl get pdbs -A
210232
NAMESPACE NAME CONNECT STRING CDB NAME PDB NAME PDB SIZE STATUS MESSAGE
211233
oracle-database-operator-system pdb1 democdb demotest1 Failed Secret not found:pdb12-secret
212234
oracle-database-operator-system pdb2 democdb demotest2 Failed ORA-65016: FILE_NAME_CONVERT must be specified...
213-
```
235+
```

ords/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#
2121
# Pull base image
2222
# ---------------
23-
FROM container-registry.oracle.com/java/serverjre:8
23+
FROM container-registry.oracle.com/java/jdk:latest
2424

2525
# Environment variables required for this build (do NOT change)
2626
# -------------------------------------------------------------

0 commit comments

Comments
 (0)