Getting Amazon EC2 prices from the JSON offering using jq

JQ is a nifty tool to parse, slice and dice json data . I know I can do this with python/ruby/whatever but it’s fun to try something new .. Instance offering for Linux + EU Ireland curl https://pricing.us-east-1.amazonaws.com/offers/v1.0/aws/AmazonEC2/20160126001708/index.json | jq ‘[.products| to_entries | .[].value | select (.attributes.operatingSystem == “Linux” and .attributes.location==”EU (Ireland)”) | {key: .sku, …

Continue reading ‘Getting Amazon EC2 prices from the JSON offering using jq’ »

Convert qcow to lvm

Variables QCOW_FILE=file.img LV_NAME=RootDisk Find out the size of the file qemu-img info ${QCOW_FILE} > image: file.img > file format: qcow2 > virtual size: 60G (64424509440 bytes) > disk size: 56G > cluster_size: 65536 > Format specific information: compat: 0.10 Set the file size SIZE=”60G” create a logical volume with matching size. lvcreate -L${SIZE} -n${LV_NAME} vg0 …

Continue reading ‘Convert qcow to lvm’ »

Unbound and Dnscrypt-proxy on OSX via homebrew

Follow up from the previous post. Quick and dirty howto adapted from instructions found at dnscrypt.org The first step is to install unbound: brew install unbound Next, download the dnssec anchor to /usr/local/etc/unbound/ sudo unbound-anchor -a /usr/local/etc/unbound/root.key Add the following things in /usr/local/etc/unbound/unbound.conf at the end of the server section. Note that unbound will be …

Continue reading ‘Unbound and Dnscrypt-proxy on OSX via homebrew’ »

Dnscrypt on OSX via Homebrew with custom resolver

dnscrypt provides encryption between clients and dns resolvers. Here’s how to install it on OSX via homebeew and how to change the default resolver to something else besides OpenDNS’ server. Go to System Preferences -> network -> advanced -> dns and set 127.0.0.1 as DNS server Launch dnscrypt-proxy and see if it works if that …

Continue reading ‘Dnscrypt on OSX via Homebrew with custom resolver’ »

ipv6: Neighbour table overflow

If syslog starts complaining about neighbor table overflow  then some limits need to be increased. Current values: grep . /proc/sys/net/ipv6/neigh/default/gc_thresh* /proc/sys/net/ipv6/neigh/default/gc_thresh1:128 /proc/sys/net/ipv6/neigh/default/gc_thresh2:512 /proc/sys/net/ipv6/neigh/default/gc_thresh3:1024 Add to sysctl.conf net.ipv6.neigh.default.gc_thresh1 = 512 net.ipv6.neigh.default.gc_thresh2 = 2048 net.ipv6.neigh.default.gc_thresh3 = 4096 Reload sysctl parameters sysctl -p