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 / 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 / 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 / fix-wordpress-permissions.sh
Created November 25, 2018 05:28 — forked from Adirael/fix-wordpress-permissions.sh
Fix wordpress file permissions
#!/bin/bash
#
# This script configures WordPress file permissions based on recommendations
# from http://codex.wordpress.org/Hardening_WordPress#File_permissions
#
# Author: Michael Conigliaro <mike [at] conigliaro [dot] org>
#
WP_OWNER=www-data # <-- wordpress owner
WP_GROUP=www-data # <-- wordpress group
WP_ROOT=$1 # <-- wordpress root directory
@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"
@kenmoini
kenmoini / terminate_ec2_with_tags.yml
Created August 21, 2018 17:01 — forked from josnidhin/terminate_ec2_with_tags.yml
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"
@kenmoini
kenmoini / pdaemon-sample.py
Created August 14, 2018 05:27 — forked from thatsdone/pdaemon-sample.py
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 / xml_rpc_client.py
Created August 14, 2018 05:23 — forked from amitsaha/xml_rpc_client.py
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
source kops
export BUCKET_NAME=devops23-$(date +%s)
export KOPS_STATE_STORE=s3://$BUCKET_NAME
aws s3api create-bucket \
--bucket $BUCKET_NAME \
--create-bucket-configuration \
LocationConstraint=$AWS_DEFAULT_REGION
@kenmoini
kenmoini / OpenShift Workshop
Created May 30, 2018 18:31 — forked from epe105/OpenShift Workshop
OpenShift Workshop
[Gist Page]
info.redhatgov.io
[Lab Guide]
http://redhatgov.io/workshops/openshift_101_dcmetromap/
[OpenShift Console]
https://master.ocp-naps.redhatgov.io:8443/console
[Terminal]
@kenmoini
kenmoini / ansible-summary.md
Created May 17, 2018 21:49 — forked from andreicristianpetcu/ansible-summary.md
This is an ANSIBLE Cheat Sheet from Jon Warbrick

An Ansible summary

Jon Warbrick, July 2014, V3.2 (for Ansible 1.7)

Configuration file

intro_configuration.html

First one found from of