conductor icon indicating copy to clipboard operation
conductor copied to clipboard

How to save the database of the workflow definition and the tasks definition when restart the docker containers.

Open suxiaoyv opened this issue 9 years ago • 7 comments

Hi, I run it with docker-compose up, it will be start 4 containers, when it close with Ctrl-c, or docker-compose down, it will be down docker_elasticsearch and docker_dynomite, and restart with docker-compose up, the stores is clean. When i set es volumes for es data to save node to disk like this

volumes:
      - ./esdata:/usr/share/elasticsearch/data

It does not work for it .

How to do or how to think about it ?

Thanks!

suxiaoyv avatar Feb 07 '17 15:02 suxiaoyv

Hey @suxiaoyuv if you did ctrl+c (and not docker-compose down) you can run docker-compose start from that same directory and the containers should come back up. You can bring the containers down again with docker-compose stop

docker-compose down will remove the containers. Thus they cannot be restarted as above

You can see the stopped containers using docker ps -a

Hope this help! Let me know if this solves your problem

jcantosz avatar Feb 07 '17 20:02 jcantosz

Thanks @jcantosz , that is right. But i want to know about how to save the database of the workflow definition and the tasks definition when restart the docker containers. Possible representation is not clear. Please forgive me.

suxiaoyv avatar Feb 08 '17 02:02 suxiaoyv

Edit: A quick test showed restarting the dynomite container on its own causes all of its data to be cleared (or at least not accessible by the conductor server or ui). Restarting other containers did not appear to have this same effect. This is probably the place to begin debugging

I took a closer look at this today, and found that restarting the stopped compose seemed reset the DB (added a task and on compose stop + compose start I no longer saw that task). I found that starting & stopping just the conductor:server did not have this result. I haven't had a chance to look into mounting docker data volumes for dynomite & elastic, but I imagine this is what you are seeing.

I'll do a some more poking around, but I think @v1r3n will know more about why the data is not persisting.

jcantosz avatar Feb 08 '17 22:02 jcantosz

And i have two questions:

  1. Is dynomite db save data in memory?
  2. ES will be clear data directory when start, why?

Thanks!

suxiaoyv avatar Feb 09 '17 03:02 suxiaoyv

  1. Dynomite uses redis which uses in memory store. There are options to configure AOF persistence and keep the data onto disk, but that is not the purpose of this docker image which is meant for quick trying out. For production usage, consider deploying dynomite in a high availability mode.
  2. ES image used in the docker compose is the official elasticsearch image provided by Elastic. We have little control over how it works.

v1r3n avatar Feb 09 '17 16:02 v1r3n

Thanks!

suxiaoyv avatar Feb 13 '17 10:02 suxiaoyv

  1. Dynomite uses redis which uses in memory store. There are options to configure AOF persistence and keep the data onto disk, but that is not the purpose of this docker image which is meant for quick trying out. For production usage, consider deploying dynomite in a high availability mode.
  2. ES image used in the docker compose is the official elasticsearch image provided by Elastic. We have little control over how it works.

I could not find anything related to AOF with dynomite and docker-compose files... Could you please give an example or a tutorial link?

I tried:

  dynomite:
    image: v1r3n/dynomite
    restart: always
    networks:
      - internal
    ports:
      - 8102:8102
    command: ['redis-server', '--appendonly', 'yes']
    volumes:
      - dynomite_redis:/data

Dathin avatar Jan 22 '20 13:01 Dathin