Nomad v0.5.4
Tested on CoreOS alpha (1284.1.0) and Debian Jessie with docker 1.13.0
After updating nomad from 0.5.1 to 0.5.4 docker ps shows image sha (fd1bd1becff4) instead of image name:tag (mdzhang/docker-sinatra-hello-world)
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
f7e747d9d5bd fd1bd1becff4 "shotgun myapp.rb ..." 6 minutes ago Up 6 minutes 172.25.0.4:31637->4567/tcp, 172.25.0.4:31637->4567/udp frontend-0b7a84bc-6644-f9e5-833e-c658aa1c3e7c
data_dir = "/var/lib/nomad"
bind_addr = "172.25.0.4"
log_level = "INFO"
client {
enabled = true
network_interface = "eth0"
options {
"docker.cleanup.image" = false
"docker.privileged.enabled" = true
"docker.volumes.enabled" = true
}
}
consul {
address = "consul1-dev:8500"
}
$ cat sample.nomad
# Define a job called my-service
job "sample"{
# Job should run in the US region
region = "global"
# Spread tasks between us-west-1 and us-east-1
datacenters = ["dc1", "gc-europe-west1"]
# run this job globally
type = "service"
# Rolling updates should be sequential
update {
stagger = "30s"
max_parallel = 1
}
group "webs" {
# We want 2 web servers
count = 1
# Create a web front end using a docker image
task "frontend" {
driver = "docker"
config {
image = "mdzhang/docker-sinatra-hello-world"
port_map {
web = 4567
}
}
service {
port = "web"
check {
type = "http"
path = "/"
interval = "10s"
timeout = "2s"
}
}
resources {
cpu = 500
memory = 128
network {
mbits = 10
port "web" { }
}
}
}
}
}
Hey, I understand the UX is worse but this change is required to ensure that the docker image being used is correct. By using the ID we can guarantee the image exists since we can account for the particular image. By name things can change under Nomad!
Can you enumerate why PRECISELY this was done. Our product support now lists containers all over our infrastructure and the UX is really completely horrible now. Seeing containers with just the sha hash is absolutely untenable from an operational perspective.
What's the harm in using both? Here are three containers. The first two deployed with docker stack deploy and the third deployed with nomad. Running docker ps should show a readable output and if you want more precise details, you can always use docker ps --no-trunc. No?
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
648ae46729ad portainer/portainer:latest "/portainer -H tcp:/…" 38 minutes ago Up 38 minutes 9000/tcp portainer_portainer.1.jk3ncv44e4xdwysk7pini7ffh
7ff81d51766c portainer/agent:latest "./agent" 38 minutes ago Up 38 minutes portainer_agent.0226la19lyjgo6jvbfly0nj0i.vcm9ggq4yn9wr3eesmhil5xg7
b3b0612c9aa0 8f59835f596c "/bin/bash /docker-e…" About an hour ago Up About an hour 2181/tcp, 2888/tcp, 3888/tcp, 7070/tcp zk1-3b97f7b1-333f-7c62-19f0-1921374f1ecd
# docker ps --no-trunc
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
648ae46729adc8d0c2b99d80ac28803296ccef517183c99a56522ed04335d8a4 portainer/portainer:latest@sha256:07c0e19e28e18414dd02c313c36b293758acf197d5af45077e3dd69c630e25cc "/portainer -H tcp://tasks.agent:9001 --tlsskipverify --ssl --sslcert /certs/portainer.crt --sslkey /certs/portainer.key" 34 minutes ago Up 34 minutes 9000/tcp portainer_portainer.1.jk3ncv44e4xdwysk7pini7ffh
7ff81d51766cdfd8226ff42a4afa1577c9e0a22ac3c125c918caa141a61d1bfe portainer/agent:latest@sha256:468f58ed0ae81cdae7dd377d813efbce6011709d1fe3b539f515d2e0623c40be "./agent" 34 minutes ago Up 34 minutes portainer_agent.0226la19lyjgo6jvbfly0nj0i.vcm9ggq4yn9wr3eesmhil5xg7
b3b0612c9aa0369f6568034c28ab4238dceb6c5f63d764ecc7db25e4bac226c5 sha256:8f59835f596c6ea3e0c12b6870276af99f88caea4f27ac40010a49d366ddc916 "/bin/bash /docker-entrypoint.sh" About an hour ago Up About an hour 2181/tcp, 2888/tcp, 3888/tcp, 7070/tcp zk1-3b97f7b1-333f-7c62-19f0-1921374f1ecd
Most helpful comment
Can you enumerate why PRECISELY this was done. Our product support now lists containers all over our infrastructure and the UX is really completely horrible now. Seeing containers with just the sha hash is absolutely untenable from an operational perspective.