Skip to content

Instantly share code, notes, and snippets.

View coolpalani's full-sized avatar

coolpalani

View GitHub Profile
@coolpalani
coolpalani / inventory.conf
Created September 11, 2017 17:55 — forked from dougbtv/inventory.conf
sample openshift-ansible inventory for ASB failure
openshift-master ansible_host=192.168.1.122
openshift-minion-1 ansible_host=192.168.1.138
openshift-minion-2 ansible_host=192.168.1.82
[OSEv3:children]
masters
nodes
etcd
# lb
# nfs
@coolpalani
coolpalani / inventory-with-gluster.conf
Created September 11, 2017 17:55 — forked from dougbtv/inventory-with-gluster.conf
sample openshift-ansible with gluster inventory
openshift-master ansible_host=192.168.1.92
openshift-minion-1 ansible_host=192.168.1.238
openshift-minion-2 ansible_host=192.168.1.187
[OSEv3:children]
masters
nodes
etcd
# lb
# nfs
@coolpalani
coolpalani / psql-replication.yml
Created September 11, 2017 17:55 — forked from linuxsimba/psql-replication.yml
modified psql replication script from sam doran's role. Works with Tower 3.0.3 and RHEL 6.
- name: Configure PostgreSQL streaming replication
hosts: database_slave
pre_tasks:
- name: Remove recovery.conf
file:
path: /var/lib/pgsql/9.4/data/recovery.conf
state: absent
- name: Add slave to database group
@coolpalani
coolpalani / hasetup.yml
Created September 11, 2017 17:56 — forked from phips/hasetup.yml
Tower HA pre-run
---
# vim: set ft=ansible sw=2 ts=2 et:
#
# Prepare for Tower HA install
#
#* Download offline bundle
#* Unarchive offline bundle on ALL hosts
#* do ./bundle_setup.sh on ALL hosts
#* do pre-dependency installs [yum install -y $(cat required_os_packages.txt)] on PRIMARY host
#
@coolpalani
coolpalani / add_aws_provider.rb
Created September 11, 2017 18:00 — forked from tsailiming/add_aws_provider.rb
Sample code to add AWS provider in a service catalog in CloudForms
require 'rest-client'
require 'json'
servername = 'cf'
username = 'admin'
password = 'smartvm'
url = "https://#{servername}/api/providers"
post_params = {
@coolpalani
coolpalani / my.cnf
Created October 31, 2017 17:40 — forked from fevangelou/my.cnf
Optimized MySQL configuration for cPanel servers (updated July 2017)
# Optimized MySQL configuration for cPanel servers by Fotis Evangelou - Updated July 2017
#
# The settings provided below are a starting point for a 4GB - 8GB RAM server with 4 CPU cores.
# If you have less or more resources available you should adjust accordingly to save CPU,
# RAM and disk I/O usage.
# The settings marked with a specific comment or the word "UPD" after the value
# should be adjusted for your system by using MySQL DB diagnostics tools like:
# http://mysqltuner.com/
# or
# https://launchpad.net/mysql-tuning-primer (supports MySQL up to v5.6)
@coolpalani
coolpalani / kubeadm.md
Created November 29, 2017 11:23 — forked from jamesbuckett/kubeadm.md
kubeadm

01 - Deploy a Kubernetes cluster and Microservices Application

Deploy a Kubernetes cluster on Digital Ocean

Deploy the Socks Shop Microservices Application

Wednesday 26/07/2017

tl;dr - Kubernetes is a container orchestration engine.

tl;dr - Microservices are software components that are independently deployable and scalable.

Kubeadm Documentation : https://kubernetes.io/docs/getting-started-guides/kubeadm/

@coolpalani
coolpalani / setup-ip.yml
Created November 29, 2017 18:37 — forked from glennswest/setup-ip.yml
Ansible automatically create /etc/hosts file for all host - to give nice short names using dnsmasq
---
- hosts: all
tasks: []
- hosts: all
gather_facts: True
tasks:
- name: check connection
ping:
- name: setup
setup:
@coolpalani
coolpalani / vagrant-kvm.md
Created January 26, 2018 11:46 — forked from yuanying/vagrant-kvm.md
How to use vagrant-kvm

Install Vagrant

sudo su
apt-get update && apt-get install -y libvirt-dev ruby-all-dev apparmor-utils
curl -O -L https://dl.bintray.com/mitchellh/vagrant/vagrant_1.6.5_x86_64.deb
dpkg -i vagrant_1.6.5_x86_64.deb 
aa-complain /usr/lib/libvirt/virt-aa-helper # workaround
exit

Install vagrant-kvm as user

@coolpalani
coolpalani / docker-destroy-all.sh
Created February 21, 2018 15:53 — forked from JeffBelback/docker-destroy-all.sh
Destroy all Docker Containers and Images
#!/bin/bash
# Stop all containers
docker stop $(docker ps -a -q)
# Delete all containers
docker rm $(docker ps -a -q)
# Delete all images
docker rmi $(docker images -q)