Skip to content

Instantly share code, notes, and snippets.

Avatar
🚀
Evolving

Sachin psachin

🚀
Evolving
View GitHub Profile
@psachin
psachin / cfme-rh-sso.yml
Created Jan 8, 2018 — forked from jairojunior/cfme-rh-sso.yml
Playbook to configure CFME login with RH-SSO
View cfme-rh-sso.yml
---
- hosts: all
become: yes
become_user: root
vars:
appliance_file_name: "https_{{ appliance_name }}"
tasks:
- name: SAML configuration dir
@psachin
psachin / ip-slink
Created Jan 5, 2018
ip -s link output
View ip-slink
View miq-all-about-db.org

Environment having 2 standby(1 on same region, other in cross region)

vmdb
rails db

select * from repl_nodes;
  id  |  type   | upstream_node_id |        cluster        |     name     |                      conninfo                      |    slot_name     | priority | active
------+---------+------------------+-----------------------+--------------+----------------------------------------------------+------------------+----------+--------
 3003 | standby |             3002 | miq_region_30_cluster | 10.222.73.24 | host=10.222.71.24 user=root dbname=vmdb_production | repmgr_slot_3003 |      100 | t
 3002 | master  |                  | miq_region_30_cluster | 10.222.73.31 | host=10.222.71.31 user=root dbname=vmdb_production | repmgr_slot_3002 |      100 | t
@psachin
psachin / hotspotd.rules
Created Dec 11, 2017
iptables rules for hotspotd
View hotspotd.rules
# Generated by iptables-save v1.4.20 on Mon Dec 11 21:02:07 2017
# To restore: iptables-restore < hotspotd.rules
*nat
:PREROUTING ACCEPT [373:31754]
:INPUT ACCEPT [96:7870]
:OUTPUT ACCEPT [107:7914]
:POSTROUTING ACCEPT [5:1080]
-A POSTROUTING -o ppp0 -j MASQUERADE
COMMIT
# Completed on Mon Dec 11 21:02:07 2017
@psachin
psachin / 3ctrl_3comp_3swift.yml
Last active Dec 5, 2017
tripleo-quickstart: Dedicated swift nodes
View 3ctrl_3comp_3swift.yml
# Path: tripleo-quickstart/config/nodes/
# Deploy a big HA OpenStack environment(NON-CONTAINERIZED)
# Total memory: (8192 * 9) + 12288 = 86016
control_memory: 8192
compute_memory: 8192
objectstorage_memory: 8192
undercloud_memory: 12288
@psachin
psachin / redeploy.py
Created Nov 14, 2017
[WIP] Redploy stack using OpenStack client APIs
View redeploy.py
import json
import os
from keystoneauth1 import loading
from keystoneauth1 import session
from heatclient import client
loader = loading.get_plugin_loader('password')
auth = loader.load_from_options(auth_url=os.environ.get("OS_AUTH_URL"),
username=os.environ.get("OS_USERNAME"),
password=os.environ.get("OS_PASSWORD"),
@psachin
psachin / gnocchi-s3.org
Last active Nov 15, 2017
Gnocchi with AWS S3 backend(tested on tripleo-quickstart(PIKE))
View gnocchi-s3.org
View emacs_and_stuff.sh
emacs --eval "(load-theme 'manoj-dark)" /etc/gnocchi/gnocchi.conf
@psachin
psachin / wrk_mem.sh
Last active Dec 27, 2017
Check workers with exceeded memory on Red Hat CloudForms
View wrk_mem.sh
# Author: Niladri Roy <niroy@redhat.com>
# Usage:
# 1) without specifing evm.log file
# curl -s https://gist.githubusercontent.com/psachin/36c7e4ff04bdd0a07a64065d0c477eaf/raw | bash -
# 2) specify file name
# curl -s https://gist.githubusercontent.com/psachin/36c7e4ff04bdd0a07a64065d0c477eaf/raw | bash -s evm.log-20171103
if [ -z $1 ];
then
EVM="evm.log"
@psachin
psachin / battery.diff
Created Nov 7, 2017
Making below changes battery status shows correctly
View battery.diff
diff --git a/lisp/battery.el b/lisp/battery.el
index b1834f06ff8d..dd0b8f652426 100644
--- a/lisp/battery.el
+++ b/lisp/battery.el
@@ -58,7 +58,7 @@
((and (eq system-type 'gnu/linux)
(file-directory-p "/proc/acpi/battery"))
#'battery-linux-proc-acpi)
- ((and (eq system-type 'gnu/linux)
+ ((and (or (eq system-type 'gnu/linux) (eq system-type 'gnu))