Skip to content

Commit

Permalink
Minor improvements to the test infrastructure (kubeflow#16)
Browse files Browse the repository at this point in the history
* Add some missing steps to the instructions

* Delete the in cluster NFS server since we have switched to external NFS.

* Remove the NFS + Jupyter component; we don't really use this; it has been replaced by the debug worker.
  • Loading branch information
jlewi authored Feb 10, 2018
1 parent 92b4e8a commit 762b2a3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 103 deletions.
35 changes: 10 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,12 @@ gcloud --project=${PROJECT} container clusters create \
```


### Create a static ip for the Argo UI

```
gcloud compute --project=mlkube-testing addresses create argo-ui --global
```

### Create a GCP service account

* The tests need a GCP service account to upload data to GCS for Gubernator
Expand All @@ -239,11 +245,11 @@ gcloud projects add-iam-policy-binding ${PROJECT} \
Create a secret key containing a GCP private key for the service account

```
gcloud iam service-accounts keys create ~/tmp/key.json \
KEY_FILE=<path to key>
gcloud iam service-accounts keys create ${KEY_FILE} \
--iam-account ${SERVICE_ACCOUNT}@${PROJECT}.iam.gserviceaccount.com
kubectl create secret generic kubeflow-testing-credentials \
--namespace=kubeflow-test-infra --from-file=`echo ~/tmp/key.json`
rm ~/tmp/key.json
--namespace=kubeflow-test-infra --from-file=key.json=${KEY_FILE}
```

Make the service account a cluster admin
Expand Down Expand Up @@ -276,7 +282,7 @@ You can use the GitHub API to create a token
To create the secret run

```
kubectl create secret generic github-token --namespace=kubeflow-test-infra --from-literal=github_token=${TOKEN}
kubectl create secret generic github-token --namespace=kubeflow-test-infra --from-literal=github_token=${GITHUB_TOKEN}
```

### Deploy NFS
Expand All @@ -286,18 +292,6 @@ We use GCP Cloud Launcher to create a single node NFS share; current settings
* 8 VCPU
* 1 TB disk

### Create a PD for NFS

**Note** We are in the process of migrating to using an NFS share outside the GKE cluster. Once we move
kubeflow/kubeflow to that we can get rid of this section.

Create a PD to act as the backing storage for the NFS filesystem that will be used to store data from
the test runs.

```
gcloud --project=${PROJECT} compute disks create \
--zone=${ZONE} kubeflow-testing --description="PD to back NFS storage for kubeflow testing." --size=1TB
```
### Create K8s Resources for Testing

The ksonnet app `test-infra` contains ksonnet configs to deploy the test infrastructure.
Expand All @@ -323,15 +317,6 @@ Create the PVs corresponding to external NFS
ks apply prow -c nfs-external
```

Deploy NFS & Jupyter

```
ks apply prow -c nfs-jupyter
```

* This creates the NFS share
* We use JupyterHub as a convenient way to access the NFS share for manual inspection of the file contents.

#### Troubleshooting

User or service account deploying the test infrastructure needs sufficient permissions to create the roles that are created as part deploying the test infrastructure. So you may need to run the following command before using ksonnet to deploy the test infrastructure.
Expand Down
12 changes: 1 addition & 11 deletions test-infra/components/debug-worker.jsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,9 @@ local ss = {
"image": "gcr.io/mlkube-testing/test-worker:latest",
"name": "test-container",
"volumeMounts": [
{
"mountPath": "/mnt/data",
"name": "nfs-external"
},
{
"mountPath": "/mnt/test-data-volume",
"name": "kubeflow-test-volume"
"name": "nfs-external"
},
{
"mountPath": "/secret/gcp-credentials",
Expand All @@ -66,12 +62,6 @@ local ss = {
"claimName": "nfs-external"
}
},
{
"name": "kubeflow-test-volume",
"persistentVolumeClaim": {
"claimName": "kubeflow-testing"
}
},
{
"name": "gcp-credentials",
"secret": {
Expand Down
60 changes: 0 additions & 60 deletions test-infra/components/nfs-jupyter.jsonnet

This file was deleted.

7 changes: 0 additions & 7 deletions test-infra/components/params.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,6 @@
argo: {
namespace: "kubeflow-test-infra",
},
"nfs-jupyter": {
cloud: "",
disks: "kubeflow-testing",
name: "nfs-jupyter",
namespace: "kubeflow-test-infra",
tfJobImage: "gcr.io/tf-on-k8s-dogfood/tf_operator:v20171214-0bd02ac",
},
"nfs-external": {
name: "nfs-external",
namespace: "kubeflow-test-infra",
Expand Down

0 comments on commit 762b2a3

Please sign in to comment.