Community Articles

Find and share helpful community-sourced technical articles.
Celebrating as our community reaches 100,000 members! Thank you!
Labels (3)
Rising Star

Docker on YARN is relatively easy to set up on an existing cluster, but full clusters are not always available.

My Ember Project was created to simplify dev/test for technologies managed by Ambari and Cloudera Manager. It provides utilities for creating dockerized clusters that use far fewer resources than a full bare metal or VM-based cluster. Additionally, by using pre-built images, the time it takes to get a cluster up and running can be reduced to less than 10 minutes.

The following four commands are all that is necessary to download and run a ~5GB image that comes preinstalled with Ambari, Zookeeper, HDFS, and YARN with Docker on YARN pre-configured. Docker containers spawned by YARN will be created on the host machine as peers to the container with YARN inside. All containers are launched into the "ember" docker network by default. Once the container is downloaded, it takes less than 5 minutes to start all services.

curl -L -o
cd Ember-1.1/
./ createFromPrebuiltSample samples/yarnquickstart/yarnquickstart-sample.ini

The Ambari UI can be found at http://localhost:8080

The YARN Resource Manager UI can be found at http://localhost:8088


The YARN service REST API documentation can be found here:

The YARN app CLI documentation can be found here:


Place the following service definition into a file (e.g. redis.json)

  "name": "redis-service",
  "version": "1.0.0",
  "description": "redis example",
  "components" :
        "name": "redis",
        "number_of_containers": 1,
        "artifact": {
          "id": "library/redis",
          "type": "DOCKER"
        "launch_command": "",
        "resource": {
          "cpus": 1,
          "memory": "256"
        "configuration": {
          "env": {

Submit the service with the following curl command. YARN should respond back with the applicationId

curl -X POST -H "Content-Type: application/json" http://localhost:8088/app/v1/services? -d @redis.json

The service status can be viewed on the YARN UI or through the REST API (python makes it easier to read):

curl http://localhost:8088/app/v1/services/redis-service? | python -m json.tool

The service name must be unique in the cluster. If you need to delete your service, the following command can be used:

curl -X DELETE http://localhost:8088/app/v1/services/redis-service?