Skip to content

Instantly share code, notes, and snippets.

@ToroNZ
ToroNZ / setting_things_up.sh
Created April 1, 2017 06:59
Get FeinCMS running on Centos7
* How to install
sudo yum install epel-release git
sudo yum install python-devel python-setuptools python-pip
sudo pip install --upgrade pip
sudo pip install virtualenv
virtualenv magnateenv
source ~/magnateenv/bin/activate
pip install django
@ToroNZ
ToroNZ / Shinobi_Centos.sh
Last active April 30, 2017 07:02
Shinobi instal script for Centos (tested on v7)
#!/bin/bash
set -e
# check if I am sudo
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
exit
fi
# Proceed
#Download prod repo
yum update -y
@ToroNZ
ToroNZ / Shinobi_Ubuntu.sh
Last active April 30, 2017 07:11
Shinobi instal script for Ubuntu (tested on 16.04)
#!/bin/bash
set -e
# check if I am sudo
if [ "$EUID" -ne 0 ]
then echo "Only sudoers please"
exit
fi
# Proceed
DEBIAN_FRONTEND=noninteractive
echo "Shinobi - Getting dependencies..."
#!/bin/bash
set -e
set -o pipefail
export VOLUME=${volume:-24}
for i in $(seq 0 "$VOLUME"); do
volume_name="vol-${i}"
cat <<EOF | kubectl create -f -
apiVersion: v1
@ToroNZ
ToroNZ / hosts
Last active March 8, 2018 03:06
Working Openshift 3.7 Containerized Ansible inventory
[OSEv3:vars]
###########################################################################
### Ansible Vars
###########################################################################
timeout=60
ansible_become=yes
ansible_ssh_user=ec2-user
#
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
@ToroNZ
ToroNZ / traefik-ds.yaml
Last active April 20, 2018 01:58
Traefik DaemonSet
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: traefik-ingress-controller
namespace: kube-system
---
kind: ConfigMap
apiVersion: v1
metadata:
@ToroNZ
ToroNZ / expose_kube-dash.yaml
Last active April 20, 2018 04:33
Expose Kubernetes Dashboard
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: kube-dash
namespace: kube-system
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: kube-dash.k8s.example.org
@ToroNZ
ToroNZ / ipvs-modules
Created November 8, 2018 01:50
modules required for ipvs kube-router in fedora
ip_vs
ip_vs_rr
ip_vs_wrr
ip_vs_sh
nf_conntrack_ipv4
@ToroNZ
ToroNZ / log-watcher.sh
Created January 15, 2019 01:39
watch nfs logs
#!/bin/bash
# Author: Matt Owens <mowens@redhat.com>
#
# This script watches for messages in a specific log file
#
pids=$$
FILE="$1"
PIPE="$2"