Skip to content

Instantly share code, notes, and snippets.

View stueccles's full-sized avatar

Stuart Eccles stueccles

View GitHub Profile
@avocade
avocade / erl-observe.sh
Created February 22, 2017 12:34
Connect to remote erlang node with remote iex session (eg over k8s port-forwarding), and start observer on it
#!/bin/bash
# This script provides easy way to debug remote Erlang nodes that is running in a kubernetes cluster.
# Usage: ./erl-observe.sh -l app=my_all -n default -c erlang_cookie
#
# Don't forget to include `:runtime_tools` in your mix.exs application dependencies.
set -e
# Trap exit so we can try to kill proxies that has stuck in background
function cleanup {
echo " - Stopping kubectl proxy."
config :my_app, :twitter_api,
client: Twitter.SandboxClient