This repository has been archived by the owner on Oct 6, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathsetup-elyra.sh
executable file
·36 lines (31 loc) · 1.76 KB
/
setup-elyra.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
set -x
replace_invalid_characters (){
python -c 'import sys;print(sys.argv[1].translate ({ord(c): "-" for c in "!@#$%^&*()[]{};:,/<>?\|`~=_+"}))' "$1"
}
# Assumptions are existing kubeflow installation is in the kubeflow namespace
DEFAULT_RUNTIME_FILE=$(jupyter --data-dir)/metadata/runtimes/my_kfp.json
COS_BUCKET=$(replace_invalid_characters "$COS_BUCKET")
export COS_BUCKET=${COS_BUCKET:-default}
# If Kubeflow credentials are not supplied, use default Kubeflow installation credentials
KF_USERNAME="${KF_USERNAME:[email protected]}"
KF_PASSWORD="${KF_PASSWORD:=12341234}"
KF_DEPLOYMENT_NAMESPACE=$(env | grep JUPYTER_IMAGE | cut -d'/' -f2)
AWS_ACCESS_KEY_ID="${AWS_ACCESS_KEY_ID:=minio}"
AWS_SECRET_ACCESS_KEY="${AWS_SECRET_ACCESS_KEY:=minio123}"
if [[ ! -f "$DEFAULT_RUNTIME_FILE" ]]; then
elyra-metadata install runtimes --schema_name=kfp \
--name=my_kfp \
--display_name=Default \
--user_namespace="$KF_DEPLOYMENT_NAMESPACE" \
--auth_type=DEX_STATIC_PASSWORDS \
--api_endpoint=http://ml-pipeline."$KF_DEPLOYMENT_NAMESPACE"/pipeline \
--api_username="$KF_USERNAME" \
--api_password="$KF_PASSWORD" \
--cos_endpoint=http://minio-service."$KF_DEPLOYMENT_NAMESPACE":9000 \
--cos_auth_type=USER_CREDENTIALS \
--cos_username="$AWS_ACCESS_KEY_ID" \
--cos_password="$AWS_SECRET_ACCESS_KEY" \
--cos_bucket="$COS_BUCKET" \
--engine=Tekton
fi