Skip to content

Instantly share code, notes, and snippets.

@dzharii
dzharii / k8s-pi.md
Created June 25, 2018 04:44 — forked from alexellis/k8s-pi.md
K8s on Raspbian

Kubernetes on (vanilla) Raspbian Lite

Yes - you can create a Kubernetes cluster with Raspberry Pis with the default operating system called Raspbian. This means you can carry on using all the tools and packages you're used to with the officially-supported OS.

Pre-reqs:

  • You must use an RPi 2 or 3 for use with Kubernetes
  • I'm assuming you're using wired ethernet (Wi-Fi also works, but it's not recommended)

Master node setup

#!/bin/bash
# prerequisites
apt-get install openjdk-7-jdk
NEXUS_DIR=/opt/nexus
mkdir -p $NEXUS_DIR
curl -L http://www.sonatype.org/downloads/nexus-latest-bundle.tar.gz | tar -xzv --strip 1 -C $NEXUS_DIR
@dzharii
dzharii / node-cluster-messaging.js
Created March 5, 2016 05:20 — forked from jpoehls/node-cluster-messaging.js
Simple message passing between cluster master and workers in Node.js
var cluster = require('cluster');
if (cluster.isWorker) {
console.log('Worker ' + process.pid + ' has started.');
// Send message to master process.
process.send({msgFromWorker: 'This is from worker ' + process.pid + '.'})
// Receive messages from the master process.
@dzharii
dzharii / gist:8995ff1f7d50d6059bc2
Created February 20, 2016 18:12 — forked from magohl/gist:029efefbf15527b5f10d
Raspberry Pi 2 - Install mono and ASP.NET 5
Raspian
-Resize sdcard
-Install mono
-Install DNVM
-Install DNVM Execution Env
-Download ASPNET samples
-Resore packages for HelloWorldMvc
-Run HelloWorldMvc
sudo raspi-config
@dzharii
dzharii / install.sh
Last active January 14, 2017 15:53 — forked from vjm/install.sh
Raspberry Pi elasticsearch-2.2.0.tar.gz and kibana-4.4.0-linux-x64.tar.gz
sudo apt-get install openjdk-7-jre
sudo mkdir /usr/share/elasticsearch
cd /usr/share/elasticsearch
sudo wget https://download.elasticsearch.org/elasticsearch/release/org/elasticsearch/distribution/tar/elasticsearch/2.2.0/elasticsearch-2.2.0.tar.gz
sudo wget https://download.elastic.co/kibana/kibana/kibana-4.4.0-linux-x64.tar.gz
sudo tar -zxvf elasticsearch-2.2.0.tar.gz
@dzharii
dzharii / elasticsearch.yml
Created January 21, 2016 18:52 — forked from reyjrar/elasticsearch.yml
ElasticSearch config for a write-heavy cluster
##################################################################
# /etc/elasticsearch/elasticsearch.yml
#
# Base configuration for a write heavy cluster
#
# Cluster / Node Basics
cluster.name: logng
# Node can have abritrary attributes we can use for routing
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Seitenr?nder - marginwidth, marginheight, topmargin, leftmargin</title>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function(){
var baseUrl;
time ./phantomjs-1.9.7-linux-x86_64/bin/phantomjs test.js |ffmpeg -c:v png -f image2pipe -r 10 -i - -y test.mp4