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

Create a deployment script for gke and minikube #1111

Merged
merged 3 commits into from Jul 6, 2018
Merged

Create a deployment script for gke and minikube #1111

merged 3 commits into from Jul 6, 2018

Conversation

ankushagarwal
Copy link
Contributor

@ankushagarwal ankushagarwal commented Jun 30, 2018

  • Move away from using bootstrapper by doing everything locally
  • Try to use gcloud to infer as much as possible (PROJECT, ZONE, EMAIL, etc.)
  • Delete k8s resources from DM configs
  • Require prerequisite of gcloud, kubectl and ks

TODO(ankushagarwal): Add integration test for this.
TODO(ankushagarwal): Delete https://github.com/kubeflow/kubeflow/tree/master/docs/gke/configs

Fixes #1068

After this PR the getting started experience for kubeflow on GKE:

git clone https://github.com/kubeflow/kubeflow/
cd kubeflow
git checkout v0.2.0-rc.1
# export CLIENT_ID and CLIENT_SECRET
./scripts/gke/deploy.sh

We can get rid of CLIENT_ID and CLIENT_SECRET step soon

After this the getting started experience for kubeflow on GKE:

git clone https://github.com/kubeflow/kubeflow/
cd kubeflow
git checkout v0.2.0-rc.1
./scripts/minikube/deploy.sh

This change is Reviewable

@ankushagarwal
Copy link
Contributor Author

/cc @jlewi
/cc @kunmingg

@ankushagarwal ankushagarwal changed the title WIP Create a deployment script for gke and minikube Create a deployment script for gke and minikube Jul 3, 2018
KUBEFLOW_REPO=$(cd "${SCRIPT_DIR}/../.."; pwd)
check_install gcloud
check_install kubectl
check_install ks
Copy link
Contributor

Choose a reason for hiding this comment

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

Might want to check ks version since only new one support local registry.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is non-trivial to do in bash. Added a TODO. We will mention in the docs that the requirements are ks > 0.11

@ankushagarwal
Copy link
Contributor Author

/retest

1 similar comment
@ankushagarwal
Copy link
Contributor Author

/retest

* Move away from using bootstrapper by doing everything locally
* Try to use gcloud to infer as much as possible
* Delete k8s resources from DM configs
* Require prerequisite of gcloud, kubectl and ks

Docs update

Update
@ankushagarwal
Copy link
Contributor Author

/retest

@jlewi
Copy link
Contributor

jlewi commented Jul 5, 2018

Can we move the clone into the deploy script?

So the experience is something like

curl https://raw.githubusercontent.com/kubeflow/kubeflow/master/docs/gke/configs/deploy.sh | bash

@jlewi
Copy link
Contributor

jlewi commented Jul 5, 2018

This is fantastic. Thank you.

Copy link
Contributor

@jlewi jlewi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 7 files reviewed, 3 unresolved discussions (waiting on @kunmingg, @ankushagarwal, and @jlewi)


scripts/gke/deploy.sh, line 49 at r3 (raw file):

CONFIG_FILE=${CONFIG_FILE:-"cluster-kubeflow.yaml"}
PROJECT_NUMBER=`gcloud projects describe ${PROJECT} --format='value(project_number)'`
SA_EMAIL=${DEPLOYMENT_NAME}-admin@${PROJECT}.iam.gserviceaccount.com

nit: ADMIN_EMAIL not SA_email


scripts/gke/deploy.sh, line 108 at r3 (raw file):

o

not -> no

Copy link
Contributor Author

@ankushagarwal ankushagarwal left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 7 files reviewed, 2 unresolved discussions (waiting on @kunmingg and @jlewi)


scripts/gke/deploy.sh, line 108 at r3 (raw file):

Previously, jlewi (Jeremy Lewi) wrote…
o

not -> no

Done.

Copy link
Contributor

@jlewi jlewi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 7 files reviewed, 2 unresolved discussions (waiting on @kunmingg and @ankushagarwal)


scripts/gke/deploy.sh, line 15 at r4 (raw file):

KUBEFLOW_VERSION=${KUBEFLOW_VERSION:-"master"}

rm -rf "${KUBEFLOW_REPO}"

How about checking if KUBEFLOW_REPO exists and if it does don't clone it?

ks registry add kubeflow "${KUBEFLOW_REPO}/kubeflow"

# Install all required packages
ks pkg install kubeflow/core
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we make this a function so that other deploy scripts could use it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think this is fine for now because different deploy scripts will have different pkgs / components to install. It's easy to add plain ks commands in the individual deploy scripts.

@jlewi
Copy link
Contributor

jlewi commented Jul 6, 2018

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: jlewi

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit b40285d into kubeflow:master Jul 6, 2018
This was referenced Jul 7, 2018
@ankushagarwal ankushagarwal deleted the getting-started branch July 10, 2018 19:00
saffaalvi pushed a commit to StatCan/kubeflow that referenced this pull request Feb 11, 2021
* Create a deployment script for gke and minikube

* Move away from using bootstrapper by doing everything locally
* Try to use gcloud to infer as much as possible
* Delete k8s resources from DM configs
* Require prerequisite of gcloud, kubectl and ks

Docs update

Update

* Address comments

* Check if kubeflow repo exists
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants