Skip to content

Commit

Permalink
Merge pull request #415 from wbuchwalter/azure-doc
Browse files Browse the repository at this point in the history
Replace azure env by aks || acs-engine
  • Loading branch information
wbuchwalter committed Mar 19, 2018
2 parents 5dca627 + 49af7a8 commit 574317d
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ NAMESPACE=kubeflow
kubectl create namespace ${NAMESPACE}
ks generate core kubeflow-core --name=kubeflow-core --namespace=${NAMESPACE}
# If your cluster is running on Azure you will need to set the cloud parameter.
# If the cluster was created with AKS or ACS choose aks, it if was created
# with acs-engine, choose acsengine
# PLATFORM=<aks|acsengine>
# ks param set kubeflow-core cloud ${PLATFORM}
# Enable collection of anonymous usage metrics
# Skip this step if you don't want to enable collection.
ks param set kubeflow-core reportUsage true
Expand Down
22 changes: 19 additions & 3 deletions kubeflow/core/tf-job.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
else
{},

azureAccelerators:: {
aksAccelerators:: {
accelerators: {
"alpha.kubernetes.io/nvidia-gpu": {
volumes: [
Expand All @@ -129,9 +129,25 @@
},
},

acsEngineAccelerators:: {
accelerators: {
"alpha.kubernetes.io/nvidia-gpu": {
volumes: [
{
name: "nvidia",
mountPath: "/usr/local/nvidia",
hostPath: "/usr/local/nvidia",
},
],
},
},
},

configData(cloud, tfDefaultImage):: self.defaultControllerConfig(tfDefaultImage) +
if cloud == "azure" then
self.azureAccelerators
if cloud == "aks" then
self.aksAccelerators
else if cloud == "acsengine" then
self.acsEngineAccelerators
else
{},

Expand Down
15 changes: 14 additions & 1 deletion user_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,27 @@ ks env add nocloud
ks env add cloud
```

The `nocloud` environment can be used for minikube or other basic k8s clusters, the `cloud` environment will be used for GKE in this guide.
The `nocloud` environment can be used for minikube or other basic k8s clusters, the `cloud` environment will be used for GKE or Azure in this guide.

If using GKE, we can configure our cloud environment to use GCP features with a single parameter:

```
ks param set kubeflow-core cloud gke --env=cloud
```

If the cluster was created on Azure with AKS/ACS:

```
ks param set kubeflow-core cloud aks --env=cloud
```

If it was created with acs-engine instead:

```
ks param set kubeflow-core cloud acsengine --env=cloud
```


Now let's set `${KF_ENV}` to `cloud` or `nocloud` to reflect our environment for the rest of the guide:

```
Expand Down

0 comments on commit 574317d

Please sign in to comment.