Version: 1.9.7
Platform: x86_64
First, install or update to the latest system software.
sudo apt-get update
#!/usr/bin/env bash | |
sudo locale-gen en_US.UTF-8 | |
sudo update-locale LANG=en_US.UTF-8 | |
sudo update-locale LC_ALL=en_US.UTF-8 | |
sudo apt-get update | |
sudo apt-get install -y build-essential git curl libxslt1-dev libxml2-dev libssl-dev | |
# postgres |
FROM ubuntu | |
RUN dpkg-divert --local --rename --add /sbin/initctl | |
RUN ln -s /bin/true /sbin/initctl | |
RUN echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list | |
RUN apt-get update | |
RUN apt-get upgrade -y | |
RUN apt-get -y install mysql-client mysql-server |
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
=begin | |
ModernIE VMs | |
config.vm.box = "modernIE/vista-ie7" | |
config.vm.box = "modernIE/w7-ie8" | |
config.vm.box = "modernIE/w7-ie9" | |
config.vm.box = "modernIE/w7-ie10" |
-- @desc: Split a ZSET in two via round-robin | |
-- @usage: redis-cli eval "$(cat ZSPLIT)" 2 <originalZset> <newZset> | |
-- @return: list of moved members | |
local function ZSPLIT(zset1, zset2) | |
local zset1size = redis.call("ZCARD", zset1) | |
if zset1size == 0 then return {} end | |
local members = redis.call("ZREVRANGEBYSCORE", zset1, "+INF", "-INF", "WITHSCORES") |
var extend = function(a, b) { | |
for (var i in b) | |
a[i] = b[i]; | |
return a; | |
}; | |
var fluent = function(f) { | |
return function() { | |
var clone = extend(Object.create(null), this); | |
f.apply(clone, arguments); |
#!/bin/bash | |
### Set default parameters | |
# somewhat follows the conventions from: http://michal.karzynski.pl/blog/2013/10/29/serving-multiple-django-applications-with-nginx-gunicorn-supervisor/ | |
# designed to run on a debian symbiosis box if your interested why its /srv | |
action=$1 | |
domain=$2 | |
appname=$3 | |
owner=$(who am i | awk '{print $1}') | |
sitesEnable='/etc/nginx/sites-enabled/' | |
sitesAvailable='/etc/nginx/sites-available/' |
{ | |
"acl_datacenter": "test-1", | |
"acl_default_policy": "deny", | |
"acl_down_policy": "deny", | |
"acl_master_token": "1234", | |
"acl_ttl": "30s", | |
"bootstrap_expect": 3, | |
"check_update_interval": "5m", | |
"datacenter": "test-1", | |
"data_dir": "/etc/consul.d/data", |
- What do Etcd, Consul, and Zookeeper do? | |
- Service Registration: | |
- Host, port number, and sometimes authentication credentials, protocols, versions | |
numbers, and/or environment details. | |
- Service Discovery: | |
- Ability for client application to query the central registry to learn of service location. | |
- Consistent and durable general-purpose K/V store across distributed system. | |
- Some solutions support this better than others. | |
- Based on Paxos or some derivative (i.e. Raft) algorithm to quickly converge to a consistent state. | |
- Centralized locking can be based on this K/V store. |