Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Packaging Consul into a deb file
#!/bin/bash
# Install pre-requisites
apt-get install software-properties-common
# Add PPAs
apt-add-repository ppa:brightbox/ruby-ng -y
apt-add-repository ppa:ansible/ansible -y
# Run update
apt-get update
# Install software
apt-get install unzip ruby2.2 ruby2.2-dev gcc make -y
# Update rubygems
gem update --system
# Install bundler
gem install fpm
# Download and install Consul
wget -N https://releases.hashicorp.com/consul/0.6.3/consul_0.6.3_linux_amd64.zip
unzip -o consul_0.6.3_linux_amd64.zip
fpm --force --verbose -s dir -t deb -n consul -v 0.6.3 --url=http://consul.io --vendor=HashiCorp --description "A distributed service discovery tool" ./consul=/usr/local/bin/consul
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.