-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
modules: | ||
opensearch: | ||
path: oci://ghcr.io/kusionstack/opensearch | ||
version: 0.1.0 | ||
configs: | ||
default: | ||
region: us-east-1 | ||
clusterConfig: | ||
instanceType: r6g.large.search | ||
ebsOptions: | ||
ebsEnabled: true | ||
volumeSize: 10 | ||
statement: | ||
- effect: Allow | ||
principals: | ||
- type: AWS | ||
identifiers: | ||
- "*" | ||
action: | ||
- es:* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[package] | ||
name = "example" | ||
|
||
[dependencies] | ||
kam = { git = "https://github.com/KusionStack/kam.git", tag = "0.2.0-beta" } | ||
service = { oci = "oci://ghcr.io/kusionstack/service", tag = "0.1.0-beta" } | ||
opensearch = { oci = "oci://ghcr.io/kusionstack/opensearch", tag = "0.1.0" } | ||
|
||
[profile] | ||
entries = ["main.k"] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# The configuration codes in perspective of developers. | ||
import kam.v1.app_configuration as ac | ||
import service as svc | ||
import service.secret as sec | ||
import service.container as c | ||
import opensearch.opensearch as o | ||
|
||
agent: ac.AppConfiguration { | ||
# Declare the workload configurations. | ||
workload: svc.Service { | ||
containers: { | ||
opensearch: c.Container { | ||
image: "kusionstack/ai-agent-demo:v0.1.0" | ||
env: { | ||
"OPENAI_API_KEY": "secret://ai-agent/OPENAI_API_KEY" | ||
# "RAG_ENABLED": "true" | ||
# "OPEN_SEARCH_AK": "secret://ai-agent/OPEN_SEARCH_AK" | ||
# "OPEN_SEARCH_SK": "secret://ai-agent/OPEN_SEARCH_SK" | ||
} | ||
} | ||
} | ||
# Secrets used to retrieve secret data from AWS Secrets Manager | ||
secrets: { | ||
"ai-agent": sec.Secret { | ||
type: "external" | ||
data: { | ||
"OPENAI_API_KEY": "ref://ai-agent/OPENAI_API_KEY" | ||
# "OPEN_SEARCH_AK": "ref://ai-agent/OPEN_SEARCH_AK" | ||
# "OPEN_SEARCH_SK": "ref://ai-agent/OPEN_SEARCH_SK" | ||
} | ||
} | ||
} | ||
} | ||
# Declare the openSearch module configurations. | ||
accessories: { | ||
"opensearch": o.OpenSearch { | ||
domainName: "ai-agent-demo" | ||
engineVersion: "OpenSearch_2.13" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
name: dev |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
name: ai-agent-demo |