Skip to content

Instantly share code, notes, and snippets.

# Consul Deployment Guide

This deployment guide covers the steps required to install and configure a single HashiCorp Consul cluster as defined in the Consul Reference Architecture.

Below are instructions for installing and configuring Consul on Linux hosts running the systemd system and service manager.

Reference Material

This deployment guide is designed to work in combination with the Consul Reference Architecture. Although not a strict requirement to follow the Consul Reference Architecture, please ensure you are familiar with the overall architecture design; for example installing Consul on multiple physical or virtual (with correct anti-affinity) hosts for high-availability.

Keybase proof

I hereby claim:

  • I am marsupermammal on github.
  • I am marsupermammal (https://keybase.io/marsupermammal) on keybase.
  • I have a public key whose fingerprint is 0651 F12B 09B2 7FA4 D8EE 4581 19EA 8551 6EDC 6F1A

To claim this, I am signing this object:

package main
import "fmt"
import "os"
// import "sort"
/**
* Auto-generated code below aims at helping you parse
* the standard input according to the problem statement.
**/
provider "aws" {
region = "us-east-1"
}
data "aws_availability_zones" "available" {}
resource "aws_instance" "test" {
count = "${length(data.aws_availability_zone.availability.instances)}"
ami = "ami-408c7f28"
instance_type = "t2.micro"
[pwatts@tanstaafl packer-qlik-application-prebake (master)]$ PACKER_LOG=1 packer build -var "region=us-east-1" platform/aws/windows/qlik-app.json
2016/05/10 07:56:44 [INFO] Packer version: 0.10.0 fedb0e21f03607060b002fd1467bc617b6a4e812+CHANGES
2016/05/10 07:56:44 Packer Target OS/Arch: darwin amd64
2016/05/10 07:56:44 Built with Go Version: go1.6
2016/05/10 07:56:44 Detected home directory from env var: /Users/pwatts
2016/05/10 07:56:44 [DEBUG] Discovered plugin: json-updater = /Users/pwatts/.packer.d/plugins/packer-post-processor-json-updater
2016/05/10 07:56:44 Using internal plugin for amazon-chroot
2016/05/10 07:56:44 Using internal plugin for amazon-ebs
2016/05/10 07:56:44 Using internal plugin for digitalocean
2016/05/10 07:56:44 Using internal plugin for file
@MarsuperMammal
MarsuperMammal / gist:219180f98f0117e4c754
Last active October 21, 2015 20:17
config service db:setup failure
root@39a73f363eff:/home/app/webapp# /sbin/my_init -- /run_app rake db:setup
*** Running /etc/my_init.d/00_regen_ssh_host_keys.sh...
*** Running /etc/my_init.d/30_presetup_nginx.sh...
*** Running /etc/rc.local...
*** Booting runit daemon...
*** Runit started as PID 91
*** Running /run_app rake db:setup...
Running - APP_COMMAND=db:setup /sbin/setuser app bundle exec rake db:setup 2>&1
Oct 21 20:12:30 39a73f363eff syslog-ng[99]: syslog-ng starting up; version='3.5.3'
E, [2015-10-21T20:12:32.205668 #106] ERROR -- : Failed to connect fluentd: Connection refused - connect(2) for "127.0.0.1" port 24224
@MarsuperMammal
MarsuperMammal / gist:6addd6bb1796f2dd0fb4
Created May 6, 2015 18:58
unfuck the circular logic
require 'rubytree'
require './bluecat_api.rb'
module Tree
class TreeNode
def as_json(options={})
json_hash = {
"name" => name,
"id" => content[:id],
"type" => content[:type]
Code Snippet:
response = client.call(:get_entities) do |ctx|
ctx.cookies auth_cookies
ctx.message parentId: view_id, type: "Zone", start: start, count: count
end
Mock Output:
Get Entities API method: Given parentId=001
[{:id=>"123", :name=>"com"}]