Skip to content

Instantly share code, notes, and snippets.

View aric49's full-sized avatar
:atom:
Blazing Trails!

Aric Renzo aric49

:atom:
Blazing Trails!
  • Charlotte, NC
View GitHub Profile
@aric49
aric49 / Day1.md
Last active February 27, 2020 18:26
DevOps Days Charlotte

Chaos Engineering with Gremlin

  • Schedule a game day (testing when systems go down)
  • Develop a hypothesis of what might happen.
  • Communicate plan
  • Execute during the day, make sure all teams are available
  • Document results (Restore system if/when things fail, document those)
  • Learn from mistakes and make the system better

Resources:

@aric49
aric49 / objectorientedgo.go
Last active November 5, 2019 19:53
Object Oriented Go
package main
import (
"fmt"
"strconv"
)
//let's define a struct
type car struct {
@aric49
aric49 / python-not-bash.py
Last active September 26, 2019 16:27
Use Python instead of Shell Scripts
#!/usr/bin/env python3
import subprocess
import sys
#Use Python instead of shell scripts!
#Broken out into classes to create nice object oriented code.
#Using Sys and subprocess modules to execute shell commands, checking each exit code and doing the things!
class ExecutePrograms:
@aric49
aric49 / lvm_provisioner.yml
Created July 5, 2019 18:24
Provision LVM using Ansible
- hosts: all
become: true
tasks:
#Provisions PVs and everything!
- name: volume group creation
lvg:
vg: data_vg
pvs:
- /dev/nvme0n1
@aric49
aric49 / nginx.conf
Created March 1, 2019 18:49
NGINX Reverse Proxy Load Balancer
#Unabashedly stolen and modified from: https://rancher.com/docs/rancher/v2.x/en/installation/ha/create-nodes-lb/nginx/
worker_processes auto;
worker_rlimit_nofile 40000;
events {
worker_connections 8192;
}
@aric49
aric49 / Gluster-Notes.md
Created October 24, 2018 19:45
Docker Gluster Cluster

Gluster Cluster on Docker Host

Pre Requisites

  1. 3 Ubuntu Nodes running docker
  2. DNS Entries for all three nodes
  3. Create partition on the data drive: fdisk /dev/xvdb (New, primary, defaults, defaults)
  4. Create XFS file system on the data drive: mkfs.xfs -i size=512 /dev/xvdb1
  5. Add disk to /etc/fstab: /dev/xvdb1 /data/brick1 xfs defaults 1 2
  6. Mount the drive: mount -a
@aric49
aric49 / index.php
Created August 16, 2018 15:37
NGINX FastCGI Debugging
<?php
//print out values of variables
var_dump($_SERVER[‘REMOTE_ADDR’]);
var_dump($_SERVER[‘HTTP_X_FORWARDED_FOR’]);
?>
@aric49
aric49 / helm_install.md
Last active August 6, 2018 14:43
Rancher Helm Install

Apply RBAC Permissions:

$ cat ~/helm-rbac.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
  name: tiller
  namespace: kube-system
---
@aric49
aric49 / output.txt
Last active August 3, 2018 15:54
KubeCTL Rancher Output
aric@thinkpad-p51:~$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
* ops-cluster-nonprod ops-cluster-nonprod user-k744f
aric@thinkpad-p51:~$ kubectl cluster-info
Kubernetes master is running at https://rancher.dev.internal.domain.com/k8s/clusters/c-gvhfk
To further debug and diagnose cluster problems, use 'kubectl cluster-info dump'.
Unable to connect to the server: x509: certificate signed by unknown authority
@aric49
aric49 / docker.log
Created July 19, 2018 20:26
Docker Logs
time="2018-07-19T18:46:30.081127537Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete" [314/1866]
time="2018-07-19T18:46:39Z" level=info msg="shim docker-containerd-shim started" address="/containerd-shim/moby/051e05ee32231b9bfcef66825485f865fda39e9435801667dfe7b220b2fc8e04/shim.sock" debug=false modu
le="containerd/tasks" pid=31306
time="2018-07-19T18:49:26Z" level=info msg="shim reaped" id=051e05ee32231b9bfcef66825485f865fda39e9435801667dfe7b220b2fc8e04 module="containerd/tasks"
time="2018-07-19T18:49:26.262151003Z" level=info msg="ignoring event" module=libcontainerd namespace=moby topic=/tasks/delete type="*events.TaskDelete"