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 / 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

@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]
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 / 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
@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 / 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 / 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 / sync_all_repos.sh
Created September 29, 2018 19:39
Sync all Satellite Repos via hammer CLI
#!/bin/bash
#Syncs all the repos for a given organization-id
SAT_ORG_ID=1
while read f line; do
for X in $line
do
hammer repository synchronize --async --organization-id 1 --id $X
done
@kenmoini
kenmoini / kemo-ose.repo.example
Created October 12, 2018 00:57
Disconnected DevSecOps with Red Hat OpenShift Container Platform - Repo Host config
[rhel-7-server-rpms]
name=rhel-7-server-rpms
baseurl=http://SERVER_IP_HERE/repos/rhel-7-server-rpms
enabled=1
gpgcheck=0
[rhel-7-server-extras-rpms]
name=rhel-7-server-extras-rpms
baseurl=http://SERVER_IP_HERE/repos/rhel-7-server-extras-rpms
enabled=1
@kenmoini
kenmoini / 1_dmz-provisioner.sh
Last active October 12, 2018 21:15
Disconnected DevSecOps with Red Hat OpenShift Container Platform
#!/bin/bash
LOCAL_REPO_PATH="/opt/repos"
# This script enables the needed RHEL, OpenShift, Gluster, Ansible, HA, and additional repos needed to mirror them locally.
# The locally created mirror can then be used to deploy OCP into a disconnected environment.
#===== PRE-RUN NOTES:
# This assumes you've already registered and subscribed to the needed OpenShift, Gluster, Ansible, and RHEL subscriptions.