When using containers, is there a way to make local changes persistent?
When deploying Stream in containers local configuration changes will not persist. Is there a setting to fix this?
Best Answer
-
@kmccririe I think you should take a look at the CRIBL_VOLUME_DIR environment variable. This defines a directory that is used to persist data between containers or ephemeral instances. When you start your Leader node, be sure you have this environment variable set each time.
Heres a sample docker-compose.yml that can be used for a leader node where all of the configs will be placed inside a folder called cribl in your users home directory:
version: '3' services: leader: image: cribl/cribl:latest ports: - "9000:9000" volumes: - ~/cribl:/opt/criblvolume container_name: cribl_leader hostname: leader environment: CRIBL_DIST_MODE: master CRIBL_DIST_MASTER_URL: tcp://criblmaster@0.0.0.0:4200 CRIBL_VOLUME_DIR: /opt/criblvolume worker: image: cribl/cribl:latest container_name: cribl_worker environment: CRIBL_DIST_MASTER_URL: tcp://criblmaster@leader:4200
Another resource that might be useful is the SE Office Hours from 4/6/2022 where I discuss the CRIBL_VOLUME_DIR and its practical applications for scenarios like rehydrating environments in the cloud.
0
Answers
-
@kmccririe I think you should take a look at the CRIBL_VOLUME_DIR environment variable. This defines a directory that is used to persist data between containers or ephemeral instances. When you start your Leader node, be sure you have this environment variable set each time.
Heres a sample docker-compose.yml that can be used for a leader node where all of the configs will be placed inside a folder called cribl in your users home directory:
version: '3' services: leader: image: cribl/cribl:latest ports: - "9000:9000" volumes: - ~/cribl:/opt/criblvolume container_name: cribl_leader hostname: leader environment: CRIBL_DIST_MODE: master CRIBL_DIST_MASTER_URL: tcp://criblmaster@0.0.0.0:4200 CRIBL_VOLUME_DIR: /opt/criblvolume worker: image: cribl/cribl:latest container_name: cribl_worker environment: CRIBL_DIST_MASTER_URL: tcp://criblmaster@leader:4200
Another resource that might be useful is the SE Office Hours from 4/6/2022 where I discuss the CRIBL_VOLUME_DIR and its practical applications for scenarios like rehydrating environments in the cloud.
0