Managing Data Operating System
Also available as:
PDF
loading table of contents...

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.

  1. In the Ambari web, select Services > YARN > Advanced to view the YARN advanced properties.
  2. 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
  3. 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
  4. Expand Custom yarn-site and add the following property if Kerberos is not enabled:
    yarn.nodemanager.linux-container-executor.nonsecure-mode.local-user=dockeruser
  5. Expand Advanced Container Executor and specify the Docker trusted registries in the corresponding field.
    Note
    Note
    You must specify the Docker images in the form:<registry>/<imageName>:<tag>. You can specify images from other registries as comma-separated values.
  6. Click Save to save the configurations that you added and restart YARN.