forked from kubeflow/kubeflow
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e: existing_arrikto: initial e2e test (kubeflow#4154)
* kfctl: existing_arrikto: initial e2e test Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * fix deployment name and review comment Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * fix bad syntax with extend Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * increase timeout for service ip discovery Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * update deployments to reflect latest manifests Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * skip knative for existing_arrikto Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * bump machine size and increase timeout Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * python script: fix error in delete step Related: googleapis/google-api-python-client#299 Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * be more conservative in adding new test Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com> * revert checklist Signed-off-by: Yannis Zarkadas <yanniszark@arrikto.com>
- Loading branch information
1 parent
3b27111
commit 269f5c9
Showing
12 changed files
with
188 additions
and
33 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
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
export PROJECT="kubeflow-ci" | ||
export GCP_ZONE="us-central1-a" | ||
export GCP_USER="$(gcloud config list account --format "value(core.account)" )" | ||
export GCP_PROJECT="$(gcloud config list project --format "value(core.project)" )" | ||
export CLUSTER_NAME="kfctl-arr-${REPO_NAME}-${BUILD_ID}" | ||
export CLUSTER_VERSION="$(gcloud container get-server-config --zone=${GCP_ZONE} --format="value(validMasterVersions[0])" )" | ||
|
||
############################ | ||
# Create and setup cluster # | ||
############################ | ||
|
||
gcloud container clusters create "${CLUSTER_NAME}" \ | ||
--project "${GCP_PROJECT}" \ | ||
--zone "${GCP_ZONE}" \ | ||
--username "admin" \ | ||
--cluster-version "${CLUSTER_VERSION}" \ | ||
--machine-type "custom-6-23040" --num-nodes "1" \ | ||
--image-type "UBUNTU" \ | ||
--local-ssd-count=4 \ | ||
--disk-type "pd-ssd" --disk-size "50" \ | ||
--no-enable-cloud-logging --no-enable-cloud-monitoring \ | ||
--no-enable-ip-alias \ | ||
--enable-network-policy \ | ||
--enable-autoupgrade --enable-autorepair | ||
|
||
echo "Getting credentials for newly created cluster..." | ||
gcloud container clusters get-credentials "${CLUSTER_NAME}" --zone="${GCP_ZONE}" | ||
|
||
echo "Setting up GKE RBAC..." | ||
kubectl create clusterrolebinding cluster-admin-binding --clusterrole=cluster-admin --user="${GCP_USER}" |
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,28 @@ | ||
#!/usr/bin/env python3 | ||
|
||
import os | ||
import logging | ||
from googleapiclient import discovery | ||
from oauth2client.client import GoogleCredentials | ||
from kubeflow.testing import util | ||
|
||
|
||
def must_getenv(name): | ||
value = os.getenv(name) | ||
if not name: | ||
logging.fatal("Environment variable %s is not set", name) | ||
raise ValueError() | ||
return value | ||
|
||
|
||
if __name__ == "__main__": | ||
|
||
util.run([ | ||
"gcloud", "auth", "activate-service-account", "--key-file", | ||
must_getenv("GOOGLE_APPLICATION_CREDENTIALS") | ||
]) | ||
|
||
cluster_name = "kfctl-arr-" + must_getenv("REPO_NAME") + "-" + must_getenv("BUILD_ID") | ||
credentials = GoogleCredentials.get_application_default() | ||
service = discovery.build('container', 'v1', credentials=credentials, cache_discovery=False) | ||
util.delete_cluster(service, cluster_name, "kubeflow-ci", "us-central1-a") |
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