Skip to content

Instantly share code, notes, and snippets.

View double-z's full-sized avatar

Zack Zondlo double-z

View GitHub Profile
@double-z
double-z / README.rst
Created July 8, 2016 20:28 — forked from massenz/README.rst
Apache Mesos build and install scripts; optionally runs the Master/Slave locally and executes a demo (C++) framework against it, to validate it all went according to plan

Apache Mesos Build scripts

The `Getting started`_ instructions are a good start (no surprise there!) but are somewhat incomplete and currently look a bit outdated (I plan to fix them soon): however, the outcome has been that I have struggled more than I felt necessary in building and running Mesos on a dev VM (Ubuntu 14.04 running under VirtualBox).

Some of the issue seem to arise from the unfortunate combination of Mesos Master trying to guess its own IP address, the VM being (obviously) non-DNS resolvable and, eventually, the Slave and the Framework failing to properly communicate with the Master.

In the process of solving this, I ended up automating all the dependencies installation, building and running the framework; I have then broken it down into the following modules to make it easier to run only parts of the process.

@double-z
double-z / secret.rb
Created February 26, 2016 01:50 — forked from sethvargo/secret.rb
Example Chef extension to extract secrets from HashiCorp's Vault
# Please see the following blog post for more information:
#
# https://www.hashicorp.com/blog/using-hashicorp-vault-with-chef.html
#
resource_name :vault_secret
property :path, String, name_property: true
property :destination, String
@double-z
double-z / _service.md
Created February 7, 2016 21:46 — forked from naholyr/_service.md
Sample /etc/init.d script

Sample service script for debianoids

Look at LSB init scripts for more information.

Usage

Copy to /etc/init.d:

# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)
@double-z
double-z / ubuntu-1404-preseed
Created February 5, 2016 23:24 — forked from scottslowe/ubuntu-1404-preseed
This is a preseed file, written for Ubuntu Server 14.04.2, that provides a fully automated installation (assuming the presence of a PXE boot infrastructure and a local HTTP server to provide the installation files).
# Ubuntu Server automated installation
# by Scott Lowe ([email protected])
d-i debian-installer/locale string en_US
d-i console-setup/ask_detect boolean false
d-i keyboard-configuration/layoutcode string us
d-i netcfg/choose_interface select eth0
d-i netcfg/get_hostname string hostname
d-i netcfg/get_domain string domain.com
d-i netcfg/wireless_wep string
@double-z
double-z / cluster.rb
Last active August 29, 2015 14:26 — forked from mwrock/cluster.rb
chef-provisioning cluster provider
use_inline_resources
require 'json'
include ClcLibrary::Helper
include Provisioner::Helper
def whyrun_supported?
true
end
knife ssh 'name:*' 'uptime' -G [email protected] -a private_ipaddress -x user
# to run chef-client on all servers:
knife ssh 'name:*' 'sudo chef-client' -G [email protected] -a private_ipaddress -x user

getchef4-test1

[gfm] Introducing Chef Metal 0.2! Chef Metal is a framework that lets you manage your *clusters* with Chef the same way you manage machines: with recipes. Combined with the power of Chef, Metal's `machine` resource helps you to describe, version, deploy and manage everything from simple to complex clusters with a common set of tools.

To get it, gem install chef-metal. To hack, go to https://github.com/opscode/chef-metal. Currently supported provisioners include LXC containers, EC2, DigitalOcean, and Vagrant. If you just want to skip all that, follow the quick start in the README.

The current release is an alpha. You can see a lot of our plans, and some concrete examples, in the [requirements doc](https://github.com/opscode/chef-metal/blob/master/docs/r

source 'https://rubygems.org'
group :test do
gem 'chefspec', '~> 1.3'
gem 'foodcritic', '~> 2.1'
gem 'strainer', '~> 3.0'
gem 'test-kitchen', '~> 1.0.0.alpha'
gem 'kitchen-lxc', '~> 0.0.1.beta1'
gem 'knife-spork', '~> 1.0.17'
gem 'hipchat', '~> 0.10.0'
Dir.glob(File.join(File.dirname(__FILE__), "cookbooks", "*")).each do |cb|
cookbook File.basename(cb), :path => cb
end
/etc/sensu/conf.d/checks/thresholds/logstash-elasticsearch.json
{
"client": {
"params": {
"cpu": {
"warning": 80,
"critical": 90
},
"iowait": {