Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info like this: $ brew info postgresql
$ brew install python --universal
| .-(malcolm@djelibeybi 15:19:34) ~ | |
| `--> echo $PS1 | |
| \n\[\033[35m\].-(\[\033[33m\]\u@\h \[\033[36m\]\t\[\033[35m\]) \[\033[0m\]\w\n\[\033[35m\]\`-->\[\033[0m\] | |
| I should note that in my .bashrc file, I enter the information like this: | |
| # My fancy two-line, colored prompt | |
| e=\\\033 | |
| export PS1="\n\[$e[35m\].-(\[$e[33m\]\u@\h \[$e[36m\]\t\[$e[35m\])\[$e[0m\]\w\n\[$e[35m\]\\\`-->\[$e[0m\] " |
| """ | |
| Fabric tunneling utilities | |
| by shn@glucose.jp | |
| class ForwardServer and relates things are refere Robey Pointer's paramiko example. | |
| (http://bazaar.launchpad.net/~robey/paramiko/trunk/annotate/head%3A/demos/forward.py) | |
| usage:: | |
| with make_tunnel('[email protected]:10022') as t: |
| require 'makura' | |
| require 'rye' | |
| root = Makura::Server.new('http://host:5984') | |
| nodes = root.membership['cluster_nodes'] | |
| p nodes: nodes | |
| nodes.each do |node| | |
| node_name = node[/@(\w+)/, 1] | |
| puts "Connecting to #{node_name}" |
| var express = require('express'); | |
| var redis = require('redis'); | |
| const serverType = process.argv[2]; | |
| const serverHost = process.argv[3]; | |
| const serverPort = parseInt(process.argv[4]); | |
| const redisPort = 6379; | |
| const redisHost = '127.0.0.1'; |
| # TO_FOLDER=/something | |
| # FROM=/your-es-installation | |
| DATE=`date +%Y-%m-%d_%H-%M` | |
| TO=$TO_FOLDER/$DATE/ | |
| echo "rsync from $FROM to $TO" | |
| # the first times rsync can take a bit long - do not disable flusing | |
| rsync -a $FROM $TO | |
| # now disable flushing and do one manual flushing |
| { | |
| "template": "logstash-*", | |
| "settings" : { | |
| "number_of_shards" : 1, | |
| "number_of_replicas" : 0, | |
| "index" : { | |
| "query" : { "default_field" : "@message" }, | |
| "store" : { "compress" : { "stored" : true, "tv": true } } | |
| } | |
| }, |
| First, install it from http://www.sublimetext.com/2 | |
| Next, install the package control extension from here: | |
| http://wbond.net/sublime_packages/package_control | |
| Installation instructions here: http://wbond.net/sublime_packages/package_control/installation | |
| Restart Sublime, then hit Shift+Apple+P and search for "Package Control: Install Package" |
Install Homebrew
Install a few things with homebrew:
Notice that some packages give you information at the end, read it carefully. To recall that info use brew info like this: $ brew info postgresql
$ brew install python --universal
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.
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.
| vagrant box add smartos http://cuddletech.com/tmp/smartos-latest.box | |
| mkdir smartos && cd smartos | |
| vagrant init smartos | |
| vagrant up | |
| vagrant ssh |