Skip to content

Instantly share code, notes, and snippets.

@zts
zts / infra-secret-management-overview.md
Created April 12, 2017 21:20 — forked from maxvt/infra-secret-management-overview.md
Infrastructure Secret Management Software Overview

Currently, there is an explosion of tools that aim to manage secrets for automated, cloud native infrastructure management. Daniel Somerfield did some work classifying the various approaches, but (as far as I know) no one has made a recent effort to summarize the various tools.

This is an attempt to give a quick overview of what can be found out there. The list is alphabetical. There will be tools that are missing, and some of the facts might be wrong--I welcome your corrections. For the purpose, I can be reached via @maxvt on Twitter, or just leave me a comment here.

There is a companion feature matrix of various tools. Comments are welcome in the same manner.

@zts
zts / gist:5fecf4fa082dd362bb1427e191861aa7
Created October 13, 2016 12:31
nginx rspec matcher
RSpec::Matchers.define :upstream_to do |server|
match do |content|
escaped_server = Regexp.escape(server)
!(content=~/upstream #{@upstreamer} \{[^}]+server #{escaped_server};/m).nil?
end
chain :through do |upstreamer|
@upstreamer = upstreamer
end
if node["etc"]["passwd"].has_key?(node["rundeck"]["username"])
rundeck_home = node["etc"]["passwd"][node["rundeck"]["username"]]["dir"]
else
puts "User rundeck not exist"
rundeck_home = "/home/#{node["rundeck"]["username"]}"
user node["rundeck"]["username"] do
action :create
home rundeck_home
manage_home true
system true
@zts
zts / cookbook-mcollective-changes.md
Created June 17, 2014 06:33
mcollective cookbook todo's

"mcollective" cookbook - proposed changes

This document outlines the changes that need to be made to the MCollective Chef cookbook for a 1.0.0 release.

1. Separate client/server middleware auth - DONE

The mcollective client can optionally be configured with separate middleware credentials. By default, the client will use the same credentials as the server. Two new attributes have been added to

@zts
zts / gist:16eddb1d67a178107b8b
Created May 12, 2014 22:28
Failure building omnibus-chef
[vagrant@chef-centos-65 omnibus-chef]$ bundle exec omnibus build project chef
No configuration file `/home/vagrant/omnibus-chef/omnibus.rb', using defaults
No configuration file `/home/vagrant/omnibus-chef/omnibus.rb', using defaults
This program built for x86_64-redhat-linux-gnu
Building chef 10.28.2-203-gf625fd6
preparation-1.0.0-3e55b6f0074109d9313fabd3d5f337fac4b799ed9f40876a4c2188a7b4e5bd71
libgcc--91d12a5fba34ff65d080398849093a2c1fc1718d82878496846c2ef8d8e906a5
[fetcher:net::zlib] Cached copy of source tarball up to date
zlib-1.2.6-5c86c311f27bfe5fad4db97b3883ea0772e281f865159330e76dbba6e3df4dcb

Keybase proof

I hereby claim:

  • I am zts on github.
  • I am zts (https://keybase.io/zts) on keybase.
  • I have a public key whose fingerprint is 0769 4974 3E7B E108 69BC 32B2 F01B 491C EEAA CF23

To claim this, I am signing this object:

@zts
zts / activemq.log
Created January 26, 2014 21:20
mcollective 2.4 fails to connect to activemq
2014-01-26 21:16:15,213 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.168.42.101:37054
2014-01-26 21:16:15,213 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.168.42.101:37053
2014-01-26 21:16:15,213 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.168.42.101:37047
2014-01-26 21:16:15,213 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.168.42.101:37046
2014-01-26 21:16:15,214 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportConnection.Transport | ActiveMQ Transport: tcp:///192.168.42.101:37048
2014-01-26 21:16:15,214 | INFO | Transport failed: java.io.EOFException | org.apache.activemq.broker.TransportCon
@zts
zts / gist:8022194
Last active December 31, 2015 17:48
Use Chef to check whether a package has been installed
[root@ci cache]# chef-shell
loading configuration: none (standalone session)
Session type: standalone
Loading.done.
This is the chef-shell.
Chef Version: 11.8.2
http://www.opscode.com/chef
http://wiki.opscode.com/display/chef/Home

Magento Snippets

Download extension manually using pear/mage

Pear for 1.4, mage for 1.5. File downloaded into /downloader/.cache/community/

./pear download magento-community/Shipping_Agent
./mage download community Shipping_Agent

Clear cache/reindex

@zts
zts / prod.json
Created March 8, 2013 17:23
A sample environment
{
"name": "prod",
"description": "",
"cookbook_versions": {
"users": "= 1.1.4",
"mcollective": "= 0.10.0"
},
"json_class": "Chef::Environment",
"chef_type": "environment",
"default_attributes": {