From e1491a267578399271762311f7134df48846353a Mon Sep 17 00:00:00 2001 From: YundongYe Date: Tue, 15 Jan 2019 13:56:02 +0800 Subject: [PATCH] [Azure-RDMA] cluster configuration preparation for az-rdma (#2004) --- examples/cluster-configuration/services-configuration.yaml | 6 +++++- src/cluster/config/cluster.md | 7 +++++++ src/cluster/config/cluster.py | 4 ++++ src/cluster/config/cluster.yaml | 3 +++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/examples/cluster-configuration/services-configuration.yaml b/examples/cluster-configuration/services-configuration.yaml index 91e5224bd7..d66d423176 100644 --- a/examples/cluster-configuration/services-configuration.yaml +++ b/examples/cluster-configuration/services-configuration.yaml @@ -24,9 +24,13 @@ # # HDFS, zookeeper data path on your cluster machine. # data-path: "/datastorage" # -# #Enable QoS feature or not. Default value is "true" +# # Enable QoS feature or not. Default value is "true" # qos-switch: "true" # +# # If your cluster is created by Azure and the machine is rdma enabled. +# # Set this configuration as "true", the rdma environment will be set into your container. +# az-rdma: "false" +# # # # the docker registry to store docker images that contain system services like frameworklauncher, hadoop, etc. # docker-registry: diff --git a/src/cluster/config/cluster.md b/src/cluster/config/cluster.md index 361dc30f9a..40a00d2b85 100644 --- a/src/cluster/config/cluster.md +++ b/src/cluster/config/cluster.md @@ -31,6 +31,7 @@ cluster: cluster-id: pai data-path: "/datastorage" qos-switch: "true" + az-rdma: "false" docker-registry: namespace: openpai domain: docker.io @@ -73,6 +74,12 @@ cluster: cluster_cfg["cluster"]["common"]["qos-switch"] string + + cluster.common.az-rdma + com["cluster"]["common"]["az-rdma"] + cluster_cfg["cluster"]["common"]["az-rdma"] + string, "true" or "false" + cluster.docker-registry.namespace com["cluster"]["docker-registry"]["namespace"] diff --git a/src/cluster/config/cluster.py b/src/cluster/config/cluster.py index 8ed30b701f..11183cb4b7 100644 --- a/src/cluster/config/cluster.py +++ b/src/cluster/config/cluster.py @@ -52,6 +52,10 @@ def validation_common(self, common_configuration): return False, "cluster-id is miss in service-configuration.yaml -> cluster -> common -> cluster-id" if "data-path" not in common_configuration: return False, "data-path is miss in service-configuration.yaml -> cluster -> common -> data-path" + if "qos-switch" not in common_configuration: + return False, "qos-switch is miss in service-configuration.yaml -> cluster -> common -> qos-switch" + if "az-rdma" not in common_configuration: + return False, "az-rdma is miss in service-configuration.yaml -> cluster -> common -> az-rdma" return True, None diff --git a/src/cluster/config/cluster.yaml b/src/cluster/config/cluster.yaml index 83387f0768..0407550ce6 100644 --- a/src/cluster/config/cluster.yaml +++ b/src/cluster/config/cluster.yaml @@ -24,6 +24,9 @@ common: qos-switch: "true" + az-rdma: "false" + + # the docker registry to store docker images that contain system services like frameworklauncher, hadoop, etc. docker-registry: