This file contains hidden or 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
| # Download and Install the Latest Updates for the OS | |
| apt-get update && apt-get upgrade -y | |
| # Set the Server Timezone to CST | |
| echo "America/Chicago" > /etc/timezone | |
| dpkg-reconfigure -f noninteractive tzdata | |
| # Enable Ubuntu Firewall and allow SSH & MySQL Ports | |
| ufw enable | |
| ufw allow 22 |
This file contains hidden or 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
| import "bytes" | |
| func StreamToByte(stream io.Reader) []byte { | |
| buf := new(bytes.Buffer) | |
| buf.ReadFrom(stream) | |
| return buf.Bytes() | |
| } | |
| func StreamToString(stream io.Reader) string { | |
| buf := new(bytes.Buffer) |
This file contains hidden or 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
| 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 |
This file contains hidden or 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
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "flag" | |
| "io/ioutil" | |
| "log" | |
| "net/http" | |
| ) |
This file contains hidden or 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
| #!/usr/bin/env bash | |
| # Ubuntu Server or VM Cleaner. Safe by default; aggressive when asked. | |
| # Example safe: sudo ./clean.sh | |
| # Example aggressive: sudo JOURNAL_DAYS=3 AGGRESSIVE=1 ./clean.sh | |
| # Enable Docker image prune (images only): sudo ./clean.sh --docker-images | |
| # Tested on Ubuntu 20.04, 22.04, 24.04 (server/VM images). | |
| set -Eeuo pipefail | |
| trap 'rc=$?; echo "Error on line $LINENO: $BASH_COMMAND (exit $rc)"; exit $rc' ERR | |
| IFS=$'\n\t' |
Set up Kubernetes on 3 Debian Jessie virtual machines: One master. Two nodes. Additionally do this without any "magic" so that what is required to be running to make everything work is plain and obvious.
We will be using flannel for the inter-machine networking layer. Mainly because it is useful and it seems to be pretty popular.

