Test confd Templates
To locally test confd template changes, run a Minion container and map the corresponding files into the container.
The following procedure, which requires a Minion Docker container, might be useful:
- 
Download a Minion Docker image from a build in CircleCI. This can be found as an artifact of the tarball-assemblyjob.
- 
Load the image into Docker: docker load minion.oci.
- 
Create a docker-compose.yamlfile in the parent folder of the checked-outopennmsrepo. See below for a sample compose file.
- 
Start the image: docker-compose up -d.
- 
Open a shell in the container using docker exec -ti minion bashor look at the logsdocker logs minion.
- 
If the result is not satisfactory, remove the container ( docker rm -f minion), edit the files in your IDE, and restart the image.
version: '3'
services:
  minion:
    image: minion
    container_name: minion
    volumes:
      - ${PWD}/minion-config.yaml:/opt/minion/minion-config.yaml
      - ${PWD}/opennms/opennms-container/minion/container-fs/confd/conf.d/org.opennms.minion.process-env.toml:/opt/minion/confd/conf.d/org.opennms.minion.process-env.toml
      - ${PWD}/opennms/opennms-container/minion/container-fs/confd/templates/org.opennms.minion.process-env.tmpl:/opt/minion/confd/templates/org.opennms.minion.process-env.tmpl
      - ${PWD}/opennms/opennms-container/minion/container-fs/entrypoint.sh:/entrypoint.sh