Skip to main content

Running Ember tools under Docker/Kubernetes

Many Ember tools can be executed while Ember container or pod is running. However, tools that modify ember journal require exclusive write access and must be executed while Ember is down. For example, journal-recover, journal-transformer, journal-from-json tools fix/modify/override journal data files and fall into this catagory.

Executing tools from host instance

Read-only tools can be executed using ember container:

docker run --entrypoint "/opt/deltix/ember/bin/counters" -it -v "/var/lib/deltix/EmberHome:/var/lib/ember-home" "packages.deltixhub.com/deltix.docker/anvil/deltix-ember:0.9.12" 

In some cases, you need to mount EMBER_WORK separately:

docker run --entrypoint "/opt/deltix/ember/bin/order-debugger" -it -v "/home/staging/cryptowebui-staging/EmberHome/home:/var/lib/emberhome" -v "/home/staging/cryptowebui-staging/EmberHome/work:/var/lib/emberwork" "packages.deltixhub.com/deltix.docker/anvil/deltix-ember:1.0.17" E9310F54:58CBC054-0E4A-4E1F-B9EA-737B239EF1FE

Replacing ENTRYPOINT

Docker compose

Replace entrypoint in Ember container:

  ember:
image: "registry.deltixhub.com/deltix.docker/anvil/deltix-ember:${EMBER_VERSION}"
...
entrypoint: [ "/opt/deltix/ember/bin/ember" ]

Replace with:

  ember:
image: "registry.deltixhub.com/deltix.docker/anvil/deltix-ember:${EMBER_VERSION}"
...
stdin_open: true
tty: true
entrypoint: [ "/bin/sh" ]

Don't forget to restore entrypoint once you are done.

Kubernetes

Switch to Stateful Sets, click Edit on the right side of the Ember row.

Locate ember container and add (careful with spaces!):

          command:
- /bin/sh
- '-c'
- tail -f /dev/null -n 10

Ember statefulset edit

  • Save and restart ember (Scale Ember to 0, then back to 1).
  • Run ember tool that requires ember to be down. For example, journal transformer.
  • When done: Go back and remove the command line entries, repeat the steps