This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
zookeeper.ssl.keyStore.location="/path/to/your/keystore" | |
zookeeper.ssl.keyStore.password="keystore_password" | |
zookeeper.ssl.trustStore.location="/path/to/your/truststore" | |
zookeeper.ssl.trustStore.password="truststore_password" | |
zookeeper.client.secure=true | |
zookeeper.clientCnxnSocket="org.apache.zookeeper.ClientCnxnSocketNetty" | |
zookeeper.serverCnxnFactory="org.apache.zookeeper.server.NettyServerCnxnFactory" | |
secureClientPort=2281 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/proc/sys/net/ipv4/* Variables: | |
ip_forward - BOOLEAN | |
0 - disabled (default) | |
not 0 - enabled | |
Forward Packets between interfaces. | |
This variable is special, its change resets all configuration | |
parameters to their default state (RFC1122 for hosts, RFC1812 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- name: create zookeeper user | |
user: name=zookeeper uid=1000 gid=1000 shell=/sbin/nologin | |
- name: create zookeeper directories | |
file: state=directory path={{item}} user=zookeeper group=zookeeper | |
with_items: | |
- /var/run/zookeeper | |
- /var/lib/zookeeper |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
../configure --enable-libevent --enable-ssl | |
SSL_ENABLED=1 SSL_KEY_FILE=key SSL_CERT_FILE=cert opt-flags binary | |
SSL_ENABLED=1 SSL_KEY_FILE=key SSL_CERT_FILE=cert SSL_REQUIRE_CERT=1 SSL_ENABLE_TLS_V1_1=true master.sh | |
SSL_ENABLED=1 SSL_SUPPORT_DOWNGRADE=1 SSL_KEY_FILE=key SSL_CERT_FILE=cert opt-flags binary | |
SSL_ENABLED=true SSL_SUPPORT_DOWNGRADE=false SSL_KEY_FILE=key SSL_CERT_FILE=cert opt-flags binary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ARCH=$(uname -m) | |
which bc | |
if [ $? -ne 0 ]; then | |
echo "This script require GNU bc, cf. http://www.gnu.org/software/bc/" | |
echo "On Linux Debian/Ubuntu you can install it by doing : apt-get install bc" | |
fi | |
echo "Update sysctl for $host" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/env bash | |
# borrowed / adapted from: https://wiki.ncsa.illinois.edu/display/~wglick/Parallel+Rsync | |
# RSYNC SETUP | |
RSYNC_PROG=/usr/bin/rsync | |
# note the important use of --relative to use relative paths so we don't have to specify the exact path on dest | |
RSYNC_OPTS="-aAXv --numeric-ids --progress --human-readable --delete --exclude=.glusterfs --relative" | |
export RSYNC_RSH="ssh -T -c arcfour -o Compression=no -x" | |
# ENV SETUP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker-compose build | |
# ...or just build one piece of it | |
docker-compose build [app|db|etc] | |
# Start your Docker Compose project | |
docker-compose up -d | |
# View the logs for this docker-compose proejct | |
docker-compose logs | |
# Stop running containers | |
docker-compose stop | |
# remove stopped containers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void iter_threads(int start, int end, void (*func)(int n)) | |
{ | |
int n = start; | |
pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER; | |
void *thread_body(void *ptr) | |
{ | |
double start = now(); | |
for (;;) { | |
pthread_mutex_lock( &mutex ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int rdseed16_step (uint16_t *seed) | |
{ | |
unsigned char ok; | |
asm volatile ("rdseed %0; setc %1" | |
: "=r" (*seed), "=qm" (ok)); | |
return (int) ok; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -Lo kubectl http://storage.googleapis.com/kubernetes-release/release/v1.5.1/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin/ |