Skip to content

Instantly share code, notes, and snippets.

View ralph-tice's full-sized avatar

Ralph Tice ralph-tice

  • Kentik
  • Texas
View GitHub Profile
@ralph-tice
ralph-tice / README.md
Last active January 26, 2016 21:36
SolrCloud backups

A little background on my context:

We run multiple Solr JVMs per box, which live in directories like:

/mnt/solr_8983
/mnt/solr_8984
/mnt/solr_8985
...
/mnt/solr_${PORT}
@ralph-tice
ralph-tice / multi-terminals.sh
Created October 22, 2014 01:11
Open an iTerm to every instance in an AutoScaling Group using aws-cli, knife and jq
launch_terms () {
until [ -z "$1" ] # Until uses up arguments passed...
do
/usr/bin/osascript <<-EOF
tell application "iTerm"
make new terminal
tell the current terminal
activate current session
launch session "Default Session"
tell the last session
@ralph-tice
ralph-tice / gist:cf5d9b46da095a2f6df7
Created January 15, 2015 17:51
ssh config for transparent ssh through amazon NAT AMIs to ubuntu private instances
Host *.vpc.mycorp.com
User ubuntu
ProxyCommand ssh -W %h:%p [email protected]
IdentityFile "~/.ssh/mykey.pem"
Host 172.1.*
User ubuntu
ProxyCommand ssh -W %h:%p [email protected]
IdentityFile "~/.ssh/mykey.pem"
Host nat.mycorp.com
@ralph-tice
ralph-tice / benchmark-commands.txt
Created October 1, 2015 19:35 — forked from jkreps/benchmark-commands.txt
Kafka Benchmark Commands
Producer
Setup
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test-rep-one --partitions 6 --replication-factor 1
bin/kafka-topics.sh --zookeeper esv4-hcl197.grid.linkedin.com:2181 --create --topic test --partitions 6 --replication-factor 3
Single thread, no replication
bin/kafka-run-class.sh org.apache.kafka.clients.tools.ProducerPerformance test7 50000000 100 -1 acks=1 bootstrap.servers=esv4-hcl198.grid.linkedin.com:9092 buffer.memory=67108864 batch.size=8196
@ralph-tice
ralph-tice / gist:3d6e5b2076cbc2900aaa
Last active December 25, 2018 11:17
terraform for 3 AZ VPC with NAT instance with autorecovery
###########
# Variables
###########
variable "aws_key_name" {
default = "mykeypair"
}
variable "region" {
default = "eu-west-1"
}
[program:kafka]
command = /usr/local/kafka/bin/kafka-run-class.sh -name kafkaServer -loggc kafka.Kafka /usr/local/kafka/config/server.properties
stopwaitsecs = 60
redirect_stderr = true
stdout_logfile = /var/log/kafka/kafka-stdout.log
stdout_logfile_maxbytes = 0
stdout_logfile_backups = 0
stopasgroup=true
environment =
JAVA_HOME="/usr/java/default",
@ralph-tice
ralph-tice / gist:bc8f66c4fe1d4238ce54c54272fc4ba2
Last active November 17, 2024 13:55
Resizing a Kafka cluster via bash
#!/bin/bash -xe
# requires jq and 3 brokers to start
which jq || echo 'no jq found, bye!' && exit 1
ZK_HOST=zkhost1:2181/kafka
# record all topics
/usr/local/kafka/bin/kafka-topics.sh --zookeeper $ZK_HOST --list > all_topics
# generate json for listing which topics to reassign
@ralph-tice
ralph-tice / TiceTest.md
Last active May 18, 2016 16:57
The Tice Test

Questions I expect companies I want to work at to get 12/12 yeses:

  1. Does each team own their production stack and manage their own on-call rotation?

  2. Is all code within the organization available to all developers?

  3. Can a new developer onboard and ship to production on their first day?

  4. Is there a well-defined process for making internal projects open source?

env.GIT_PROJECT = "thisgroup/thisproject"
env.INCLUDE_MERGES = true
// TODO: have team decide where and how much they want to receive slack notifications
//env.SLACK_ROOM = "alerts"
stage 'Init'
lib = node('swarm') {
git url: 'git@ourgithost:infra/CI.git', branch: 'develop'
load 'pipelines/gitlab_v1.groovy'
}
@ralph-tice
ralph-tice / keybase.md
Created September 12, 2016 16:05
keybase.md

Keybase proof

I hereby claim:

  • I am ralph-tice on github.
  • I am ralphtice (https://keybase.io/ralphtice) on keybase.
  • I have a public key whose fingerprint is 2ECB 5DF5 33D2 9F96 3BDD 481D 6DF6 0952 9EC9 7B31

To claim this, I am signing this object: