Skip to content

Instantly share code, notes, and snippets.

View andrenarchy's full-sized avatar
🚴‍♂️

André Gaul andrenarchy

🚴‍♂️
View GitHub Profile
@andrenarchy
andrenarchy / stellar-kubernetes-google-cloud.md
Created June 6, 2019 14:49
Stellar on Kubernetes: initialization Google Cloud

Stellar on Kubernetes: initialization Google Cloud

For Stellar nodes on Google Cloud we use automatically provisioned SSDs.

Create a file storage-ssd.yaml with the following content:

kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
 name: ssd
@andrenarchy
andrenarchy / stellar-kubernetes-ibm-cloud.md
Last active June 6, 2019 14:47
Stellar on Kubernetes: initialization IBM Cloud

Stellar on Kubernetes: initialization IBM Cloud

(Provided by @todkap)

Stellar Core and Horizon leverage Kubernetes dynamic provisioning for their storage classes (https://kubernetes.io/blog/2017/03/dynamic-provisioning-and-storage-classes-kubernetes/). The default storage class for IBM Cloud is file-based and has known limitations with regards to docker images running as non-root. To avoid this limitation, we can change the default storage class to block storage (requires the installation of an IBM block storage helm chart from the IBM Cloud Helm Repository) and a patch to the default storage classes we want to disable and enable.

# Get the IBM block storage classes from IKS helm repo
$ helm repo add iks-charts https://icr.io/helm/iks-charts
$ helm repo update
@andrenarchy
andrenarchy / .bashrc
Last active March 25, 2018 14:51
Export variables from an .env file
# dotenvexport FILE
#
# Exports all vars from a .env file without overwriting existing variables (see https://docs.docker.com/compose/env-file/)
dotenvexport () {
FILE=$1
OLDIFS="$IFS"
IFS=$'\n'
for line in $(cat $FILE | grep -vE "^(#|\s*$)"); do
VAR=${line%%=*}
if ! [[ -v $VAR ]]; then
@andrenarchy
andrenarchy / stellar-testnet.yml
Last active August 21, 2018 23:56
Stellar Core and Horizon with docker-compose
version: '3'
services:
postgres-core:
image: postgres:9
volumes:
- "/var/stellar-data-testnet/postgres-core:/var/lib/postgresql/data"
environment:
- POSTGRES_DB=stellar-core
stellar-core:
image: stellar-core
LOG_FILE_PATH=""
BUCKET_DIR_PATH="/data/buckets"
DATABASE="postgresql://dbname=stellar-core user=postgres host=postgres-core"
HTTP_PORT=11626
PUBLIC_HTTP_PORT=true
### Keybase proof
I hereby claim:
* I am andrenarchy on github.
* I am andrenarchy (https://keybase.io/andrenarchy) on keybase.
* I have a public key ASDBVcqSCeQErj79PAZaMzyv0WaMyYKSGClZLycQ6ZmDvwo
To claim this, I am signing this object:
@andrenarchy
andrenarchy / HOWTO.md
Created November 18, 2015 10:42
CyanogenMod update w/ encryption

IMPORTANT: use full zip (signed flashable zip; not the incremental update)

FILE="http://builds.cyngn.com/factory/bacon/cm-12.1-YOG4PAS2QL-bacon-signed.zip"
wget ${FILE}
# copy ${FILE} to phone storage (/sdcard)
# reboot to recovery, install ${FILE}, wipe cache & dalvik cache

Compile icinga2 and icingaweb2 on Ubuntu 14.04 trusty

The ppa does not build packages for ARM (e.g. ODROID U3), so let's compile them.

Configure pbuilder

Make sure that /etc/pbuilderrc contains the line

echo 'COMPONENTS="main universe multiverse restricted"' | sudo tee -a /etc/pbuilderrc

Create trusty build env

@andrenarchy
andrenarchy / howto.md
Last active October 21, 2018 02:59
Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Build icinga2 and icinga-web Debian/Ubuntu packages for non-{i386,amd64} architectures

Why?

The icinga PPA only provides packages for i386 and amd64. If you're running an ARM-powered device such as the Raspberry Pi or the ODROID U3 (which I use), you have to build the packages yourself. However, compiling the packages is very easy thanks to Debian's excellent build tools and the work of the icinga package maintainer. This howto uses pbuilder which builds in a clean chroot so your original system is not polluted with build packages.

@andrenarchy
andrenarchy / handbrake_batch
Last active August 29, 2015 14:12
Converts a dir with videos into mp4
#!/bin/bash
BASE_DIR=/home/andre/
INPUT_DIR=$BASE_DIR/handbrake_input/
OUTPUT_DIR=$BASE_DIR/handbrake_output/
OUTPUT_EXT=mp4
HANDBRAKE=HandBrakeCLI
LOG=$BASE_DIR/handbrake_batch.log
for INPUT in `ls $INPUT_DIR`; do