Name: consul-rpm
Owner: CiscoCloud
Description: Spec file and sources needed to package consul
Created: 2015-03-23 02:12:19.0
Updated: 2016-01-07 12:49:17.0
Pushed: 2015-12-15 03:17:36.0
Homepage: null
Size: 18
Language: Shell
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Tries to follow the packaging guidelines from Fedora.
/usr/bin/consul
/etc/consul/
/var/lib/consul/
/etc/sysconfig/consul
/usr/share/consul/
If you have Vagrant installed:
Check out this repo.
clone https://github.com/tomhillable/consul-rpm
Edit Vagrantfile to point to your favourite box (Bento CentOS7 in this example).
ig.vm.box = "http://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-7.0_chef-provisionerless.box"
Vagrant up! The rpms will be copied to working directory after provisioning.
ant up
Or, do it manually by building the RPM as a non-root user from your home directory:
Check out this repo. Seriously - check it out. Nice.
clone <this_repo_url>
Install rpmdevtools
and mock
.
yum install rpmdevtools mock
Set up your rpmbuild directory tree.
ev-setuptree
Link the spec file and sources.
s $HOME/consul-rpm/SPECS/consul.spec $HOME/rpmbuild/SPECS/
$HOME/consul-rpm/SOURCES -type f -exec ln -s {} $HOME/rpmbuild/SOURCES/ \;
Download remote source files.
tool -g -R rpmbuild/SPECS/consul.spec
Spectool may fail if your distribution has an older version of cURL (CentOS 6.x, for example) - if so, use Wget instead.
`grep Version rpmbuild/SPECS/consul.spec | awk '{print $2}'`
'https://dl.bintray.com/mitchellh/consul'
$URL/${VER}_linux_amd64.zip -O $HOME/rpmbuild/SOURCES/${VER}_linux_amd64.zip
$URL/${VER}_web_ui.zip -O $HOME/rpmbuild/SOURCES/${VER}_web_ui.zip
Build the RPM.
uild -ba rpmbuild/SPECS/consul.spec
Two RPMS: one each for the Consul binary and the WebUI.
/etc/consul/
./etc/sysconfig/consul
.-bootstrap
only if this is the first server and instance.systemctl start consul.service
and journalctl -f
.systemctl enable consul.service
.GOMAXPROCS
setting. This is safe to ignore;
however, the warning can be supressed by uncommenting the appropriate line in
/etc/sysconfig/consul
.Config files are loaded in lexicographical order from the config-dir
. Some
sample configs are provided.
See the consul.io website.