Skip to content

Instantly share code, notes, and snippets.

View congto's full-sized avatar
🥁
Focusing

Tô Thành Công congto

🥁
Focusing
View GitHub Profile
@congto
congto / ghichep-cachet.md
Last active April 20, 2017 03:02
ghichep-cachet.md
@congto
congto / local_settings.py
Created March 21, 2017 07:18
local_settings.py
# -*- coding: utf-8 -*-
import os
from django.utils.translation import ugettext_lazy as _
from horizon.utils import secret_key
from openstack_dashboard import exceptions
from openstack_dashboard.settings import HORIZON_CONFIG
@congto
congto / ns_IPaddr2_Modify
Last active March 12, 2017 12:23
ns_IPaddr2_Modify
[root@controller1 fuel]# cat ns_IPaddr2
#!/bin/bash
#######################################################################
# Initialization:
: ${OCF_FUNCTIONS_DIR=${OCF_ROOT}/lib/heartbeat}
. ${OCF_FUNCTIONS_DIR}/ocf-shellfuncs
# Defaults
@congto
congto / haproxy.conf
Created March 12, 2017 08:54
haproxy.conf 1.6 for ubuntu 14.04
root@u14-ctl1:~# cat /etc/haproxy/haproxy.cfg
global
log 127.0.0.1 syslog
maxconn 1000
user haproxy
group haproxy
daemon
defaults
log global
@congto
congto / haproxy_corosync_pacemaker_ubuntu.md
Created March 11, 2017 11:26 — forked from Ham5ter/haproxy_corosync_pacemaker_ubuntu.md
Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

This Document roughly describes a HAProxy Cluster Setup on Ubuntu 16.04 based on an example Configuration with 3 Nodes

This Document is still work in Progress the Following Stuff still needs to be done:

  • Explain the crm configure steps
  • explain Miscellaneous CRM Commands for Cluster Management
  • Add all the external ressources used.
  • Add a simple HAProxy Configuration for testing purpouse
@congto
congto / haproxy_corosync_pacemaker_ubuntu.md
Created March 11, 2017 11:26 — forked from Ham5ter/haproxy_corosync_pacemaker_ubuntu.md
Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

Set up HAProxy with Pacemaker/Corosync on Ubuntu 16.04

This Document roughly describes a HAProxy Cluster Setup on Ubuntu 16.04 based on an example Configuration with 3 Nodes

This Document is still work in Progress the Following Stuff still needs to be done:

  • Explain the crm configure steps
  • explain Miscellaneous CRM Commands for Cluster Management
  • Add all the external ressources used.
  • Add a simple HAProxy Configuration for testing purpouse
root@u14-vagrant:~# docker inspect 951bfd6d073f
[
{
"Id": "951bfd6d073fe7502876d9842ebba76c9e2317bb25a5954b23004230491ecb22",
"Created": "2016-11-07T04:56:34.159173974Z",
"Path": "/hello",
"Args": [],
"State": {
"Status": "exited",
"Running": false,
#!/bin/bash
touch /root/congto.txt
apt-get update -y
apt-get install git -y
@congto
congto / cobbler_install-ubuntu_14.04.sh
Last active October 11, 2016 09:58 — forked from luisbolson/cobbler_install-ubuntu_14.04.sh
Shell Script to install Cobbler 2.6 on Ubuntu Server 14.04
#!/bin/bash
#
# Script to deploy a wrking cobbler installation in Ubuntu Server 14.10
# Author: Luis Henrique Bolson <[email protected]>
#
# Based on http://springerpe.github.io/tech/2014/09/09/Installing-Cobbler-2.6.5-on-Ubuntu-14.04-LTS.html
#
# Please run as root (don't use sudo <script>)
#
# curl -s https://raw.githubusercontent.com/luisbolson/cobbler/master/cobbler_install-ubuntu_14.04.sh | bash -s 192.168.56.101
#!/usr/bin/env python
import shlex, subprocess, argparse
from shutil import copyfile
from os import listdir
from time import sleep
# parse command line arguments --------------------------
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()