oracle / oracle-database-operator

The Oracle Database Operator for Kubernetes (a.k.a. OraOperator) helps developers, DBAs, DevOps and GitOps teams reduce the time and complexity of deploying and managing Oracle Databases. It eliminates the dependency on a human operator or administrator for the majority of database operations.
Universal Permissive License v1.0
141 stars 45 forks source link

Sample yaml file for using 'Kind: CDB' on GKE / Google Cloud #131

Open dazdaz opened 2 months ago

dazdaz commented 2 months ago

Sample 'Kind: CDB' sample yaml for GKE on Google Cloud.

There is a sample here for OCI, can we have one for other cloud providers. https://github.com/oracle/oracle-database-operator/blob/main/docs/multitenant/provisioning/cdb.yaml

What steps are required to get this to work on Google Cloud.

ilfur commented 2 months ago

Hi dazdaz (weeeee I loved my Amiga, still have a highly modded A500 somewhere in my shelf), I am no OraOperator developer, but another user - maybe I can help out. I too think this should be documented a bit differently, but to the best of my knowledge this CDB example will work for other cloud providers too, just need to modify the connect string to point to Your personal CDB somewhere. From the configuration in the CDB.yaml I can see that the CDB mentioned is running in the same VCN/network as the kubernetes cluster. So basically You need some Oracle Database running somewhere addressible (firewall open on port 1521, routes OK) and it should work. What I successfully tried out was to host a SingleInstanceDatabase as resource in my kubernetes cluster (like 23free or 19 enterprise) and THEN use that SAME database for CDB and PDB resources. So You can both patch it and manage PDBs in it. Quite practical. Hope that helps - or just write me for more YAMLs :-)

dazdaz commented 2 months ago

Hi there, thanks for the message ... the Amiga certainly is timeless :)

This is where i'm at: a) I've had to create a whole bunch of K8s RBAC config b) Created a service in GKE, equivalent to use networking inside the cluster c) I am using this image, but don't know if there's anything later ? ordsImage: "fra.ocir.io/frul1g8cgfam/pub_ordsrestmgmt:23.1"

Comparing against your YAML files would be very helpful, would you mind throwing them up into your repo ?

ilfur commented 2 months ago

Hi, in fact there is a newer image for ords: fra.ocir.io/frul1g8cgfam/pub_ordsrestmgmt:23.4 This is the latest one I got working - the REST Management API for Oracle Databases has changed in later images and OraOperator cannot create new PDBs anymore when using ORDS >= 24.x

My github project "OraOperatorDBWithApp" has several branches, the branch "sidbpluscdb" currently contains cdb/pdb resources for a remote Oracle Database outside kubernetes. Some commits back it was based on an in-cluster Oracle 23free database though, so there was also a "sidb.yaml" file which You can recover if You like. https://github.com/ilfur/OraOperatorDBWithApp/tree/sidbpluscdb