Skip to content

Instantly share code, notes, and snippets.

View dwlf's full-sized avatar

Lloyd Dewolf dwlf

View GitHub Profile

Manatee Brain Transplant

The goal of this process is to upgrade a manatee of any vintage to Manatee v2. It relies on ZFS send/recv to replicate the data, but is limited to a migration between nodes in ONWM.

step 1. upgrade moray

Upgrading moray to a forward/backward compatible version is a prerequisite of the upgrade. The usual process is to disable one moray node, double-check the stack reconnects correctly, reprovision that node, and then repeat for other moray nodes.

If there is only one moray node deployed, deploying a second using the new image allows you to upgrade the original node as above.

#!/bin/bash -ex
# Paste this into ssh
# curl -sL https://gist.github.com/andsens/2913223/raw/bootstrap_homeshick.sh | tar -xzO | /bin/bash -ex
# When forking, you can get the URL from the raw (<>) button.
### Set some command variables depending on whether we are root or not ###
# This assumes you use a debian derivate, replace with yum, pacman etc.
aptget='sudo apt-get'
chsh='sudo chsh'
@dwlf
dwlf / base-64 15.1.1 gcc49-4.9.2nb1
Created June 16, 2015 04:19
gcc, g++ exe not in gcc49 on smartos?
__ . .
_| |_ | .-. . . .-. :--. |-
|_ _| ;| || |(.-' | | |
|__| `--' `-' `;-| `-' ' ' `-'
/ ; Instance (base-64 15.1.1)
`-' https://docs.joyent.com/images/smartos/base
[root@cb2299e2-5f28-ea84-8aac-8e45c0ee6b40 ~]# pkgin up
reading local summary...
processing local summary...
@dwlf
dwlf / .gitignore
Last active August 29, 2015 14:26
es-on-lx-ubuntu
elastic-install-triton-ubuntu.bash
@dwlf
dwlf / remove-gpg-user.sh
Created June 6, 2016 05:22 — forked from glogiotatidis/remove-gpg-user.sh
Git-crypt remove user.
#!/bin/bash
#
# Script to remove GPG key from git-crypt
#
# It will re-initialize git-crypt for the repository and re-add all keys except
# the one requested for removal.
#
# Note: You still need to change all your secrets to fully protect yourself.
# Removing a user will prevent them from reading future changes but they will
# still have a copy of the data up to the point of their removal.