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
@mgmarino
mgmarino / daemon_test.py
Created July 30, 2015 14:37
Example for using python-daemon and runner.DaemonRunner
import time
import os
import logging
from daemon.runner import DaemonRunner
_base_path = "/path/to/daemon"
class MyApp(object):
"""
Define the required attributes
@amitsaha
amitsaha / xml_rpc_client.py
Created February 17, 2013 00:30
Simple usage of python-daemon
import xmlrpclib
s = xmlrpclib.ServerProxy('http://localhost:9900')
print s.uptime()
users = s.users()
for user in users:
for login in users[user]:
print user, login
@thatsdone
thatsdone / pdaemon-sample.py
Last active August 14, 2018 05:27
A python-daemon 'runner.DaemonRunner' class extension (v0.1) and a sample.
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#!/usr/bin/python
import sys
import time
import logging
from daemon import runner
#
# An example daemon main logic application class.
# Just keep writing timestamps to a log file periodically.
#
@kenmoini
kenmoini / Install_VNC_AWS_Centos
Created September 28, 2018 22:01 — forked from mikaelMortensenADI/Install_VNC_AWS_Centos
How to Install VNC on an Amazon EC2 Centos 7.2 AMI
How to Install VNC on an AWS EC2 Centos 7.2 AMI
Reference: http://devopscube.com/how-to-setup-gui-for-amazon-ec2-rhel-7-instance/
1. Update the server using the following command.
sudo yum -y update
2. Install the gnome GUI components using the following command.
sudo yum groupinstall -y "Server with GUI"
@datagrok
datagrok / ergodox.md
Last active January 14, 2019 07:45
Reflections on my ErgoDox keyboard
@kevashcraft
kevashcraft / K8s-DigitalOcean-CoreOS.md
Last active September 18, 2020 05:47
How to Setup Kubernetes on DigitalOcean with CoreOS

Kubernetes on DigitalOcean with CoreOS

Let's look at an example of how to launch a Kubernetes cluster from scratch on DigitalOcean, including kubeadm, an Nginx Ingress controller, and Letsencrypt certificates.

Overview

Environment

We'll be creating a four-node cluster (k8s-master, k8s-000...k8s-002), load balancer, and ssl certificates.

Table of Contents

  1. Install Kubernetes
@ecin
ecin / phantomjs_facebook.js
Created April 23, 2012 21:06
Log into Facebook with phantomJS
console.log("got here");
var page = require('webpage').create();
page.onConsoleMessage = function(msg) {
console.log(msg);
};
page.open("http://facebook.com", function(status) {
if ( status === "success" ) {
@josnidhin
josnidhin / terminate_ec2_with_tags.yml
Created August 22, 2016 14:50
The ansible script to find ec2 instances with certain tags and terminate them. Does not uses ec2 dynamic inventory script.
---
- name: Terminate EC2 instances
hosts: localhost
connection: local
gather_facts: no
vars:
aws_region: "eu-west-1"
ec2_tags:
Name: "Test Server"
@tosin2013
tosin2013 / ocp4_vmware_mac_gen.md
Last active May 24, 2022 15:54
mac Generator for openshift deployments on vmware

ETHERNET ADAPTOR HARDWARE ADDRESS REQUIREMENTS
When provisioning VMs for the cluster, the ethernet interfaces configured for each VM must use a MAC address from the VMware Organizationally Unique Identifier (OUI) allocation ranges:

00:05:69:00:00:00 to 00:05:69:FF:FF:FF

00:0c:29:00:00:00 to 00:0c:29:FF:FF:FF

00:1c:14:00:00:00 to 00:1c:14:FF:FF:FF

00:50:56:00:00:00 to 00:50:56:FF:FF:FF

@acsulli
acsulli / disconnected_deep_dive.md
Created December 2, 2021 21:03
This gist represents the files and process used during the Ask an OpenShift Admin livestream from Nov 10th 2021: https://www.youtube.com/watch?v=VkP2PRNanAI.

Mirroring images

This follows the documentation for mirroring images.

  1. Download the images

    • Use dryrun.sh to get the `ImageContentSourcePolicy`` needed for the disconnected cluster.

The values used for the destination registry, which are used for the ICSP, can be arbitrary and changed on the disconnected network to represent your scenario. This is useful if the hostnames / IPs are sensitive.