Skip to content

Instantly share code, notes, and snippets.

View ericstoekl's full-sized avatar

Eric Stoekl ericstoekl

  • Seattle, WA, USA
View GitHub Profile
@ericstoekl
ericstoekl / user-data-openfaas-1node.yml
Last active October 30, 2017 18:29 — forked from DieterReuter/user-data-openfaas-1node.yml
Deploy HypriotOS/arm64 for RPi3 with OpenFaas the DevOps/Automation way
#cloud-config
# vim: syntax=yaml
#
# The current version of cloud-init in the Hypriot rpi-64 is 0.7.9
# When dealing with cloud-init, it is SUPER important to know the version
# I have wasted many hours creating servers to find out the module I was trying to use wasn't in the cloud-init version I had
# Documentation: http://cloudinit.readthedocs.io/en/0.7.9/index.html
# Set your hostname here, the manage_etc_hosts will update the hosts file entries as well
#!/bin/bash
# Download all templates from branch
mkdir nonRootTest
cd nonRootTest
curl -sSL https://github.com/ericstoekl/faas-cli/archive/templateNonRoot.zip > tnr.zip
unzip tnr.zip 'faas-cli-templateNonRoot/template/*' -d .
mv faas-cli-templateNonRoot/template ./template
rm -r faas-cli-templateNonRoot
@ericstoekl
ericstoekl / gist:1d4372e9398d9cec7ec028629b2c36e2
Last active May 8, 2018 23:13
K8s on AWS quickinstall script
apt-get update
apt-get install -qy docker.io
apt-get update
apt-get install -y apt-transport-https
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add -
echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" > /etc/apt/sources.list.d/kubernetes.list
apt-get update
@ericstoekl
ericstoekl / gist:4221cf5605c6f7fb1370f0c52fce6b31
Last active June 20, 2018 03:33
OpenFaaS Helm deployment from Repository on GKE
# Make sure you have your ~/.kube/config set up to point to the cluster you want.
kubectl create clusterrolebinding "cluster-admin-$(whoami)" \
--clusterrole=cluster-admin \
--user="$(gcloud config get-value core/account)"
helm repo add openfaas https://s3-us-west-2.amazonaws.com/openfaas-repo
helm search openfaas # Confirm that openfaas/openfaas exists
helm init
kubectl get all -n kube-system # Make sure that Tiller is at 1/1 status
@ericstoekl
ericstoekl / store.json
Last active April 27, 2018 03:54
private registry store.json
[
{
"icon": "https://pbs.twimg.com/profile_images/927538119901175814/4uhYwTyC_400x400.jpg",
"title": "Colorization",
"description": "Turn black and white photos to color using a URL as the request. The colorization function was popularised by @colorisebot by Alex Ellis and Finnian Anderson.",
"image": "localhost:5000/openfaas-colorization:0.4.0",
"name": "colorise",
"fprocess": "python -u index.py",
"network": "func_functions",
"repo_url": "https://github.com/alexellis/repaint-the-past",
version=$(curl -s https://api.github.com/repos/openfaas/faas-cli/releases/latest | grep 'tag_name' | cut -d\" -f4)
echo $version
if [ ! "$version" ]; then
echo "Failed while attempting to install faas-cli. Please manually install:"
echo ""
echo "1. Open your web browser and go to https://github.com/openfaas/faas-cli/releases"
echo "2. Download the latest release for your platform. Call it 'faas-cli'."
echo "3. chmod +x ./faas-cli"
echo "4. mv ./faas-cli /usr/local/bin"
echo "5. ln -sf /usr/local/bin/faas-cli /usr/local/bin/faas"
@ericstoekl
ericstoekl / post-body.txt
Created June 21, 2018 03:37
A gist capturing 10 bytes
Store this
@ericstoekl
ericstoekl / post-body.txt
Created June 21, 2018 04:21
A gist capturing 11 bytes
Hello folks
@ericstoekl
ericstoekl / post-body.txt
Created June 21, 2018 04:22
A gist capturing 11 bytes
Hello folks
@ericstoekl
ericstoekl / post-body.txt
Created June 21, 2018 06:39
A gist capturing 12 bytes
hello meetup