Skip to content

Instantly share code, notes, and snippets.

@erez-rabih
erez-rabih / nginx-dashboard.json
Last active August 29, 2015 14:06
Nginx Dashboard For Logstash
{
"title": "Nginx Web",
"services": {
"query": {
"list": {
"0": {
"query": "response:[200 TO 299]",
"alias": "OK",
"color": "#7EB26D",
"id": 0,
@ddossot
ddossot / README.md
Last active August 29, 2015 14:14
EC2 node discovery for Hazelcast

Alternative implementation of TcpIpJoinerOverAWS

This is a workaround for this Hazelcast issue.

To use the alternative TcpIpJoinerOverAWS:

  • Remove hazelcast-cloud from your project's classpath,
  • Add this class in your project or JAR it up if you prefer,
  • Do not configure an accessKey nor a secretKey in Hazelcast's AwsConfig.

Single Node Kubernetes Cluster

sudo docker run -d --net=host --privileged --name=kubestack \
-v /sys:/sys:ro \
-v /:/rootfs:ro \
-v /var/run/docker.sock:/var/run/docker.sock \
-v /var/run:/var/run:rw \
-v /var/lib/kubelet/:/var/lib/kubelet:rw \
-v /var/lib/docker/:/var/lib/docker:ro \
@agonzalezro
agonzalezro / gist:e2335feac23cdb377810
Created October 15, 2015 14:35
Base64 `dockercfg` for pulling images from private repos into Kubernetes
cat $HOME/.docker/config.json|jq '.auths'|sed "s/http:/https:/g"|tr '\n' ' '|tr -d '[[:space:]]'|base64
@mhausenblas
mhausenblas / README.md
Last active March 21, 2016 08:08
Kubernetes debugging session leveraging labels

That's our RC:

$ cat ws-rc.yaml
apiVersion: v1
kind: ReplicationController
metadata:
  name: webserver-rc
spec:
  replicas: 5

selector:

@ipedrazas
ipedrazas / gist:97bca02b360e7acf29f471811010e66d
Created September 2, 2016 13:51
curl apiserver with certificates osx
openssl pkcs12 -export -out certificate.pfx -inkey apiserver-key.pem -in apiserver.pem -certfile ca.pem
(set `test` as password)
curl -v -k -E ./certificate.pfx:test https://172.17.4.101:443
@rbranson
rbranson / gist:038afa9ad7af3693efd0
Last active September 29, 2016 17:44
Disaggregated Proxy & Storage Nodes

The point of this is to use cheap machines with small/slow storage to coordinate client requests while dedicating the machines with the big and fast storage to doing what they do best. I found that request coordination was contributing to about half the CPU usage on our Cassandra nodes, on average. Solid state storage is quite expensive, nearly doubling the cost of typical hardware. It also means that if people have control over hardware placement within the network, they can place proxy nodes closer to the client without impacting their storage footprint or fault tolerance characteristics.

This is accomplished in Cassandra by passing the -Dcassandra.join_ring=false option when the process is started. These nodes will connect to the seeds, cache the gossip data, load the schema, and begin listening for client requests. Messages like "/x.x.x.x is now UP!" will appear on the other nodes.

There are also some more practical benefits to this. Handling client requests caused us to push the NewSize of the heap up

@ipedrazas
ipedrazas / gist:4ec14d9ecddce6e65769164f53af16f8
Created July 27, 2016 10:23
Update kubernetes node using the api server - PATCH
curl -k \
--header "Content-Type:application/merge-patch+json" \
--header "Accept: application/json" \
--header "Authorization: Bearer $TOKEN" \
--request PATCH \
--data '{ "metadata": {"labels": {"base": "coreOS"}}}' \
$API_SERVER/api/v1/nodes/172.17.4.202