Skip to content

Instantly share code, notes, and snippets.


Block or report user

Report or block ajayhn

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
set -e
# Forked from
ajayhn /
Created Sep 26, 2017 — forked from andyshinn/
CoreOS on Digital Ocean using Terraform

Terraform, CoreOS, and Digital Ocean

Let's use Terraform to easily get a CoreOS cluster up on Digital Ocean. In this example we will get a 5 node CoreOS cluster up and running on the Digital Ocean 8GB size.

Install Terraform

Grab a copy of Terraform for your platform from Follow the instructions at by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key

ajayhn / .tmux.conf
Last active Jun 5, 2017
tmux settings
View .tmux.conf
# unset C-b as leader and set backtick as leader
unbind C-b
set-option -g prefix `
# backtick+e for backtick
bind e send-prefix
# backtick+backtick for toggle
bind ` last-window
ajayhn / az01-churches.geojson
Last active May 16, 2017
List of Churches at AZ-01 congressional district.
View az01-churches.geojson
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
ajayhn / create-net-audit-log
Last active Oct 11, 2016
View create-net-audit-log
root@a5s8:~# neutron net-create test-net-1
Created a new network:
| Field | Value |
| admin_state_up | True |
| contrail:fq_name | default-domain |
| | admin |
| | test-net-1 |
| contrail:instance_count | 0 |
ajayhn / ifmap-server-error-handling
Created Sep 15, 2016
View ifmap-server-error-handling
1. timeout when publishing to ifmap-server (
when timeout happens keep retrying
2. ifmap-server code needs to inspect healthcheck object publish and if it misses n of them, exit() OR
config-nodemgr keeps reading healthcheck object from ifmap-server and if it can't read in n secs or value is stale, kill ifmap-server
3. control-node keeps reading healthcheck object from ifmap and it sees stale, move to a new ifmap-server
4. ifmap-publish-greenlet enqueue finds q-full, no change from current
ajayhn / gist:ab379ae36a0e07d101e4861587541828
Created Sep 9, 2016
satisfy any import from vnc_api.types.
View gist:ab379ae36a0e07d101e4861587541828
in vnc_api/
import sys
import imp
class MyImportFinder(object):
def find_module(self, fullname, path=None):
print fullname
ajayhn /
Created Aug 25, 2016
sudo echo "deb squeeze main" > /etc/apt/sources.list.d/aptly.list
wget -qO - | sudo apt-key add -
sudo apt-get update
sudo apt-get install aptly
ajayhn /
Created Jun 22, 2016
  1. Install 3 new servers with base OS same s4,5,6
  2. Install analytics and database packages on the 3 new servers s4,5,6
    • which packages kafka too?
  3. service supervisor-analytics stop; service cassandra stop; kafka?
  4. Determine whether old analytics DB is to be migrated or built anew 4.1 To be anew 4.1.1 service supervisor-analytics stop on s1,2,3 4.1.2 provision cassandra.yaml and to have a cluster of s4,5,6 4.1.3 provision analytics processes - discovery-ip should be VIP. 4.1.4 service supervisor-analytics start; service cassandra start; kafka?
ajayhn / contrail-controller-dockerfile.r3.0
Last active Jan 30, 2018
View contrail-controller-dockerfile.r3.0
FROM ubuntu:14.04
# e.g. docker build --build-arg REPO_URL=http://hajay-repo:8080/kilo- --build-arg REPO_DIST=opencontrail-R3.0 .
ARG REPO_URL=http://hajay-repo:8080/kilo-
ARG REPO_DIST=opencontrail-R3.0
RUN echo "deb ${REPO_URL} ${REPO_DIST} main" >> /etc/apt/sources.list.d/opencontrail.list
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated curl strace tcpdump
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated cassandra zookeeper rabbitmq-server
You can’t perform that action at this time.