View gist:9c81d327c5227cc539b365b300977c67
awk -v t=2592000 '$1 < t { exit 0 ; } $1 >= t { exit 1 ; }' /proc/uptime | |
View k8s-snippets
k cordon $(k get nodes --no-headers | awk 'BEGIN { ORS=" " }; $5 == "v1.15.11-eks-14f01f" {print $1}' ) | |
kubectl cordon $(kubectl get no --no-headers -o go-template --template '{{range .items}}{{.metadata.name}} {{.metadata.creationTimestamp}}{{"\n"}}{{end}}' | awk 'BEGIN { ORS=" " }; $2 <= "'$(date -u -v -10d +%Y-%m-%dT%H:%M:%SZ)'" { print $1 }') | |
aws autoscaling describe-auto-scaling-groups --output table --query "AutoScalingGroups[? Tags[? (Key=='k8s.io/cluster/XXXX') && Value=='owned']]".'[AutoScalingGroupName,DesiredCapacity]' |
View gitlab-runner-job.yaml
# Initialize a gitlab-runner in a utility namespace dedicated to customer namespace | |
# Designed to faciliate customer self-service to their namespace(s) via GitLab | |
--- | |
apiVersion: batch/v1 | |
kind: Job | |
metadata: | |
name: deploy-gitlab-runner-<customer>-<namespace> | |
spec: | |
ttlSecondsAfterFinished: 100 | |
template: |
View es_bootstrap_passwords.sh
#!/bin/bash | |
# https://discuss.elastic.co/t/how-to-set-passwords-for-built-in-users-in-batch-mode/119655/7 | |
# Passwords: | |
BOOTSTRAP="$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c32)" | |
ELASTIC="" | |
KIBANA="" | |
LOGSTASH_SYSTEM="" | |
BEATS_SYSTEM="" |
View 10-thepit.conf
echo 'address=/ericbisme.net/192.168.10.128 # K8s Ingress' > /etc/dnsmasq.d/10-thepit.conf && \ | |
echo 'address=/pi.hole/192.168.10.128 # pi-hole address' >> /etc/dnsmasq.d/10-thepit.conf && \ | |
echo 'server=/thepit.ericbisme.net/1.1.1.1 # Resolve externally' >> /etc/dnsmasq.d/10-thepit.conf && \ | |
service dnsmasq restart | |
address=/ericbisme.net/192.168.10.128 # K8s Ingress | |
address=/pi.hole/192.168.10.128 # pi-hole address | |
server=/thepit.ericbisme.net/1.1.1.1 | |
{ |
View web.pp
# Install Grey Heller ERP Firewall Web files | |
class greyheller::erpfirewall::web ( | |
$archive_location = hiera('erp_firewall_basedir'), | |
$psft_install_user_name = hiera('psft_install_user_name'), | |
$psft_runtime_user_name = hiera('psft_runtime_user_name'), | |
$ps_home_location = hiera('ps_home_location'), | |
$ps_config_home = hiera('ps_config_home'), | |
$pia_domain_name = hiera('pia_domain_name'), | |
$failopen = false, | |
$enabled = true, |
View ps_weblogic_setenv.pp
#Set Heapsize in WebLogic setEnv.sh | |
class cu_ps_weblogic::ps_weblogic_setenv ( | |
$ps_config_home = hiera('ps_config_home'), | |
$pia_domain_name = hiera('pia_domain_name'), | |
$wl_heapsize = hiera('wl_heapsize'), | |
$wl_threadpool = hiera('wl_threadpool'), | |
){ | |
Ini_Subsetting { | |
path => "${ps_config_home}/webserv/${pia_domain_name}/bin/setEnv.sh", |
View module_differences.txt
bashrc template. hardcodes different Tuxedo version. |
View hiera.yaml
# managed by puppet | |
--- | |
:backends: | |
- eyaml | |
- yaml | |
:logger: console | |
:hierarchy: | |
- "nodes/%{::clientcert}" |