Skip to content

Sample SIDB YAML file changes #34

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 0 additions & 29 deletions config/samples/sidb/oraclerestdataservice_apex.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,6 @@
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

apiVersion: v1
kind: Secret
metadata:
name: ords-secret
namespace: default
type: Opaque
stringData:
## Specify your ORDS password here
oracle_pwd:

---

apiVersion: v1
kind: Secret
metadata:
name: apex-secret
namespace: default
type: Opaque
stringData:
## Specify your APEX password here
## This password should complete the following requirements:
## 1. Contain at least 6 characters.
## 2. Contain at least one numeric character (0123456789).
## 3. Contain at least one punctuation character (!"#$%&()``*+,-/:;?_).
## 4. Contain at least one uppercase alphabetic character.
oracle_pwd:

---

apiVersion: database.oracle.com/v1alpha1
kind: OracleRestDataService
metadata:
Expand Down
12 changes: 0 additions & 12 deletions config/samples/sidb/oraclerestdataservice_create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

apiVersion: v1
kind: Secret
metadata:
name: ords-secret
namespace: default
type: Opaque
stringData:
## Specify your ORDS password here
oracle_pwd:

---

apiVersion: database.oracle.com/v1alpha1
kind: OracleRestDataService
metadata:
Expand Down
33 changes: 33 additions & 0 deletions config/samples/sidb/oraclerestdataservice_secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

## ORDS password secret
apiVersion: v1
kind: Secret
metadata:
name: ords-secret
namespace: default
type: Opaque
stringData:
## Specify your ORDS password here
oracle_pwd:

---

## APEX password secret
apiVersion: v1
kind: Secret
metadata:
name: apex-secret
namespace: default
type: Opaque
stringData:
## Specify your APEX password here
## This password should complete the following requirements:
## 1. Contain at least 6 characters.
## 2. Contain at least one numeric character (0123456789).
## 3. Contain at least one punctuation character (!"#$%&()``*+,-/:;?_).
## 4. Contain at least one uppercase alphabetic character.
oracle_pwd:
12 changes: 0 additions & 12 deletions config/samples/sidb/singleinstancedatabase_create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

apiVersion: v1
kind: Secret
metadata:
name: db-admin-secret
namespace: default
type: Opaque
stringData:
# Specify your DB password here
oracle_pwd:

---

apiVersion: database.oracle.com/v1alpha1
kind: SingleInstanceDatabase
metadata:
Expand Down
12 changes: 0 additions & 12 deletions config/samples/sidb/singleinstancedatabase_express.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

apiVersion: v1
kind: Secret
metadata:
name: xedb-admin-secret
namespace: default
type: Opaque
stringData:
## Specify your DB password here
oracle_pwd:

---

apiVersion: database.oracle.com/v1alpha1
kind: SingleInstanceDatabase
metadata:
Expand Down
12 changes: 0 additions & 12 deletions config/samples/sidb/singleinstancedatabase_prebuiltdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,6 @@
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

apiVersion: v1
kind: Secret
metadata:
name: prebuiltdb-admin-secret
namespace: default
type: Opaque
stringData:
## Specify your DB password here
oracle_pwd:

---

apiVersion: database.oracle.com/v1alpha1
kind: SingleInstanceDatabase
metadata:
Expand Down
41 changes: 41 additions & 0 deletions config/samples/sidb/singleinstancedatabase_secrets.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#
# Copyright (c) 2022, Oracle and/or its affiliates.
# Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl.
#

## Database Admin Password Secret
apiVersion: v1
kind: Secret
metadata:
name: db-admin-secret
namespace: default
type: Opaque
stringData:
## Specify your DB password here
oracle_pwd:

---

## Oracle Database XE Admin password secret
apiVersion: v1
kind: Secret
metadata:
name: prebuiltdb-admin-secret
namespace: default
type: Opaque
stringData:
## Specify your DB password here
oracle_pwd:

---

## Prebuilt-Database Admin password secret
apiVersion: v1
kind: Secret
metadata:
name: xedb-admin-secret
namespace: default
type: Opaque
stringData:
## Specify your DB password here
oracle_pwd:
33 changes: 30 additions & 3 deletions docs/sidb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,9 @@ The `adminPassword` field in the above `singleinstancedatabase.yaml` file refers

