Skip to content

Instantly share code, notes, and snippets.

@troyfontaine
Last active February 5, 2016 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troyfontaine/82fb0fd3ffbfe9be1625 to your computer and use it in GitHub Desktop.
Save troyfontaine/82fb0fd3ffbfe9be1625 to your computer and use it in GitHub Desktop.
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