Skip to content

Commit 1221686

Browse files
authored
Initial SelectAI Integration (#212)
* Helm Updates (remove Subcharts) * Helm Support for ADB-Free * VM CloudInit - Bootstrap non-Privileged User * Validate OMR Schema
1 parent af2be38 commit 1221686

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2916
-1523
lines changed

.github/workflows/opentofu.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,3 +39,14 @@ jobs:
3939
- name: Validate Infrastructure as Code formatting
4040
working-directory: ./opentofu
4141
run: terraform fmt -recursive -check
42+
43+
- name: Install Python & Dependencies
44+
run: |
45+
apk add --no-cache python3 py3-pip
46+
pip3 install --upgrade pip --break-system-packages
47+
pip3 install pyyaml jsonschema referencing --break-system-packages
48+
49+
- name: Validate Oracle Resource Manager Schema
50+
working-directory: ./tests/opentofu
51+
run: |
52+
python3 ./validate_omr_schema.py OMRMetaSchema.yaml ../../opentofu/schema.yaml

.github/workflows/pytest.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,6 @@ on:
77
- synchronize
88
- reopened
99
- ready_for_review
10-
paths:
11-
- "tests/**"
12-
- "src/**"
13-
- ".github/workflows/pytest.yml"
1410

1511
# Allows running this workflow manually
1612
workflow_dispatch:
@@ -52,6 +48,7 @@ jobs:
5248
run: |
5349
cd src/
5450
python -m pip install --upgrade pip wheel setuptools
51+
pip install torch==2.7.1+cpu -f https://download.pytorch.org/whl/cpu/torch
5552
pip install -e ".[all-test]"
5653
5754
- name: Run All Tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ opentofu/**/stage/kubeconfig
5252
##############################################################################
5353
# Helm
5454
##############################################################################
55+
helm/**/*.tgz
5556
helm/values*.yaml
5657
!helm/values.yaml
5758

docs/content/advanced/helm.md

Lines changed: 27 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ weight = 5
77
Copyright (c) 2024, 2025, Oracle and/or its affiliates.
88
Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
99
10-
spell-checker: ignore Ashburn
10+
spell-checker: ignore ashburn sidb myadb ocid ollama autonomousdatabase mxbai subcharts tolerations
1111
-->
1212

1313
The {{< full_app_ref >}} was specifically designed to run on infrastructure supporting microservices architecture, including [Kubernetes](https://kubernetes.io/). A [Helm](https://helm.sh/) Chart is provided to make the deployment easier.
@@ -73,11 +73,10 @@ The `global:` sections contains values that are shared across the chart and its
7373
|-----|------|---------|-------------|
7474
| global.api | object | | Either provide the 'apiKey' directly or provide a secretName referring to an existing Secret containing the API key. |
7575
| global.api.apiKey | string | `""` | Key for making API calls to the server. Recommended to supply at command line or use the secretName to avoid storing in the values file. Example: "abcd1234opt5678" |
76+
| global.api.secretKey | string | `"apiKey"` | Key name inside the Secret that contains the API key when secretName defined. |
7677
| global.api.secretName | string | `""` | Name of the Secret that stores the API key. This allows you to keep the API key out of the values file and manage it securely via Secrets. Example: "optimizer-api-keys" |
77-
| global.api.secretKey | string | `"api-key"` | Key name inside the Secret that contains the API key when secretName defined. |
7878
| global.baseUrlPath | string | `"/"` | URL path appended to the host. Example: "/test" results in URLs like http://hostname/test/... |
79-
| global.enableClient | bool | `true` | Deploy Web frontend client |
80-
| global.enableOllama | bool | `false` | Deploy Ollama and optionally pull models |
79+
8180
---
8281

8382
#### Server Settings
@@ -98,13 +97,20 @@ Configure the Oracle Database used by the {{< short_app_ref >}} API Server.
9897
| Key | Type | Default | Description |
9998
|-----|------|---------|-------------|
10099
| server.database.type | string | `""` | Either SIDB-FREE, ADB-FREE, or ADB-S |
100+
| server.database.image | object | | For SIDB-FREE/ADB-FREE, location of the image and its tag; Exclude for ADB-S |
101101
| server.database.image.repository | string | `""` | For SIDB-FREE/ADB-FREE, repository location of the image |
102102
| server.database.image.tag | string | `"latest"` | For SIDB-FREE/ADB-FREE, tag of the image |
103-
| server.database.ocid | string | `""` | For ADB-S, OCID of the Autonomous Database Exclude for SIDB-FREE/ADB-FREE |
103+
| server.database.authN | Required | | Application User Authentication/Connection Details If defined, used to create the user defined in the authN secret |
104104
| server.database.authN.secretName | string | `"db-authn"` | Name of Secret containing the authentication/connection details |
105105
| server.database.authN.usernameKey | string | `"username"` | Key in secretName containing the username |
106106
| server.database.authN.passwordKey | string | `"password"` | Key in secretName containing the password |
107107
| server.database.authN.serviceKey | string | `"service"` | Key in secretName containing the connection service name |
108+
| server.database.privAuthN | Optional | | Privileged User Authentication/Connection Details If defined, used to create the user defined in the authN secret |
109+
| server.database.privAuthN.secretName | string | `"db-priv-authn"` | secretName containing privileged user (i.e. ADMIN/SYSTEM) password |
110+
| server.database.privAuthN.passwordKey | string | `"password"` | Key in secretName containing the password |
111+
| server.database.oci_db | Optional | | For ADB-S, OCID of the Autonomous Database Exclude for SIDB-FREE/ADB-FREE |
112+
| server.database.oci_db.ocid | string | `""` | OCID of the DB |
113+
108114

109115
###### Examples
110116

@@ -119,28 +125,26 @@ A containerized single-instance Oracle Database:
119125
tag: latest
120126
```
121127

122-
**ADB-S**
123-
124-
A pre-deployed Oracle Autonomous Database (_requires_ the [OraOperator](https://github.com/oracle/oracle-database-operator) to be installed in the cluster):
128+
**ADB-FREE**
125129

130+
A containerized Autonomous Oracle Database:
126131
```yaml
127-
type: "ADB-S"
128-
ocid: "ocid1.autonomousdatabase.oc1..."
129-
authN:
130-
secretName: "db-authn"
132+
database:
133+
type: "ADB-FREE"
134+
image:
135+
repository: container-registry.oracle.com/database/adb-free
136+
tag: latest-23ai
131137
```
132138

133-
with an existing `db-authn` Secret:
139+
**ADB-S**
140+
141+
A pre-deployed Oracle Autonomous Database (_requires_ the [OraOperator](https://github.com/oracle/oracle-database-operator) to be installed in the cluster):
142+
134143
```yaml
135-
apiVersion: v1
136-
kind: Secret
137-
metadata:
138-
name: db-authn
139-
type: Opaque
140-
stringData:
141-
username: ADMIN
142-
password: "my-secret-password"
143-
service: "MYADB_TP"
144+
database:
145+
type: "ADB-S"
146+
oci_db:
147+
ocid: "ocid1.autonomousdatabase.oc1..."
144148
```
145149

146150
##### Server Oracle Cloud Infrastructure Settings
@@ -312,8 +316,6 @@ Give the **Helm Chart** a spin using a locally installed [Kind](https://kind.sig
312316
**OCI**: Remove the `server.oci_config` specification if skipping the above optional step.
313317

314318
```yaml
315-
global:
316-
enableOllama: true
317319
server:
318320
replicaCount: 1
319321
image:
@@ -324,14 +326,13 @@ Give the **Helm Chart** a spin using a locally installed [Kind](https://kind.sig
324326
image:
325327
repository: container-registry.oracle.com/database/free
326328
tag: latest
327-
oci_config:
328-
fileSecretName: "oci-config-file"
329329
client:
330330
replicaCount: 1
331331
image:
332332
repository: localhost/ai-optimizer-client
333333
tag: latest
334334
ollama:
335+
enabled: true
335336
replicaCount: 1
336337
models:
337338
enabled: true

helm/Chart.yaml

Lines changed: 4 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,14 @@
1-
## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
2-
## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.
3-
41
apiVersion: v2
52
name: ai-optimizer
63
description: A Helm chart Oracle AI Optimizer and Toolkit
7-
type: application
84
version: 1.1.0
95
appVersion: "1.1.0"
6+
type: application
7+
home: https://github.com/oracle-samples/ai-optimizer
8+
sources:
9+
- https://github.com/oracle-samples/ai-optimizer
1010
icon: https://github.com/oracle-samples/ai-optimizer/blob/main/src/client/media/logo.png
1111
maintainers:
1212
- name: Oracle
1313
email: obaas_ww@oracle.com
1414
url: https://github.com/oracle-samples/ai-optimizer
15-
16-
dependencies:
17-
- name: server
18-
version: 1.1.0
19-
repository: file://charts/server
20-
- name: client
21-
version: 1.1.0
22-
repository: file://charts/client
23-
condition: global.enableClient
24-
- name: ollama
25-
version: 1.1.0
26-
repository: file://charts/ollama
27-
condition: global.enableOllama

helm/README.md

Lines changed: 0 additions & 70 deletions
This file was deleted.

helm/charts/client/Chart.yaml

Lines changed: 0 additions & 13 deletions
This file was deleted.

helm/charts/client/templates/hpa.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

helm/charts/client/templates/ingress.yaml

Lines changed: 0 additions & 51 deletions
This file was deleted.

helm/charts/client/templates/service.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)