Configure Docker settings for YARN
After installing Docker Swarm and configuring an overlay network on your cluster, you must enable Docker runtime on YARN and set the containers to use the overlay network.
- In the Ambari web, select Services > YARN > Advanced to view the YARN advanced properties.
-
In the YARN Features section, toggle Docker
Runtime to Enabled.
Enabling the specified option changes the following setting in Advanced yarn-site:
yarn.nodemanager.container-executor.class=org.apache.hadoop.yarn.server.nodemanager.LinuxContainerExecutor
-
Expand Advanced yarn-site and change the following
properties to enable the Docker containers use the overlay network by
default:
yarn.nodemanager.runtime.linux.docker.default-container-network=yarnnetwork yarn.nodemanager.runtime.linux.docker.allowed-container-networks=host,none,bridge,yarnnetwork
-
Expand Custom yarn-site and add the following property
if Kerberos is not enabled:
yarn.nodemanager.linux-container-executor.nonsecure-mode.local-user=dockeruser
-
Expand Advanced Container Executor and specify the
Docker trusted registries in the corresponding field.
NoteYou must specify the Docker images in the form:
<registry>/<imageName>:<tag>
. You can specify images from other registries as comma-separated values. - Click Save to save the configurations that you added and restart YARN.