dockermesosapache-aurora

force pull docker image in Apache Aurora


I'm trying to launch a Apache Aurora job in a Mesos cluster from a Docker image.

My configuration is:

Job(cluster       = 'my_cluster',
    environment   = 'devel',
    role          = 'my_role',
    service       = True,
    constraints   = {
      'aurora-worker': 'true'
    },
    name          = 'my_name',
    instances     = 1,
    task          = mytask,
    container     = Docker(image='my-registry:5000/my_image:latest')])

Unfortunately, after the first run the image get cached on the node and is not refreshed subsequently.

Is there a way to force Aurora to pull the Docker image for a given job (similar to Marathon's forcePullImage)?


Solution

  • First of all, pulling of the image is an optional supported by containerizer in Mesos. More specification here.

    I checked the website of Aurora, may be change below would help. Change Docker(image='my-registry:5000/my_image:latest') to Docker(image='{{docker.image[my_image][latest]'). Of course with your docker registry configured in cluster.json at the same time, which specified here. Extra infos here.

    May this would help.