Skip to content

Instantly share code, notes, and snippets.

View davivcgarcia's full-sized avatar
🖖

Davi Garcia davivcgarcia

🖖
View GitHub Profile
[OSEv3:children]
masters
nodes
etcd
nfs
glusterfs
[OSEv3:vars]
ansible_ssh_user=root
@davivcgarcia
davivcgarcia / update-golang.sh
Last active April 7, 2024 18:36
Script automatically update local Golang runtime
#! /bin/bash
# Stops at the first error
set -e
# Checks if is running as root, and sudo if not
[ `whoami` = root ] || { sudo "$0" "$@"; exit $?; }
# Determines current local version
if [[ -f /usr/local/go/bin/go ]]; then
@davivcgarcia
davivcgarcia / update-local-bin.sh
Last active October 16, 2020 19:40
Bash script for installing/updating local Cloud-Native Tooling
#! /bin/bash
#######################
### BASIC INIT
#######################
# Check for root access
[ `whoami` = root ] || { sudo "$0" "$@"; exit $?; }
# Set workdir
@davivcgarcia
davivcgarcia / demo-ocs4-workloads.yaml
Last active November 27, 2019 04:00
Testing Manifest for OCS 4
#
# Namespace used for sandboxing
#
---
apiVersion: v1
kind: Namespace
metadata:
creationTimestamp: null
name: demo-ocs-workloads
@davivcgarcia
davivcgarcia / config.yaml
Last active February 20, 2020 17:05
Kind 0.7.0 - Config para habilitar EphemeralContainers e ServiceTopology.
# this config file contains all config fields with comments
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
# patch the generated kubeadm config with some extra settings
kubeadmConfigPatches:
- |
apiVersion: kubeadm.k8s.io/v1beta1
kind: ClusterConfiguration
metadata:
name: config
@davivcgarcia
davivcgarcia / ocp4_downscale.sh
Created March 12, 2020 12:42
Red Hat OpenShift 4 - Downscale control-plane components (remove HA)
#
# WARNING: This document is not a official Red Hat procedure, and the commands will disable HA
# of control-plane components, turning your environment to not supported.
#
oc patch clusterversion/version --type='merge' -p "$(cat <<- EOF
spec:
overrides:
- group: apps/v1
kind: Deployment
@davivcgarcia
davivcgarcia / resources.yaml
Created December 11, 2020 04:48
Red Hat Quay Enterprise (operator) on OpenShift Platform + Storage
apiVersion: v1
kind: Secret
metadata:
name: redhat-pull-secret
data:
.dockerconfigjson: ewogICJhdXRocyI6IHsKICAgICJxdWF5LmlvIjogewogICAgICAiYXV0aCI6ICJjbVZrYUdGMEszRjFZWGs2VHpneFYxTklVbE5LVWpFMFZVRmFRa3MxTkVkUlNFcFRNRkF4VmpSRFRGZEJTbFl4V0RKRE5GTkVOMHRQTlRsRFVUbE9NMUpGTVRJMk1USllWVEZJVWc9PSIsCiAgICAgICJlbWFpbCI6ICIiCiAgICB9CiAgfQp9
type: kubernetes.io/dockerconfigjson
---

Keybase proof

I hereby claim:

  • I am davivcgarcia on github.
  • I am davivcgarcia (https://keybase.io/davivcgarcia) on keybase.
  • I have a public key whose fingerprint is C6BB 51FB 4A3E 5181 94DE 9459 BCE4 9001 8268 6C82

To claim this, I am signing this object:

@davivcgarcia
davivcgarcia / bootstrapper.sh
Last active April 7, 2022 20:44
AWS CloudShell/Cloud9 Bootstrapper
#! /bin/bash
#
# About: Unified shell script to simplify AWS CloudShell/Cloud9 tooling bootstraping
# Author: Davi Garcia (davivcgarcia)
#
# Usage: $ source <(curl -sL https://bit.ly/aws-cloud-bootstrapper)
#
#
# Creates directory structure in the persistent storage mount
@davivcgarcia
davivcgarcia / eksctl-config.yaml
Last active November 7, 2022 16:10
Amazon EKS Workshop - Cluster Config Example (eksctl)
kind: ClusterConfig
apiVersion: eksctl.io/v1alpha5
metadata:
name: sandbox
version: "1.21"
region: us-east-1
cloudWatch:
clusterLogging:
enableTypes:
- api