-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Cleanup pipeline-lite deployment #1921
Changes from 15 commits
2beed9f
d4e98ee
be36a09
4c62abd
b3bafa6
96af91e
abc1cc5
9b31af2
391b6ec
3cbb118
c2a0784
0a4b47b
b4c37f1
b01e913
e39068a
a83fc1d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,40 @@ | ||
# Install Kubeflow Pipelines | ||
This folder contains Kubeflow Pipelines Kustomize manifests for a light weight deployment. You can follow the instruction and deploy Kubeflow Pipelines in an existing cluster. | ||
|
||
|
||
# TL;DR | ||
## TL;DR | ||
|
||
If you want to skip any customization, you can deploy Kubeflow Pipelines by running | ||
Deploy latest version of Kubeflow Pipelines | ||
``` | ||
export PIPELINE_VERSION=0.1.26 | ||
kubectl apply -f https://raw.githubusercontent.com/kubeflow/pipelines/$PIPELINE_VERSION/manifests/kustomize/namespaced-install.yaml | ||
``` | ||
|
||
You might lack the permission to create role and command might partially fail. If so, bind your account as cluster admin and rerun the same command. | ||
(Or role creator in your namespace) | ||
Then open the Pipeline main page | ||
``` | ||
kubectl create clusterrolebinding your-binding --clusterrole=cluster-admin --user=[your-user-name] | ||
``` | ||
|
||
When deployment is complete, you can access Kubeflow Pipelines UI by an IAM controlled public endpoint, which can be found by | ||
``` | ||
kubectl describe configmap inverse-proxy-config -n kubeflow | ||
open http://$(kubectl describe configmap inverse-proxy-config -n kubeflow | grep googleusercontent.com) | ||
``` | ||
and check the Hostname section. The endpoint should have format like **1234567-dot-datalab-vm-us-west1.googleusercontent.com** | ||
|
||
# Customization | ||
## Customization | ||
Customization can be done through Kustomize [Overlay](https://github.com/kubernetes-sigs/kustomize/blob/master/docs/glossary.md#overlay). | ||
|
||
Note - The instruction below assume you installed kubectl v1.14.0 or later, which has native support of kustomize. | ||
To get latest kubectl, visit [here](https://kubernetes.io/docs/tasks/tools/install-kubectl/) | ||
|
||
## Change deploy namespace | ||
### Deploy on GCP with CloudSQL and GCS | ||
See [here](env/gcp/README.md) for more details. | ||
|
||
### Change deploy namespace | ||
To deploy Kubeflow Pipelines in namespace FOO, | ||
- Edit [kustomization.yaml](env/dev/kustomization.yaml) namespace section to FOO | ||
- Edit [dev/kustomization.yaml](env/dev/kustomization.yaml) or [gcp/kustomization.yaml](env/gcp/kustomization.yaml) namespace section to FOO | ||
- Then run | ||
``` | ||
kubectl kustomize env/dev | kubectl apply -f - | ||
# or | ||
kubectl kustomize env/gcp | kubectl apply -f - | ||
``` | ||
|
||
## Disable the public endpoint | ||
### Disable the public endpoint | ||
By default, the deployment install an [invert proxy agent](https://github.com/google/inverting-proxy) that exposes a public URL. If you want to skip installing it, | ||
- Comment out the proxy component in the [kustomization.yaml](base/kustomization.yaml). | ||
- Then run | ||
|
@@ -51,7 +50,7 @@ and open http://localhost:8080/ | |
|
||
|
||
|
||
# Uninstall | ||
## Uninstall | ||
You can uninstall Kubeflow Pipelines by running | ||
``` | ||
kubectl delete -f https://raw.githubusercontent.com/kubeflow/pipelines/$PIPELINE_VERSION/manifests/kustomize/namespaced-install.yaml | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. done |
||
|
@@ -60,11 +59,26 @@ kubectl delete -f https://raw.githubusercontent.com/kubeflow/pipelines/$PIPELINE | |
Or if you deploy through kustomize | ||
``` | ||
kubectl kustomize env/dev | kubectl delete -f - | ||
# or | ||
kubectl kustomize env/gcp | kubectl delete -f - | ||
``` | ||
# FAQ | ||
|
||
## Troubleshooting | ||
|
||
### Permission error installing Kubeflow Pipelines to a cluster | ||
Run | ||
``` | ||
kubectl create clusterrolebinding your-binding --clusterrole=cluster-admin --user=[your-user-name] | ||
``` | ||
|
||
### Samples requires "user-gcp-sa" secret | ||
If sample code requires a "user-gcp-sa" secret, you could create one by | ||
- First download the GCE VM service account token following this [instruction](https://cloud.google.com/kubernetes-engine/docs/tutorials/authenticating-to-cloud-platform#step_3_create_service_account_credentials) | ||
- First download the GCE VM service account token [Document](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys) | ||
``` | ||
gcloud iam service-accounts keys create application_default_credentials.json \ | ||
--iam-account [SA-NAME]@[PROJECT-ID].iam.gserviceaccount.com | ||
``` | ||
- Run | ||
``` | ||
kubectl create secret -n [your-namespace] generic user-gcp-sa --from-file=user-gcp-sa.json=[your-token-file].json | ||
kubectl create secret -n [your-namespace] generic user-gcp-sa --from-file=user-gcp-sa.json=application_default_credentials.json | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# TL;DR | ||
1. To access the GCP services, the application needs a GCP service account token. Download the token to the current folder manifests/kustomize/env/gcp. [Reference](https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys) | ||
``` | ||
gcloud iam service-accounts keys create application_default_credentials.json \ | ||
--iam-account [SA-NAME]@[PROJECT-ID].iam.gserviceaccount.com | ||
``` | ||
2. [Create](https://cloud.google.com/sql/docs/mysql/quickstart) or use an existing CloudSQL instance. The service account should have the access to the CloudSQL instance. | ||
3. Fill in gcp-configurations-patch.yaml with your CloudSQL and GCS configuration. | ||
|
||
# Why Cloud SQL and GCS | ||
Kubeflow Pipelines keeps its metadata in mysql database and artifacts in S3 compatible object storage. | ||
Using CloudSQL and GCS for persisting the data provides better reliability and performance, as well as things like data backups, and usage monitoring. | ||
This is the recommended setup especially for production environments. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: apps/v1beta2 | ||
kind: Deployment | ||
metadata: | ||
name: ml-pipeline | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: ml-pipeline-api-server | ||
env: | ||
- name: OBJECTSTORECONFIG_BUCKETNAME | ||
# Don't add gs:// prefix. | ||
# If bucket doesn't exist, the deployment will create one. | ||
value: '' | ||
- name: DBCONFIG_PASSWORD | ||
value: '' | ||
--- | ||
apiVersion: apps/v1beta2 | ||
kind: Deployment | ||
metadata: | ||
name: cloudsqlproxy | ||
spec: | ||
template: | ||
spec: | ||
containers: | ||
- name: cloudsqlproxy | ||
env: | ||
- name: GCP_PROJECT | ||
value: '' | ||
- name: CLOUDSQL_ZONE | ||
# E.g. us-central1 | ||
value: '' | ||
- name: CLOUDSQL_INSTANCE_NAME | ||
value: '' |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
open
is only available on macOSThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done