Skip to content
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
11 changes: 11 additions & 0 deletions .github/workflows/opentofu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,14 @@ jobs:
- name: Validate Infrastructure as Code formatting
working-directory: ./opentofu
run: terraform fmt -recursive -check

- name: Install Python & Dependencies
run: |
apk add --no-cache python3 py3-pip
pip3 install --upgrade pip --break-system-packages
pip3 install pyyaml jsonschema referencing --break-system-packages

- name: Validate Oracle Resource Manager Schema
working-directory: ./tests/opentofu
run: |
python3 ./validate_omr_schema.py OMRMetaSchema.yaml ../../opentofu/schema.yaml
5 changes: 1 addition & 4 deletions .github/workflows/pytest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
- synchronize
- reopened
- ready_for_review
paths:
- "tests/**"
- "src/**"
- ".github/workflows/pytest.yml"

# Allows running this workflow manually
workflow_dispatch:
Expand Down Expand Up @@ -52,6 +48,7 @@ jobs:
run: |
cd src/
python -m pip install --upgrade pip wheel setuptools
pip install torch==2.7.1+cpu -f https://download.pytorch.org/whl/cpu/torch
pip install -e ".[all-test]"

- name: Run All Tests
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ opentofu/**/stage/kubeconfig
##############################################################################
# Helm
##############################################################################
helm/**/*.tgz
helm/values*.yaml
!helm/values.yaml

Expand Down
53 changes: 27 additions & 26 deletions docs/content/advanced/helm.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ weight = 5
Copyright (c) 2024, 2025, Oracle and/or its affiliates.
Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.

spell-checker: ignore Ashburn
spell-checker: ignore ashburn sidb myadb ocid ollama autonomousdatabase mxbai subcharts tolerations
-->

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.
Expand Down Expand Up @@ -73,11 +73,10 @@ The `global:` sections contains values that are shared across the chart and its
|-----|------|---------|-------------|
| global.api | object | | Either provide the 'apiKey' directly or provide a secretName referring to an existing Secret containing the API key. |
| 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" |
| global.api.secretKey | string | `"apiKey"` | Key name inside the Secret that contains the API key when secretName defined. |
| 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" |
| global.api.secretKey | string | `"api-key"` | Key name inside the Secret that contains the API key when secretName defined. |
| global.baseUrlPath | string | `"/"` | URL path appended to the host. Example: "/test" results in URLs like http://hostname/test/... |
| global.enableClient | bool | `true` | Deploy Web frontend client |
| global.enableOllama | bool | `false` | Deploy Ollama and optionally pull models |

---

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


###### Examples

Expand All @@ -119,28 +125,26 @@ A containerized single-instance Oracle Database:
tag: latest
```

**ADB-S**

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

A containerized Autonomous Oracle Database:
```yaml
type: "ADB-S"
ocid: "ocid1.autonomousdatabase.oc1..."
authN:
secretName: "db-authn"
database:
type: "ADB-FREE"
image:
repository: container-registry.oracle.com/database/adb-free
tag: latest-23ai
```

with an existing `db-authn` Secret:
**ADB-S**

A pre-deployed Oracle Autonomous Database (_requires_ the [OraOperator](https://github.com/oracle/oracle-database-operator) to be installed in the cluster):

```yaml
apiVersion: v1
kind: Secret
metadata:
name: db-authn
type: Opaque
stringData:
username: ADMIN
password: "my-secret-password"
service: "MYADB_TP"
database:
type: "ADB-S"
oci_db:
ocid: "ocid1.autonomousdatabase.oc1..."
```

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

```yaml
global:
enableOllama: true
server:
replicaCount: 1
image:
Expand All @@ -324,14 +326,13 @@ Give the **Helm Chart** a spin using a locally installed [Kind](https://kind.sig
image:
repository: container-registry.oracle.com/database/free
tag: latest
oci_config:
fileSecretName: "oci-config-file"
client:
replicaCount: 1
image:
repository: localhost/ai-optimizer-client
tag: latest
ollama:
enabled: true
replicaCount: 1
models:
enabled: true
Expand Down
21 changes: 4 additions & 17 deletions helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,14 @@
## Copyright (c) 2024, 2025, Oracle and/or its affiliates.
## Licensed under the Universal Permissive License v1.0 as shown at http://oss.oracle.com/licenses/upl.

apiVersion: v2
name: ai-optimizer
description: A Helm chart Oracle AI Optimizer and Toolkit
type: application
version: 1.1.0
appVersion: "1.1.0"
type: application
home: https://github.com/oracle-samples/ai-optimizer
sources:
- https://github.com/oracle-samples/ai-optimizer
icon: https://github.com/oracle-samples/ai-optimizer/blob/main/src/client/media/logo.png
maintainers:
- name: Oracle
email: [email protected]
url: https://github.com/oracle-samples/ai-optimizer

dependencies:
- name: server
version: 1.1.0
repository: file://charts/server
- name: client
version: 1.1.0
repository: file://charts/client
condition: global.enableClient
- name: ollama
version: 1.1.0
repository: file://charts/ollama
condition: global.enableOllama
70 changes: 0 additions & 70 deletions helm/README.md

This file was deleted.

13 changes: 0 additions & 13 deletions helm/charts/client/Chart.yaml

This file was deleted.

34 changes: 0 additions & 34 deletions helm/charts/client/templates/hpa.yaml

This file was deleted.

51 changes: 0 additions & 51 deletions helm/charts/client/templates/ingress.yaml

This file was deleted.

19 changes: 0 additions & 19 deletions helm/charts/client/templates/service.yaml

This file was deleted.

Loading