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:

  1. Download a Minion Docker image from a build in CircleCI. This can be found as an artifact of the tarball-assembly job.

  2. Load the image into Docker: docker load minion.oci.

  3. Create a docker-compose.yaml file in the parent folder of the checked-out opennms repo. See below for a sample compose file.

  4. Start the image: docker-compose up -d.

  5. Open a shell in the container using docker exec -ti minion bash or look at the logs docker logs minion.

  6. 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'
    image: minion
    container_name: minion
      - ${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