Skip to content

Instantly share code, notes, and snippets.

ajayhn

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
View coreos-on-do.sh
#!/bin/bash
set -e
# Forked from https://raw.githubusercontent.com/ibuildthecloud/coreos-on-do/master/coreos-on-do.sh
CHANNEL=${CHANNEL:-alpha}
VERSION=${VERSION:-current}
install_kexec()
{
@ajayhn
ajayhn / README.md
Created Sep 26, 2017 — forked from andyshinn/README.md
CoreOS on Digital Ocean using Terraform
View README.md

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 http://www.terraform.io/downloads.html. Follow the instructions at http://www.terraform.io/intro/getting-started/install.html by getting Terraform in your PATH and testing that it works.

Digital Ocean API Key

@ajayhn
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
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
ajayhn / create-net-audit-log
Last active Oct 11, 2016
create-net-audit-log
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
ajayhn / ifmap-server-error-handling
Created Sep 15, 2016
ifmap-server-error-handling
View ifmap-server-error-handling
1. timeout when publishing to ifmap-server (mapclient.call())
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
ajayhn / gist:ab379ae36a0e07d101e4861587541828
Created Sep 9, 2016
satisfy any import from vnc_api.types.
View gist:ab379ae36a0e07d101e4861587541828
in vnc_api/__init__.py
```
import sys
import imp
class MyImportFinder(object):
def find_module(self, fullname, path=None):
print fullname
@ajayhn
ajayhn / setup-aptly.sh
Created Aug 25, 2016
setup-aptly-on-ubuntu
View setup-aptly.sh
#!/bin/bash
sudo echo "deb http://repo.aptly.info/ squeeze main" > /etc/apt/sources.list.d/aptly.list
wget -qO - https://www.aptly.info/pubkey.txt | sudo apt-key add -
sudo apt-get update
sudo apt-get install aptly
@ajayhn
ajayhn / analytics-on-separate-db-node.md
Created Jun 22, 2016
analytics-on-separate-db-node
View analytics-on-separate-db-node.md
  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 cassandra-env.sh 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
ajayhn / contrail-controller-dockerfile.r3.0
Last active Jan 30, 2018
contrail-controller-dockerfile.r3.0
View contrail-controller-dockerfile.r3.0
FROM ubuntu:14.04
# e.g. docker build --build-arg REPO_URL=http://hajay-repo:8080/kilo-3.0.0.0-2723-kilo/ --build-arg REPO_DIST=opencontrail-R3.0 .
ARG REPO_URL=http://hajay-repo:8080/kilo-3.0.0.0-2723-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.