Tries to follow the packaging guidelines from Fedora.
- Binary:
/usr/bin/consul-template
- Config:
/etc/consul-template/
Build the RPM as a non-root user from your home directory:
-
Check out this repo. Seriously - check it out. Nice.
git clone <this_repo_url>
-
Install
rpmdevtools
andmock
.sudo yum install rpmdevtools mock
-
Set up your rpmbuild directory tree.
rpmdev-setuptree
-
Link the spec file and sources.
ln -s $HOME/consul-template-rpm/SPECS/consul-template.spec rpmbuild/SPECS/ find $HOME/consul-template-rpm/SOURCES -type f -exec ln -s {} rpmbuild/SOURCES/ \;
-
Download remote source files
spectool -g -R rpmbuild/SPECS/consul-template.spec
-
Build the RPM
rpmbuild -ba rpmbuild/SPECS/consul-template.spec
One RPM for the Consul template binary
- Install the RPM.
- Put config files in
/etc/consul-template/
. - Start the service and tail the logs
systemctl start consul-template.service
andjournalctl -f
.- To enable at reboot
systemctl enable consul-template.service
.
- To enable at reboot
Config files are loaded in lexicographical order from the config-dir
. Some
sample configs are provided.
See the consul.io website.