Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View kenmoini's full-sized avatar
⚙️
OPENSHIFTING IT INTO HIGH GEAR

Ken Moini kenmoini

⚙️
OPENSHIFTING IT INTO HIGH GEAR
View GitHub Profile
@kenmoini
kenmoini / jenkins-plugin-stuffer.sh
Created May 6, 2020 17:04
Jenkins Automated Plugin Stuffer
#!/usr/bin/env bash
## This script pulls in plugins for Jenkins manually and drops them into the plugins directory
set -e
## set -x ## Uncomment for debugging
echo ""
echo -e "Starting plugin downloads...\n"
@kenmoini
kenmoini / do_dns_worker.sh
Created April 27, 2020 22:39
DigitalOcean DNS Worker
#!/bin/bash
## Configure DigitalOcean DNS via API requests
## set -x ## uncomment for debugging
export DO_PAT=${DO_PAT:=""}
PARAMS=""
domain=""
@kenmoini
kenmoini / remote_crc.md
Created April 6, 2020 02:32 — forked from tmckayus/remote_crc.md
Running 'crc' on a remote server

Overview: running crc on a remote server

This document shows how to deploy an OpenShift instance on a server using CodeReady Containers (crc) that can be accessed remotely from one or more client machines (sometimes called a "headless" instance). This provides a low-cost test and development platform that can be shared by developers. Deploying this way also allows a user to create an instance that uses more cpu and memory resources than may be available on his or her laptop.

While there are benefits to this type of deployment, please note that the primary use case for crc is to deploy a local OpenShift instance on a workstation or laptop and access it directly from the same machine. The headless setup is configured completely outside of crc itself, and supporting a headless setup is beyond the mission of the crc development team. Please do not ask for changes to crc to support this type of deployment, it will only cost the team time as they politely decline :)

The instructions here were tested with F

@kenmoini
kenmoini / tips.md
Created February 29, 2020 23:11
RHEL Homelab How-tos

NAT Port Forwarding with firewall-cmd

firewall-cmd --permanent --zone=public --add-forward-port=port=32400:proto=tcp:toaddr=192.168.42.45 #plex
firewall-cmd --permanent --zone=public --add-forward-port=port=32400:proto=udp:toaddr=192.168.42.45 #plex

Docker mounted volume, SELinux Permission fix:

@kenmoini
kenmoini / admin_sa_binding.yaml
Last active August 26, 2021 06:05
Deploy an All-in-One Kubernetes host on DigitalOcean
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: admin-user
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: cluster-admin
subjects:
- kind: ServiceAccount
@kenmoini
kenmoini / forceDeleteOCProject.sh
Created December 29, 2019 20:42
Force Delete OpenShift Namespaces
#!/bin/sh
#
# Source: https://blog.jefferyb.me/force-delete-openshift-project-namespace/
#
# A script to delete namespace(s) stuck at "Terminating" state, that won't get deleted, within the OpenShift cluster.
# You'll see an error message like this below, when you try "oc delete project <namespace>"
#
# Error from server (Conflict): Operation cannot be fulfilled on namespaces "<namespace>": The system is ensuring all content is removed from this namespace. Upon completion, this namespace will automatically be purged by the system.
#
####### </ Jeffery Bagirimvano >
@kenmoini
kenmoini / server.js
Last active October 9, 2019 20:31
RAWR Partner Portal API Server Excerpt - A demonstration of one of the Node.js Express based API microservices used in RAWR. A number of routes have been truncated for privacy and security reason, and proper operation will still require the Dockerfile, Jenkinsfile, package.json and .env files, other routes for this service, as well as the Auth0 …
/*
NOTE: This file has been truncated
RAWR Partner Portal API Server Excerpt - A demonstration of one of the Node.js Express based API microservices used in RAWR.
A number of routes have been truncated for privacy and security reason, and proper operation will still require the Dockerfile, Jenkinsfile, package.json and .env files, other routes for this service, as well as the Auth0 application stack configured as needed, and other microservices used in the K8s/OCP cluster.
Fierce Software - RAWR Partner Portal API Server (rawr-partner-fe-api)
The Rapid Analytic Web Resource (RAWR) extends some functionality to our vendor partners
This service relies on Auth0, AWS SQS, and the following supplimentary Laravel Lumen services:
- rawr-partner-be-get-analytics
- rawr-partner-be-get-authentication
@kenmoini
kenmoini / k8s-nginx-ingress-notes
Created July 16, 2019 02:47
K8s nginx Ingress Notes
NOTES:
The nginx-ingress controller has been installed.
It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status by running 'kubectl --namespace default get services -o wide -w ingress-nginx-ingress-controller'
An example Ingress that makes use of the controller:
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
@kenmoini
kenmoini / ICS.php
Last active July 25, 2019 21:04 — forked from jakebellacera/ICS.php
A convenient script to generate iCalendar (.ics) files on the fly in PHP.
<?php
/**
* ICS.php
* =======
* Use this class to create an .ics file.
*
* Usage
* -----
* Basic usage - generate ics file contents (see below for available properties):
@kenmoini
kenmoini / default
Last active January 13, 2019 20:21
Nginx default configuration with some adjustments for Laravel+Wordpress+PHP
upstream php {
server unix:/run/php/php7.2-fpm.sock;
}
server {
listen 80 default_server;
listen [::]:80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name _;
location / {