Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
#!/bin/bash | |
set -euoE pipefail | |
# Redfish commands related to Virtual Media. | |
# Redfish doc reference: https://www.supermicro.com/manuals/other/RedfishRefGuide.pdf | |
export BMC_ADDRESS='' | |
export ISO_IMAGE=http://192.168.117.9:8080/ocp4-rwn-1-small.iso | |
export username_password='Administrator:superuser' |
#!/bin/bash | |
## **Updates to this file are now at https://github.com/giovtorres/kvm-install-vm.** | |
## **This updated version has more options and less hardcoded variables.** | |
# Take one argument from the commandline: VM name | |
if ! [ $# -eq 1 ]; then | |
echo "Usage: $0 <node-name>" | |
exit 1 | |
fi |
#hostname setup | |
hostnamectl --static --pretty --transient set-hostname compute2.rk-home | |
# Storage for my nvme drive | |
parted --script --align=optimal /dev/nvme0n1 mklabel gpt -- mkpart libvirt XFS 0% 100% | |
parted --script /dev/nvme0n1 print | |
mkfs.xfs -f -i size=2048 -L libvirt /dev/nvme0n1 |
# install tripleo repos | |
# This will pull the latest version RPM | |
PKG=$(curl https://trunk.rdoproject.org/centos7/current/ | grep python2-tripleo-repos- | awk -F'"' '{print $8}') | |
# This will install it | |
yum install -y https://trunk.rdoproject.org/centos7/current/${PKG} | |
yum -y upgrade |
#!/bin/sh | |
if [ "$EUID" -ne 0 ]; then | |
echo -e "\nPlease run as root\neg. sudo $0 \n" | |
exit | |
fi | |
GITHUB_USERNAME="ebal" | |
cd `mktemp -d` |
--collector.host-port string comma-separated string representing host:ports of a static list of collectors to connect to directly (e.g. when not using service discovery) | |
--collector.http-port int The http port for the collector service (default 14268) | |
--collector.num-workers int The number of workers pulling items from the queue (default 50) | |
--collector.port int The tchannel port for the collector service (default 14267) | |
--collector.queue-size int The queue size of the collector (default 2000) | |
--collector.zipkin.http-port int The http port for the Zipkin collector service e.g. 9411 | |
--config-file string Configuration file in JSON, TOML, YAML, HCL, or Java properties formats (default none). See spf13/viper for precedence. | |
--discovery.conn-check-timeout duration |
Synology NAS - How to make a program run at startup | |
The other day I created a little node.js project to keep track of some finances. Synology has a node.js package but that just installs the tools - it has no 'container' or any other support to drop files and have it run automagically. Maybe one day. | |
In the meantime, you can start your project when you SSH into the NAS. My project has a 'www' script which bootstraps my project, so to start I simply type 'node bin/www' from the project directory. But, it only runs while I'm logged in, and if I log out for any reason, the process dies. That's hardly useful when I'm away from home, or on a different PC. So I decided to have a look at starting my project as a Linux service. | |
After doing a lot of research into how Synology does services, and a few failed attempts at init scripts, I found that Synology DSM (since version 5 perhaps) bundles Upstart, which is a neat little tool to deal with services on Linux. It's most prevalent on Debian and derivatives (notably Ub |
Helper setup to edit .yaml files with Vim:
List of general purpose commands for Kubernetes management:
#!/bin/bash | |
VERSIONS=${VERSIONS:-"2.7.13.2715"} | |
GLIBVERSION=${GLIBVERSION:-"2.12-402695"} | |
# make directory | |
mkdir -p /opt/bin | |
cd /opt | |
wget http://downloads.activestate.com/ActivePython/releases/${VERSIONS}/ActivePython-${VERSIONS}-linux-x86_64-glibc-${GLIBVERSION}.tar.gz | |
tar -xzvf ActivePython-${VERSIONS}-linux-x86_64-glibc-${GLIBVERSION}.tar.gz |
Prerequisite: latest Docker for Mac on MacOS Sierra
$ brew update
$ brew install --HEAD xhyve
$ brew install docker-machine-driver-xhyve
$ sudo chown root:wheel $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machine-driver-xhyve
$ curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.18.0/minikube-darwin-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/