Skip to content

Instantly share code, notes, and snippets.

View qubitrenegade's full-sized avatar
☂️
Building castles of abstractions

qubitrenegade

☂️
Building castles of abstractions
View GitHub Profile
@qubitrenegade
qubitrenegade / Consul Semaphore Example
Created January 22, 2018 20:24
This bash script attempts to create and lock a Semaphore using Consul's session and KV Store
# This is an example based on: https://www.consul.io/docs/guides/semaphore.html
# And https://github.com/hashicorp/consul/issues/1940
# we want to see how our variables resolve to URLs
set -x
# Set up some variables
SERVICE=foobartest
PREFIX=service/${SERVICE}/lock
LOCK=${PREFIX}/.lock
@qubitrenegade
qubitrenegade / default.rb
Created September 13, 2017 17:57
Testing an Ohai Plugin generated from Template using burtlo/chefspec-ohai to test
# recipes/default.rb
ohai_plugin 'consul' do
resource :template
variables config_var: node['my_cookbook']['some_important_var']
end
- Debug log output from `PACKER_LOG=1 packer build template.json`.
```
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address 0.0.0.0:443, port 443 unavailable for VNC
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::443, port 443 unavailable for VNC
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address 0.0.0.0:80, port 80 unavailable for VNC
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::80, port 80 unavailable for VNC
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::22, port 22 unavailable for VNC
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address 0.0.0.0:22, port 22 unavailable for VNC
2017/06/27 12:34:47 packer: 2017/06/27 12:34:47 ESXi listening on address :::8000, port 8000 unavailable for VNC