Skip to content
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

Use ks env for pipeline namespace #326

Merged
merged 10 commits into from
Nov 20, 2018
Merged
5 changes: 3 additions & 2 deletions ml-pipeline/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,8 @@ else
fi

# Generate a ksonnet component manifest and assign parameters
( cd ${APP_DIR} && ks generate ml-pipeline ml-pipeline --namespace=${NAMESPACE} )
( cd ${APP_DIR} && ks generate ml-pipeline ml-pipeline )
( cd ${APP_DIR} && ks env set default --namespace ${NAMESPACE} )
( cd ${APP_DIR} && ks param set ml-pipeline api_image ${API_SERVER_IMAGE} )
( cd ${APP_DIR} && ks param set ml-pipeline scheduledworkflow_image ${SCHEDULED_WORKFLOW_IMAGE} )
( cd ${APP_DIR} && ks param set ml-pipeline persistenceagent_image ${PERSISTENCE_AGENT_IMAGE} )
Expand Down Expand Up @@ -182,7 +183,7 @@ if [ "$WITH_KUBEFLOW" = true ]; then
if [[ ${REPORT_USAGE} != "true" ]]; then
(cd ${KUBEFLOW_REPO} && sed -i -e 's/--reportUsage\=true/--reportUsage\=false/g' scripts/util.sh)
fi
(${KUBEFLOW_REPO}/scripts/kfctl.sh init ${KFAPP} --platform none)
(${KUBEFLOW_REPO}/scripts/kfctl.sh init ${KFAPP} --platform gcp)
(cd ${KFAPP} && ${KUBEFLOW_REPO}/scripts/kfctl.sh generate k8s && ${KUBEFLOW_REPO}/scripts/kfctl.sh apply k8s)
fi

Expand Down
8 changes: 5 additions & 3 deletions ml-pipeline/ml-pipeline/all.libsonnet
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
{
parts(params):: {
parts(_env, _params):: {
local params = _env + _params,

local argo = import "ml-pipeline/ml-pipeline/argo.libsonnet",
local minio = import "ml-pipeline/ml-pipeline/minio.libsonnet",
local mysql = import "ml-pipeline/ml-pipeline/mysql.libsonnet",
Expand Down Expand Up @@ -30,7 +32,7 @@
pipeline_scheduledworkflow.all(namespace,scheduledworkflow_image) +
pipeline_persistenceagent.all(namespace,persistenceagent_image) +
pipeline_ui.all(namespace,ui_image) +
$.parts(params).argo +
$.parts(params).reporting,
$.parts(_env, _params).argo +
$.parts(_env, _params).reporting,
},
}
3 changes: 1 addition & 2 deletions ml-pipeline/ml-pipeline/prototypes/ml-pipeline.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
// @description ML pipeline. Currently includes pipeline API server, frontend and dependencies.
// @shortDescription ML pipeline
// @param name string Name to give to each of the components
// @optionalParam namespace string default Namespace
// @optionalParam api_image string gcr.io/ml-pipeline/api-server:0.1.2 API docker image
// @optionalParam scheduledworkflow_image string gcr.io/ml-pipeline/scheduledworkflow:0.1.2 schedule workflow docker image
// @optionalParam persistenceagent_image string gcr.io/ml-pipeline/persistenceagent:0.1.2 persistence agent docker image
Expand All @@ -14,4 +13,4 @@
local k = import "k.libsonnet";
local all = import "ml-pipeline/ml-pipeline/all.libsonnet";

std.prune(k.core.v1.list.new(all.parts(params).all))
std.prune(k.core.v1.list.new(all.parts(env, params).all))
2 changes: 1 addition & 1 deletion test/presubmit-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ if [ "$CLUSTER_TYPE" == "create-gke" ]; then
echo "Delete cluster..."
gcloud container clusters delete ${TEST_CLUSTER} --async
}
trap delete_cluster EXIT
# trap delete_cluster EXIT
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do not forget to uncomment this line before merging.


gcloud config set project ml-pipeline-test
gcloud config set compute/zone us-central1-a
Expand Down