-
Notifications
You must be signed in to change notification settings - Fork 54
Add MLX readonly install k8s manifests #126
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
74efd90
add minimum k8s install
Tomcli bba8a45
update manifests to support readonly deployment
Tomcli ec8acd3
optimize and update manifests and quickstart files
Tomcli a645734
remove api access token config
Tomcli ffffb0d
change default secret name
Tomcli 096252d
update manifests to be more feasible
Tomcli 9fcb58a
add missing namespace
Tomcli 5487399
Update main readme to a compacted setup of MLX
Tomcli 7a54d3a
fix initdb config mounting
Tomcli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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,36 @@ | ||
| # Copyright 2021 IBM Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| --- | ||
| apiVersion: networking.istio.io/v1alpha3 | ||
| kind: VirtualService | ||
| metadata: | ||
| name: mlx-api | ||
| namespace: kubeflow | ||
| spec: | ||
| gateways: | ||
| - kubeflow-gateway | ||
| hosts: | ||
| - '*' | ||
| http: | ||
| - match: | ||
| - uri: | ||
| prefix: /apis/v1alpha1 | ||
| rewrite: | ||
| uri: /apis/v1alpha1 | ||
| route: | ||
| - destination: | ||
| host: mlx-api.kubeflow.svc.cluster.local | ||
| port: | ||
| number: 80 | ||
| timeout: 300s |
This file contains hidden or 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 @@ | ||
|
|
||
| # Copyright 2021 IBM Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
| apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| resources: | ||
| - mlx-api.yaml | ||
| - mlx-ui.yaml |
This file contains hidden or 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 hidden or 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 hidden or 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,36 @@ | ||
| # Copyright 2021 IBM Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
| apiVersion: networking.istio.io/v1alpha3 | ||
| kind: VirtualService | ||
| metadata: | ||
| name: mlx-ui | ||
| namespace: kubeflow | ||
| spec: | ||
| gateways: | ||
| - kubeflow-gateway | ||
| hosts: | ||
| - '*' | ||
| http: | ||
| - match: | ||
| - uri: | ||
| prefix: /mlx | ||
| rewrite: | ||
| uri: /mlx | ||
| route: | ||
| - destination: | ||
| host: mlx-ui.kubeflow.svc.cluster.local | ||
| port: | ||
| number: 80 | ||
| timeout: 300s |
This file contains hidden or 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,34 @@ | ||
| apiVersion: v1 | ||
| kind: ConfigMap | ||
| metadata: | ||
| name: mysql-initdb-config | ||
| namespace: kubeflow | ||
| data: | ||
| initdb.sql: | | ||
| CREATE TABLE IF NOT EXISTS `pipelines` ( | ||
| `UUID` varchar(255) NOT NULL, | ||
| `CreatedAtInSec` bigint(20) NOT NULL, | ||
| `Name` varchar(255) NOT NULL, | ||
| `Description` longtext NOT NULL, | ||
| `Parameters` longtext NOT NULL, | ||
| `Status` varchar(255) NOT NULL, | ||
| `DefaultVersionId` varchar(255) DEFAULT NULL, | ||
| `Namespace` varchar(63) DEFAULT '', | ||
| PRIMARY KEY (`UUID`), | ||
| UNIQUE KEY `name_namespace_index` (`Name`,`Namespace`) | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
|
|
||
| CREATE TABLE IF NOT EXISTS `pipeline_versions` ( | ||
| `UUID` varchar(255) NOT NULL, | ||
| `CreatedAtInSec` bigint(20) NOT NULL, | ||
| `Name` varchar(255) NOT NULL, | ||
| `Parameters` longtext NOT NULL, | ||
| `PipelineId` varchar(255) NOT NULL, | ||
| `Status` varchar(255) NOT NULL, | ||
| `CodeSourceUrl` varchar(255) DEFAULT NULL, | ||
| PRIMARY KEY (`UUID`), | ||
| UNIQUE KEY `idx_pipelineid_name` (`Name`,`PipelineId`), | ||
| KEY `idx_pipeline_versions_CreatedAtInSec` (`CreatedAtInSec`), | ||
| KEY `idx_pipeline_versions_PipelineId` (`PipelineId`), | ||
| CONSTRAINT `pipeline_versions_PipelineId_pipelines_UUID_foreign` FOREIGN KEY (`PipelineId`) REFERENCES `pipelines` (`UUID`) ON DELETE CASCADE ON UPDATE CASCADE | ||
| ) ENGINE=InnoDB DEFAULT CHARSET=latin1; | ||
This file contains hidden or 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,62 @@ | ||
| apiVersion: batch/v1 | ||
| kind: Job | ||
| metadata: | ||
| name: miniosetup | ||
| namespace: kubeflow | ||
| labels: | ||
| app: miniosetup | ||
| spec: | ||
| backoffLimit: 10 | ||
| template: | ||
| spec: | ||
| restartPolicy: Never | ||
| containers: | ||
| - args: | ||
| - | | ||
| /usr/bin/mc config host add miniohost http://minio-service:9000 $MINIO_ACCESS_KEY $MINIO_SECRET_KEY; | ||
| /usr/bin/mc mb -p miniohost/mlpipeline; | ||
| /usr/bin/mc policy set download miniohost/mlpipeline; | ||
| command: | ||
| - /bin/sh | ||
| - -c | ||
| env: | ||
| - name: MINIO_ACCESS_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mlpipeline-minio-artifact | ||
| key: accesskey | ||
| - name: MINIO_SECRET_KEY | ||
| valueFrom: | ||
| secretKeyRef: | ||
| name: mlpipeline-minio-artifact | ||
| key: secretkey | ||
| image: minio/mc | ||
| name: minio | ||
| --- | ||
| apiVersion: batch/v1 | ||
| kind: Job | ||
| metadata: | ||
| name: katalog | ||
| namespace: kubeflow | ||
| labels: | ||
| app: katalog | ||
| spec: | ||
| backoffLimit: 10 | ||
| template: | ||
| spec: | ||
| restartPolicy: Never | ||
| containers: | ||
| - command: | ||
| - /bin/sh | ||
| - -c | ||
| - | | ||
| cd /tmp && | ||
| curl -L --output init_catalog.sh https://raw.githubusercontent.com/machine-learning-exchange/mlx/main/quickstart/init_catalog.sh && | ||
ckadner marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| curl -L --output catalog_upload.json https://raw.githubusercontent.com/machine-learning-exchange/mlx/main/bootstrapper/catalog_upload.json && | ||
| chmod 777 init_catalog.sh && | ||
| ./init_catalog.sh | ||
| env: | ||
| - name: MLX_API_SERVER | ||
| value: mlx-api:80 | ||
| image: curlimages/curl | ||
| name: katalog | ||
This file contains hidden or 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,24 @@ | ||
| apiVersion: networking.k8s.io/v1 | ||
| kind: Ingress | ||
| metadata: | ||
| name: mlx-ingress | ||
| namespace: kubeflow | ||
| annotations: | ||
| nginx.ingress.kubernetes.io/rewrite-target: / | ||
| spec: | ||
| tls: | ||
| - hosts: | ||
| - ml-exchange.org | ||
| secretName: mlx-certs | ||
| rules: | ||
| - http: | ||
| paths: | ||
| - path: / | ||
| pathType: Prefix | ||
| backend: | ||
| service: | ||
| name: mlx-ui | ||
| port: | ||
| number: 80 | ||
| host: $(ingress-domain) | ||
|
|
This file contains hidden or 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,43 @@ | ||
| # Copyright 2021 IBM Corporation | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License.apiVersion: kustomize.config.k8s.io/v1beta1 | ||
| kind: Kustomization | ||
| bases: | ||
| - ../base/mlx-deployments | ||
| resources: | ||
| - minio.yaml | ||
| - mysql.yaml | ||
| - namespace.yaml | ||
| - k8s-ingress.yaml | ||
| - init-jobs.yaml | ||
| - config.yaml | ||
| patchesStrategicMerge: | ||
| - mlx-api-patch.yaml | ||
| - mlx-ui-patch.yaml | ||
| configMapGenerator: | ||
| - name: mlx-parameters | ||
| literals: | ||
| # Update the credentials for the below fields before apply. | ||
| - ingress-domain=ml-exchange.org | ||
| generatorOptions: | ||
| disableNameSuffixHash: true | ||
| vars: | ||
| - name: ingress-domain | ||
| objref: | ||
| kind: ConfigMap | ||
| name: mlx-parameters | ||
| apiVersion: v1 | ||
| fieldref: | ||
| fieldpath: data.ingress-domain | ||
| configurations: | ||
| - params.yaml |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.