// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
Yesterday I upgraded our running elasticsearch cluster on a site which serves a few million search requests a day, with zero downtime. I've been asked to describe the process, hence this blogpost.
To make it more complicated, the cluster was running elasticsearch version 0.17.8 (released 6 Oct 2011) and I upgraded it to the latest 0.19.10. There have been 21 releases between those two versions, with a lot of functional changes, so I needed to be ready to roll back if necessary.
- elasticsearch
We run elasticsearch on two biggish boxes: 16 cores plus 32GB of RAM. All indices have 1 replica, so all data is stored on both boxes (about 45GB of data). The primary data for our main indices is also stored in our database. We have a few other indices whose data is stored only in elasticsearch, but are updated once daily only. Finally, we store our sessions in elasticsearch, but active sessions are cached in memcached.
#!/bin/sh | |
# Sublime Text 3 install with Package Control | |
# http://simonewebdesign.it/install-sublime-text-3-on-linux/ | |
# Run this script with: | |
# $ curl -L git.io/sublimetext | sh | |
# Detect the architecture |
BOX_NAME=vagrant-build | |
BASE_DIR="`pwd`/machines" | |
BOX_DIR="${BASE_DIR}/${BOX_NAME}" | |
mkdir -p ${BASE_DIR} | |
VBoxManage createvm --name "${BOX_NAME}" --ostype RedHat_64 --basefolder ${BASE_DIR} | |
VBoxManage registervm "${BOX_DIR}/${BOX_NAME}.vbox" | |
mkdir -p tmp |
! xterm color scheme — Make all 16 beautiful. | |
! | |
! Suited for black background, but includes disabled alternative light scheme. | |
! | |
! Open this file with gvim to enable <Leader><F2> color mode. | |
! | |
! Use `xfontsel`, `xlsfonts`, and `fc-list` to find other fonts. | |
! | |
! On Ubuntu I have to name this file ‘~/.Xdefaults-$(hostname)’ | |
! |
# Template file for 'boswars' | |
pkgname=boswars | |
version=2.7 | |
revision=1 | |
wrksrc=${pkgname}-${version}-src/ | |
makedepends="lua51-devel libtheora-devel libogg-devel libpng-devel SDL-devel libvorbis-devel libX11-devel MesaLib-devel scons libpng-progs pkg-config libGL" | |
depends="libtheora libogg libpng libvorbis" | |
short_desc="A futuristic real-time strategy game (RTS)" | |
maintainer="Diogo Leal <diogo@diogoleal.com>" | |
license="GPL-2" |
Name: pev | |
Version: 0.70 | |
Release: 1 | |
License: GPL3 | |
URL: http://pev.sf.net/ | |
Requires: readline | |
BuildRequires: pcre-devel openssl-devel | |
Source0: http://nbtelecom.dl.sourceforge.net/project/pev/pev-%{version}/pev-%{version}.tar.gz | |
Summary: The PE file analysis toolkit |
I hereby claim:
- I am diogoleal on github.
- I am diogoleal (https://keybase.io/diogoleal) on keybase.
- I have a public key whose fingerprint is 4265 C84A D88B 6B22 E101 0FC0 866C 4A5E 4D7C F362
To claim this, I am signing this object: