Skip to content

Instantly share code, notes, and snippets.

View pblittle's full-sized avatar

P. Barrett Little pblittle

View GitHub Profile
@pblittle
pblittle / flash-raspbian-lite.sh
Created November 2, 2018 01:55
Flash Raspbian Lite and enable SSH
diskutil umount /dev/disk2s1
dd if=Downloads/2018-10-09-raspbian-stretch-lite.img of=/dev/rdisk2 bs=1m
mount -uw /Volumes/boot
touch /Volumes/boot/ssh
@pblittle
pblittle / k8s-pi.md
Created October 9, 2018 12:20 — 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.

This is part of a blog post Serverless Kubernetes home-lab with your Raspberry Pis written by Alex Ellis.

Copyright disclaimer: Please provide a link to the post and give attribution to the author if you plan to use this content in your own materials.

Pre-reqs:

@pblittle
pblittle / k8s-pi.md
Created October 9, 2018 12:19 — 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.

This is part of a blog post Serverless Kubernetes home-lab with your Raspberry Pis written by Alex Ellis.

Copyright disclaimer: Please provide a link to the post and give attribution to the author if you plan to use this content in your own materials.

Pre-reqs:

cf cups $SERVICE_NAME -p $SERVICE_JSON || cf uups $SERVICE_NAME -p $SERVICE_JSON
@pblittle
pblittle / cf-app-names.sh
Created May 12, 2017 20:53
Returns a list of Cloud Foundry app names
cf curl /v2/apps | jq -r ".resources[].entity.name"
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "FullPolicy",
"Action": [
"acm:DescribeCertificate",
"acm:ListCertificates",
"acm:GetCertificate",
"autoscaling:Describe*",
CF_UPS_DATA=$(cf curl /v2/user_provided_service_instances | jq '.resources[].entity | select(.name=="logstash-drain")')
---
name: microbosh
logging:
level: DEBUG
network:
type: manual
vip: REDACTED
ip: 10.10.0.20
@pblittle
pblittle / cloud-foundry-dea-zombie-processes.txt
Created April 8, 2016 17:49
Zombie processes found on Cloud Foundry DEA instance
$ ps aux | grep 'Z'
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
20085 7783 99.8 0.0 0 0 ? Z<l Apr07 2403:51 [java] <defunct>
20185 9672 98.4 0.0 0 0 ? Z<sl Apr05 4394:39 [npm] <defunct>
root 22292 0.0 0.0 0 0 ? Z< Mar02 0:00 [dea_logging_age] <defunct>
root 22294 0.0 0.0 0 0 ? Z< Mar02 0:00 [dea_logging_age] <defunct>
root 22331 0.0 0.0 0 0 ? Z< Mar02 0:00 [metron_agent_ct] <defunct>
root 22332 0.0 0.0 0 0 ? Z< Mar02 0:00 [metron_agent_ct] <defunct>
20127 25085 96.5 0.0 0 0 ? Z<sl Mar23 22021:40 [java] <defunct>
20185 26612 0.0 0.0 0 0 ? Z<l Mar28 6:44 [node] <defunct>