-
Notifications
You must be signed in to change notification settings - Fork 10
/
run_kfctl.sh
executable file
·46 lines (32 loc) · 1.14 KB
/
run_kfctl.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
37
38
39
40
41
42
43
44
45
46
#!/bin/bash
#
# A hack script for rerunning the kfctl commands.
# Intended for quick iteration during development
set -ex
BOOTSTRAPDIR=/home/jlewi/git_kubeflow-kfctl
APPNAME=jl-stack-$(date +%m%d-%H%M%S)
APPDIR=~/tmp/stack_apps/${APPNAME}
# Source iap secrets
. ~/secrets/jlewi-dev.oauth.sh
cd ${BOOTSTRAPDIR}
make build-kfctl-fast
KFCTL=${BOOTSTRAPDIR}/bin/linux/kfctl
mkdir -p ${APPDIR}
MANIFESTSDIR=/home/jlewi/git_kubeflow-manifests/stacks/examples
CFGNAME=kfctl_gcp_stacks.experimental.yaml
cp ${MANIFESTSDIR}/${CFGNAME} ${APPDIR}/
CFGFILE=${APPDIR}/${CFGNAME}
# Zero out the name
PROJECT=jlewi-dev
ZONE=us-east1-d
yq w -i ${CFGFILE} metadata.name ""
yq w -i ${CFGFILE} spec.project ${PROJECT} # Work around for
yq w -i ${CFGFILE} spec.zone ${ZONE} # Work around for https://github.com/kubeflow/kubeflow/issues/3703
# Use local manifests
yq w -i ${CFGFILE} spec.repos[0].uri /home/jlewi/git_kubeflow-manifests
#--use_basic_auth
${KFCTL} build all -V -f ${CFGFILE}
# Generate the output for testing
cd ${APPDIR}/kustomize/kubeflow-apps
mkdir -p /tmp/stack_apps/${APPNAME}
kustomize build --load_restrictor none -o /tmp/stack_apps/${APPNAME}