-
Notifications
You must be signed in to change notification settings - Fork 893
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add bentoml yatai stack contrib
- Loading branch information
Showing
14 changed files
with
13,196 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,29 @@ | ||
name: Build & Apply BentoML Yatai Stack manifests in KinD | ||
on: | ||
pull_request: | ||
paths: | ||
- contrib/bentoml/** | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install KinD | ||
run: ./tests/gh-actions/install_kind.sh | ||
|
||
- name: Create KinD Cluster | ||
run: kind create cluster --config tests/gh-actions/kind-cluster-1-24.yaml | ||
|
||
- name: Install kustomize | ||
run: ./tests/gh-actions/install_kustomize.sh | ||
|
||
- name: Install cert-manager | ||
run: ./tests/gh-actions/install_cert_manager.sh | ||
|
||
- name: Build & Apply manifests | ||
run: | | ||
cd contrib/bentoml/ | ||
make test |
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,35 @@ | ||
BENTOML_YATAI_IMAGE_BUILDER_VERSION ?= 1.1.3 | ||
BENTOML_YATAI_DEPLOYMENT_VERSION ?= 1.1.4 | ||
BENTOML_HELM_CHART_REPO ?= https://bentoml.github.io/helm-charts | ||
|
||
.PHONY: bentoml-yatai-stack/bases | ||
bentoml-yatai-stack/bases: clean-kustomize | ||
mkdir -p bentoml-yatai-stack/bases/yatai-image-builder | ||
cd bentoml-yatai-stack/bases/yatai-image-builder && helm template --skip-tests yatai-image-builder-crds yatai-image-builder-crds --repo ${BENTOML_HELM_CHART_REPO} --namespace kubeflow --version ${BENTOML_YATAI_IMAGE_BUILDER_VERSION} > resources.yaml | ||
cd bentoml-yatai-stack/bases/yatai-image-builder && helm template --skip-tests -f ../../../sources/yatai-image-builder-values.yaml yatai-image-builder yatai-image-builder --repo ${BENTOML_HELM_CHART_REPO} --namespace kubeflow --version ${BENTOML_YATAI_IMAGE_BUILDER_VERSION} >> resources.yaml | ||
cp sources/kustomization-template.yaml bentoml-yatai-stack/bases/yatai-image-builder/kustomization.yaml | ||
mkdir -p bentoml-yatai-stack/bases/yatai-deployment | ||
cd bentoml-yatai-stack/bases/yatai-deployment && helm template --skip-tests yatai-deployment-crds yatai-deployment-crds --repo ${BENTOML_HELM_CHART_REPO} --namespace kubeflow --version ${BENTOML_YATAI_DEPLOYMENT_VERSION} > resources.yaml | ||
cd bentoml-yatai-stack/bases/yatai-deployment && helm template --skip-tests -f ../../../sources/yatai-deployment-values.yaml yatai-deployment yatai-deployment --repo ${BENTOML_HELM_CHART_REPO} --namespace kubeflow --version ${BENTOML_YATAI_DEPLOYMENT_VERSION} >> resources.yaml | ||
cp sources/kustomization-template.yaml bentoml-yatai-stack/bases/yatai-deployment/kustomization.yaml | ||
|
||
.PHONY: clean-kustomize | ||
clean-kustomize: | ||
rm -rf bentoml-yatai-stack/bases | ||
|
||
.PHONY: test | ||
test: | ||
kubectl create ns kubeflow || echo "namespace kubeflow already exists" | ||
kustomize build bentoml-yatai-stack/default | kubectl apply --server-side -f - | ||
kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/yatai-image-builder | ||
kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/yatai-deployment | ||
sleep 5 | ||
kubectl apply -n kubeflow -f example.yaml | ||
sleep 5 | ||
kubectl -n kubeflow logs deploy/yatai-deployment | ||
sleep 5 | ||
kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/test-yatai | ||
kubectl -n kubeflow wait --for=condition=available --timeout=600s deploy/test-yatai-runner-0 | ||
kubectl delete -n kubeflow -f example.yaml | ||
kustomize build bentoml-yatai-stack/default | kubectl delete -f - | ||
|
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,3 @@ | ||
approvers: | ||
- yetone | ||
- yubozhao |
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,19 @@ | ||
# BentoML Yatai Stack | ||
|
||
[BentoML Yatai Stack](https://github.com/bentoml/yatai-deployment) is a series of components for deploying models/bentos to Kubernetes at scale | ||
|
||
## Requirements | ||
|
||
* Kubernetes 1.20 - 1.24 | ||
|
||
## Installation | ||
|
||
* The yaml assumes you will install in kubeflow namespace | ||
|
||
```bash | ||
kustomize build bentoml-yatai-stack/default | kubectl apply -n kubeflow --server-side -f - | ||
``` | ||
|
||
## Upgrating | ||
|
||
See [UPGRADE.md](UPGRADE.md) |
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,35 @@ | ||
# Upgrading Documentation | ||
|
||
## Updating manifests | ||
|
||
In order to update manifests make sure you are running the commands in linux. | ||
|
||
If you are running in another OS, please make sure to update the Makefile commands. | ||
|
||
You can refresh the configuration by running: | ||
|
||
``` | ||
make bentoml-yatai-stack/base | ||
``` | ||
|
||
## Updating to specific version | ||
|
||
Upgrading the version can be done by setting the `BENTOML_YATAI_STACK_VERSION` environment variable, such as: | ||
|
||
``` | ||
# Set the desired version | ||
export BENTOML_YATAI_IMAGE_BUILDER_VERSION=1.1.0 | ||
export BENTOML_YATAI_DEPLOYMENT_VERSION=1.1.0 | ||
# Rebuild the kustomize bases | ||
make bentoml-yatai-stack/bases | ||
# Run new manifests against cluster | ||
kustomize build bentoml-yatai-stack/default | kubectl apply -f - | ||
``` | ||
|
||
## Instructions for breaking changes | ||
|
||
The [Yatai upgrading docs](https://docs.bentoml.org/projects/yatai) provide step by step overview of breaking changes across minor and patch versions. | ||
|
||
|
2 changes: 2 additions & 0 deletions
2
contrib/bentoml/bentoml-yatai-stack/bases/yatai-deployment/kustomization.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,2 @@ | ||
resources: | ||
- resources.yaml |
Oops, something went wrong.