Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Micheal Waltz ☁️ ecliptik

🏠
Working from home
View GitHub Profile
@ecliptik
ecliptik / README.md
Last active Aug 27, 2020
statefulset label pattern
View README.md

Tenant IPs

  • tenant IPs are stored in ips.txt
  • These are used to create the number of services and the number of replicas for a statefulset (1 tenantip = 1 pod)

Create Services

  • Running ./update-service.sh a for the first time will create the services
  • The files ips.txt contains the list of clusterIPs to set, which also creates a label and selector
  • Passing an a or b will update the selector to use the pods in group a or b
@ecliptik
ecliptik / Dockerfile
Last active Aug 18, 2020
jenv inside Docker container image
View Dockerfile
#Build and run with a specific version of java within the build image
#eg Java 11: docker build --build-arg JAVA_VERSION=11 -t jenv .
#eg Java 8: docker build --build-arg JAVA_VERSION=1.8 -t jenv .
FROM debian:buster
RUN apt update && apt install -y ca-certificates wget
RUN wget -O- https://github.com/AdoptOpenJDK/openjdk11-binaries/releases/download/jdk-11.0.8%2B10/OpenJDK11U-jdk_x64_linux_hotspot_11.0.8_10.tar.gz | tar -xz -C /opt/
RUN wget -O- https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/download/jdk8u265-b01/OpenJDK8U-jdk_x64_linux_hotspot_8u265b01.tar.gz | tar -xz -C /opt/
@ecliptik
ecliptik / kubectl-trick.md
Last active Jun 11, 2019
Useful kubectl commands
View kubectl-trick.md

kubectl tricks

Operations

Run a on-off debian container with interactive shell and remove on exit

kubectl run --generator=run-pod/v1 --image=debian debian --rm -i --tty -- /bin/bash

Forward a service port locally

View gist:a998b33cfd1a538d9a4404db23e17e74
Thu Feb 7 22:10:35 PST 2019
OpenBSD/arm64 (puffy.ecliptik.com) (console)
login:
@ecliptik
ecliptik / dockerrun.sh
Created Oct 2, 2018
arm64v8/tomcat image on raspberrypi
View dockerrun.sh
HypriotOS/arm64: pirate@tatl in ~
$ uname -a && docker run -it arm64v8/tomcat
Linux tatl 4.14.37-hypriotos-v8 #1 SMP PREEMPT Sun Apr 29 17:26:16 UTC 2018 aarch64 GNU/Linux
Using CATALINA_BASE: /usr/local/tomcat
Using CATALINA_HOME: /usr/local/tomcat
Using CATALINA_TMPDIR: /usr/local/tomcat/temp
Using JRE_HOME: /docker-java-home/jre
Using CLASSPATH: /usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar
02-Oct-2018 21:50:17.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version: Apache Tomcat/8.5.34
02-Oct-2018 21:50:17.284 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built: Sep 4 2018 22:28:22 UTC
@ecliptik
ecliptik / kube-update-secret.sh
Created Sep 13, 2018
Exmaple k8s Secret Script
View kube-update-secret.sh
#!/bin/sh
#Simple script to demonstrate how to read a key=value namespace from vault and generate a Kubernete secret
#Requires Vault server and Vault CLI (http API will also work with modifications)
#Setup app name and namespace that will match what's in the app deployment manifest
# example:
# envFrom:
# - secretRef:
# name: myappname
@ecliptik
ecliptik / bucketbench-output-docker.md
Last active Sep 16, 2017
Bucketbench on Packet.net Type 2A Instance with Docker v17.07.0-ce
View bucketbench-output-docker.md

Results

./bucketbench --log-level=debug run -b examples/docker.yaml threads: 3

SUMMARY TIMINGS/THREAD RATES           

                      Iter/Thd    1 thrd   2 thrds   3 thrds   4 thrds   5 thrds   6 thrds   7 thrds   8 thrds   9 thrds  10 thrds                           
               Limit      1000    218.64    314.52    353.42    354.66    347.47    318.98    302.99    289.11    282.92    273.01                           
@ecliptik
ecliptik / jest-results.md
Created Sep 15, 2017
Jest multi-thread results on ARM64
View jest-results.md

jest --coverage --verbose --maxWorkers=24

Test Suites: 569 passed, 569 total
Tests:       3 skipped, 4901 passed, 4904 total
Snapshots:   456 passed, 456 total
Time:        169.055s
Ran all test suites.

=============================== Coverage summary ===============================
View gist:690d393bacd98fcc8313a9e45987ec84
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: aci-connector
namespace: default
spec:
replicas: 1
template:
metadata:
labels:
@ecliptik
ecliptik / aci-connector-k8s-armhf-dockerfile
Last active Sep 12, 2017
Dockerfile for aci-connector-k8s armhf image
View aci-connector-k8s-armhf-dockerfile
### Base Image
# Setup up a base image to use in Build and Runtime images
FROM ecliptik/node:8.4.0-alpine-armhf AS base
WORKDIR /app
COPY package.json .
### Build Image
# Installs build dependencies and npm packages
# Creates artifacts to copy into Runtime image
You can’t perform that action at this time.