1. The puppet package provided by puppetlabs installs the puppet command into /opt/puppetlabs/bin, so we have to append it to the container's PATH environment variable. Without that, provisioner fails with a "command not found" error.
2. puppet module install installs a module to /etc/puppetlabs/code/environments/production/modules by default in the case of puppetlabs' one (https://puppet.com/docs/puppet/5.5/modules_installing.html#concept-5452). So we have to add it to the --modulepath option in docker-hadoop.sh. Without that, provisioner fails with the following error.
3. Provisioner copies hiera.yaml to /etc/puppet in the container via docker-compose, but it's not included in Hiera's lookup path (https://puppet.com/docs/puppet/5.5/hiera_automatic.html#puppet_lookup). We have to specify the --hiera_config option explicitly when running puppet apply. Without that, it fails with the following error.