-
Notifications
You must be signed in to change notification settings - Fork 68
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add helm chart for deploying GMC itself (#249)
Signed-off-by: Lianhao Lu <[email protected]>
- Loading branch information
Showing
17 changed files
with
551 additions
and
24 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
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
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
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
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
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,27 @@ | ||
# Copyright (C) 2024 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
apiVersion: v2 | ||
name: gmc | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.9.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "v0.8" |
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,82 @@ | ||
# Helm chart for genai-microservices-connector(GMC) | ||
|
||
Helm chart for deploying the genai-microservices-connector(GMC) service on a Kubernetes cluster. | ||
|
||
## Installing the GMC Helm Chart | ||
|
||
To use this GMC helm chart, you need to have a Kubernetes cluster and helm installed. If you don't have helm(version >= 3.15) installed, you can follow the instructions [here](https://helm.sh/docs/intro/install/). | ||
|
||
This helm chart will install the following components of GMC: | ||
|
||
- GMC CRD | ||
- GenAI Components and GMC Router manifests | ||
- GMC Manager | ||
|
||
**NOTE: Because helm doesn't support updating/deleting CRD, you need to manually delete the CRD before upgrading the GMC helm chart.** | ||
|
||
**Get related manifests for GenAI Components** | ||
|
||
```sh | ||
cd GenAIInfra/microservices-connector | ||
mkdir -p $(pwd)/config/manifests | ||
cp $(dirname $(pwd))/manifests/common/*.yaml -p $(pwd)/config/manifests/ | ||
``` | ||
|
||
**NOTE:** | ||
Before installting the manifests, please replace your own huggingface tokens,Google API KEY and Google CSE ID in the manifests: | ||
|
||
```sh | ||
export YOUR_HF_TOKEN=<your hugging facetoken> | ||
export YOUR_GOOGLE_API_KEY=<your google api key> | ||
export YOUR_GOOGLE_CSE_ID=<your google cse id> | ||
find helm/manifests_common/ -name '*.yaml' -type f -exec sed -i "s#insert-your-huggingface-token-here#$YOUR_HF_TOKEN#g" {} \; | ||
find helm/manifests_common/ -name '*.yaml' -type f -exec sed -i "s#GOOGLE_API_KEY:.*#GOOGLE_API_KEY: "$YOUR_GOOGLE_API_KEY"#g" {} \; | ||
find helm/manifests_common/ -name '*.yaml' -type f -exec sed -i "s#GOOGLE_CSE_ID:.*#GOOGLE_CSE_ID: "$YOUR_GOOGLE_CSE_ID"#g" {} \; | ||
``` | ||
|
||
if you have pre-defined directory to save the models on you cluster hosts, please set the path to the manifests | ||
|
||
```sh | ||
export MOUNT_DIR=<your model path> | ||
find helm/manifests_common/ -name '*.yaml' -type f -exec sed -i "s#path: /mnt/opea-models#path: $MOUNT_DIR#g" {} \; | ||
``` | ||
|
||
**NOTE:** | ||
GMC manager, GenAI components and GMC router manifests are deployed in any namespace. Here we use `system` as an examep: | ||
|
||
```console | ||
helm install -n system --create-namespace gmc helm | ||
``` | ||
|
||
## Check the installation result | ||
|
||
Run the command `kubectl get pod -n system` to make sure all pods are running: | ||
|
||
``` | ||
NAME READY STATUS RESTARTS AGE | ||
gmc-contoller-8bcb9d469-l6fsj 1/1 Running 0 55s | ||
``` | ||
|
||
## Next step | ||
|
||
After the GMC is installed, you can follow the [GMC user guide](../usage_guide.md) for sample use cases. | ||
|
||
## Uninstall | ||
|
||
**Delete the instances (CRs) from the cluster if you have ever deployed the instances from GMC user guide:** | ||
|
||
```sh | ||
kubectl delete -k config/samples/ | ||
``` | ||
|
||
**UnDeploy the GMC manager and GenAI components and GMC router manifest from the cluster:** | ||
|
||
```sh | ||
helm delete -n system gmc | ||
``` | ||
|
||
**Delete the APIs(CRDs) from the cluster:** | ||
|
||
```sh | ||
kubectl delete crd gmconnectors.gmc.opea.io | ||
``` |
1 change: 1 addition & 0 deletions
1
microservices-connector/helm/crds/gmc.opea.io_gmconnectors.yaml
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 @@ | ||
../../config/crd/bases/gmc.opea.io_gmconnectors.yaml |
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 @@ | ||
../config/gmcrouter/gmc-router.yaml |
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 @@ | ||
../config/manifests |
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,2 @@ | ||
Please checkout https://github.com/opea-project/GenAIInfra/blob/main/microservices-connector/usage_guide.md for usage guide. | ||
|
Oops, something went wrong.