forked from kubeflow/testing
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul the way we upgrade dev.kubeflow.org
* Don't delete and recreate the ksonnet app. * Use the new upgrade script in kubeflow/kubeflow#1100 * Move creation of secrets into a separate script; there's no reason to recreate them just to update the app. * Add a bunch of fixes in redeploy_app.sh to deal with various issues in the way ks apply works; see comments in code for links to the issues. * Update the docs.
- Loading branch information
Showing
34 changed files
with
590 additions
and
455 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#!/bin/bash | ||
# | ||
# A helper script to create the secrets in the cluster. | ||
set -ex | ||
|
||
NAMESPACE=kubeflow-oauth | ||
|
||
if [ ! -d ~/secrets ]; then | ||
echo "~/secrets doesn't exist creating it to store client secrents" | ||
mkdir -p ~/secrets | ||
fi | ||
|
||
# We store the secret in a bucket to make it easy to share among the team. | ||
# We rely on IAM to make this secure. | ||
SECRET_FILE=client_secret_235037502967-9cpmvs4ljbiqb3ojtnhnhlkkd8d562rl.apps.googleusercontent.com.json | ||
SECRET_BUCKET=kubeflow-dev-secrets | ||
|
||
if [ ! -f ~/secrets/${SECRET_FILE} ]; then | ||
gsutil cp gs://${SECRET_BUCKET}/${SECRET_FILE} ~/secrets/${SECRET_FILE} | ||
fi | ||
|
||
LOCAL_FILE=~/secrets/${SECRET_FILE} | ||
CLIENT_ID=`jq -r .web.client_id ${LOCAL_FILE}` | ||
CLIENT_SECRET=`jq -r .web.client_secret ${LOCAL_FILE}` | ||
|
||
SECRET_NAME="kubeflow-oauth" | ||
|
||
set +e | ||
kubectl get secret ${SECRET_NAME} | ||
exists=$? | ||
set -e | ||
|
||
if [ "${exists}" -eq 0 ]; then | ||
kubectl -n ${NAMESPACE} delete secret ${SECRET_NAME} | ||
fi | ||
kubectl -n ${NAMESPACE} create secret generic ${SECRET_NAME} \ | ||
--from-literal=CLIENT_ID=${CLIENT_ID} --from-literal=CLIENT_SECRET=${CLIENT_SECRET} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,8 @@ | ||
{ | ||
global: { | ||
// User-defined global parameters; accessible to all component and environments, Ex: | ||
// replicas: 4, | ||
}, | ||
global: {}, | ||
components: { | ||
// Component-level parameters, defined initially from 'ks prototype use ...' | ||
// Each object below should correspond to a component in the components/ directory | ||
"kubeflow-core": { | ||
cloud: "null", | ||
disks: "null", | ||
jupyterHubAuthenticator: "iap", | ||
jupyterHubImage: "gcr.io/kubeflow/jupyterhub-k8s:1.0.1", | ||
jupyterHubServiceType: "ClusterIP", | ||
jupyterNotebookPVCMount: "/home/jovyan", | ||
jupyterNotebookRegistry: "gcr.io", | ||
jupyterNotebookRepoName: "kubeflow-images-public", | ||
name: "kubeflow-core", | ||
namespace: "null", | ||
reportUsage: "true", | ||
tfAmbassadorServiceType: "ClusterIP", | ||
tfAmbassadorImage: "quay.io/datawire/ambassador:0.30.1", | ||
tfDefaultImage: "null", | ||
tfJobImage: "gcr.io/kubeflow-images-public/tf_operator:v20180329-a7511ff", | ||
tfJobUiServiceType: "ClusterIP", | ||
tfJobVersion: "v1alpha1", | ||
tfStatsdImage: "quay.io/datawire/statsd:0.30.1", | ||
usageId: "f85740a3-5f60-4146-91b6-2ab7089cf01c", | ||
}, | ||
"cert-manager": { | ||
acmeEmail: "[email protected]", | ||
acmeUrl: "https://acme-v01.api.letsencrypt.org/directory", | ||
name: "cert-manager", | ||
namespace: "null", | ||
}, | ||
"iap-ingress": { | ||
disableJwtChecking: "false", | ||
envoyImage: "gcr.io/kubeflow-images-public/envoy:v20180309-0fb4886b463698702b6a08955045731903a18738", | ||
hostname: "dev.kubeflow.org", | ||
ipName: "kubeflow-tf-hub", | ||
issuer: "letsencrypt-prod", | ||
name: "iap-ingress", | ||
namespace: "kubeflow", | ||
oauthSecretName: "kubeflow-oauth", | ||
secretName: "envoy-ingress-tls", | ||
}, | ||
seldon: { | ||
apifeImage: "seldonio/apife:0.1.5", | ||
apifeServiceType: "NodePort", | ||
|
@@ -74,14 +33,53 @@ | |
// Need node port to expose it via ingress. | ||
type: "NodePort", | ||
}, | ||
"kubeflow-core": { | ||
AmbassadorImage: "quay.io/datawire/ambassador:0.30.1", | ||
AmbassadorServiceType: "ClusterIP", | ||
StatsdImage: "quay.io/datawire/statsd:0.30.1", | ||
centralUiImage: "gcr.io/kubeflow-images-public/centraldashboard:v20180618-v0.2.0-rc.0-5-g715aafc8-e3b0c4", | ||
cloud: "null", | ||
disks: "null", | ||
jupyterHubAuthenticator: "iap", | ||
jupyterHubImage: "gcr.io/kubeflow/jupyterhub-k8s:v20180531-3bb991b1", | ||
jupyterHubServiceType: "ClusterIP", | ||
jupyterNotebookPVCMount: "null", | ||
jupyterNotebookRegistry: "gcr.io", | ||
jupyterNotebookRepoName: "kubeflow-images-public", | ||
name: "kubeflow-core", | ||
namespace: "null", | ||
reportUsage: true, | ||
tfDefaultImage: "null", | ||
tfJobImage: "gcr.io/kubeflow-images-public/tf_operator:v0.2.0", | ||
tfJobUiServiceType: "ClusterIP", | ||
tfJobVersion: "v1alpha2", | ||
usageId: "f85740a3-5f60-4146-91b6-2ab7089cf01c", | ||
}, | ||
"cert-manager": { | ||
acmeEmail: "[email protected]", | ||
acmeUrl: "https://acme-v01.api.letsencrypt.org/directory", | ||
name: "cert-manager", | ||
namespace: "null", | ||
}, | ||
"iap-ingress": { | ||
disableJwtChecking: "false", | ||
envoyImage: "gcr.io/kubeflow-images-public/envoy:v20180309-0fb4886b463698702b6a08955045731903a18738", | ||
hostname: "dev.kubeflow.org", | ||
ipName: "kubeflow-tf-hub", | ||
issuer: "letsencrypt-prod", | ||
name: "iap-ingress", | ||
namespace: "kubeflow", | ||
oauthSecretName: "kubeflow-oauth", | ||
secretName: "envoy-ingress-tls", | ||
}, | ||
katib: { | ||
modeldbDatabaseImage: "mongo:3.4", | ||
modeldbFrontendImage: "katib/katib-frontend", | ||
modeldbImage: "mitdbg/modeldb-backend:latest", | ||
modeldbFrontendImage: "gcr.io/kubeflow-images-public/katib-frontend:v0.2.0", | ||
modeldbImage: "gcr.io/kubeflow-images-public/modeldb-backend:v0.2.0", | ||
name: "katib", | ||
suggestionGridImage: "katib/suggestion-grid", | ||
suggestionRandomImage: "katib/suggestion-random", | ||
vizierCoreImage: "katib/vizier-core", | ||
suggestionGridImage: "gcr.io/kubeflow-images-public/katib-suggestion-grid:v0.2.0", | ||
suggestionRandomImage: "gcr.io/kubeflow-images-public/katib-suggestion-random:v0.2.0", | ||
vizierCoreImage: "gcr.io/kubeflow-images-public/katib-vizier-core:v0.2.0", | ||
vizierDbImage: "mysql:8.0.3", | ||
}, | ||
}, | ||
|
14 changes: 7 additions & 7 deletions
14
dev-kubeflow-org/ks-app/vendor/kubeflow/core/ambassador.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
dev-kubeflow-org/ks-app/vendor/kubeflow/core/echo-server.libsonnet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
{ | ||
service(namespace, name):: { | ||
apiVersion: "v1", | ||
kind: "Service", | ||
metadata: { | ||
labels: { | ||
app: name, | ||
}, | ||
name: name, | ||
namespace: namespace, | ||
annotations: { | ||
"getambassador.io/config": | ||
std.join("\n", [ | ||
"---", | ||
"apiVersion: ambassador/v0", | ||
"kind: Mapping", | ||
"name: " + name + "-mapping", | ||
"prefix: /" + name, | ||
"rewrite: /", | ||
"service: " + name + "." + namespace, | ||
]), | ||
}, //annotations | ||
}, | ||
spec: { | ||
ports: [ | ||
{ | ||
port: 80, | ||
targetPort: 8080, | ||
}, | ||
], | ||
selector: { | ||
app: name, | ||
}, | ||
type: "ClusterIP", | ||
}, | ||
}, | ||
|
||
deploy(namespace, name, image):: { | ||
apiVersion: "extensions/v1beta1", | ||
kind: "Deployment", | ||
metadata: { | ||
name: name, | ||
namespace: namespace, | ||
|
||
}, | ||
spec: { | ||
replicas: 1, | ||
template: { | ||
metadata: { | ||
labels: { | ||
app: name, | ||
}, | ||
}, | ||
spec: { | ||
containers: [ | ||
{ | ||
image: image, | ||
name: "app", | ||
ports: [ | ||
{ | ||
containerPort: 8080, | ||
}, | ||
], | ||
|
||
readinessProbe: { | ||
httpGet: { | ||
path: "/headers", | ||
port: 8080, | ||
}, | ||
initialDelaySeconds: 5, | ||
periodSeconds: 30, | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
}, | ||
}, | ||
} |
Oops, something went wrong.