Create this secret using the following command as an example:

kubectl create secret generic admin-secret --from-literal=oracle_pwd=<specify password here>
kubectl create secret generic db-admin-secret --from-literal=oracle_pwd=<specify password here>

This command creates a secret named `admin-secret`, with the key `oracle_pwd` mapped to the actual password specified in the command.
This command creates a secret named `db-admin-secret`, with the key `oracle_pwd` mapped to the actual password specified in the command.

### Create a Database

Expand Down Expand Up @@ -198,6 +198,13 @@ This command pulls the XE image uploaded on the [Oracle Container Registry](http
- For XE database, only single replica mode (i.e. `replicas: 1`) is supported.
- For XE database, you **cannot change** the init parameters i.e. `cpuCount, processes, sgaTarget or pgaAggregateTarget`.

#### Additional Information
You are required to specify the database admin password secret in the corresponding YAML file. The default values mentioned in the `adminPassword.secretName` fields of [singleinstancedatabase_create.yaml](../../config/samples/sidb/singleinstancedatabase_create.yaml), [singleinstancedatabase_prebuiltdb.yaml](../../config/samples/sidb/singleinstancedatabase_prebuiltdb.yaml) and [singleinstancedatabase_express.yaml](../../config/samples/sidb/singleinstancedatabase_express.yaml) files are `db-admin-secret`, `prebuiltdb-admin-secret`, and `xedb-admin-secret` respectively. You can create these secrets manually by using the sample command mentioned in the [Template YAML](#template-yaml) section. Alternatively, you can create these secrets by filling the passwords in the **[singleinstancedatabase_secrets.yaml](../../config/samples/sidb/singleinstancedatabase_secrets.yaml)** file and applying it using the command below:

```bash
kubectl apply -f singleinstancedatabase_secrets.yaml
```

### Connecting to Database

Creating a new database instance takes a while. When the `status` column returns the response `Healthy`, the Database is open for connections.
Expand Down Expand Up @@ -587,6 +594,20 @@ $ kubectl apply -f oraclerestdataservice_create.yaml
```
After this command completes, ORDS is installed in the container database (CDB) of the Single Instance Database.

##### NOTE:
You are required to specify the ORDS secret in the [oraclerestdataservice_create.yaml](../../config/samples/sidb/oraclerestdataservice_create.yaml) file. The default value mentioned in the `adminPassword.secretName` field is `ords-secret`. You can create this secret manually by using the following command:

```bash
kubectl create secret generic ords-secret --from-literal=oracle_pwd=<specify password here>
```

Alternatively, you can create this secret and the APEX secret by filling the passwords in the **[oraclerestdataservice_secrets.yaml](../../config/samples/sidb/oraclerestdataservice_secrets.yaml)** file and applying it using the command below:

```bash
kubectl apply -f singleinstancedatabase_secrets.yaml
```
The APEX secret created above, will be used while [installing APEX](#apex-installation).

#### Creation Status

Creating a new ORDS instance takes a while. To check the status of the ORDS instance, use the following command:
Expand Down Expand Up @@ -743,7 +764,13 @@ The `OraOperator` facilitates installation of APEX in the database and also conf

kubectl apply -f oraclerestdataservice_apex.yaml

* The APEX Password is used as a common password for `APEX_PUBLIC_USER, APEX_REST_PUBLIC_USER, APEX_LISTENER` and Apex administrator (username: `ADMIN`) mapped to secretKey.
* The APEX Password is used as a common password for `APEX_PUBLIC_USER, APEX_REST_PUBLIC_USER, APEX_LISTENER` and Apex administrator (username: `ADMIN`) mapped to secretKey. You can create APEX secret using the following command:

```bash
kubectl create secret generic apex-secret --from-literal=oracle_pwd=<specify password here>
```
Please refer [this](#note) section for APEX secret creation using the **[oraclerestdataservice_secrets.yaml](../../config/samples/sidb/oraclerestdataservice_secrets.yaml)** file.

* The status of ORDS turns to `Updating` during APEX configuration, and changes to `Healthy` after successful configuration. You can also check status by using the following command:


Expand Down