Skip to content

Instantly share code, notes, and snippets.

View tpiperatgod's full-sized avatar

Tian Fang tpiperatgod

View GitHub Profile
@tpiperatgod
tpiperatgod / ceilometer.conf.sample
Created November 5, 2013 13:18
a sample of ceilometer.conf (@ceilometer-2013.1.4)
##########################
# ceilometer.conf sample #
##########################
[DEFAULT]
######## defined in ceilometer.counter ########
# Source for counters emited on this instance (string value)
counter_source=openstack
@tpiperatgod
tpiperatgod / openstac-ceilometer-collector
Created November 5, 2013 13:22
openstac-ceilometer-collector
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=collector
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
@tpiperatgod
tpiperatgod / openstack-ceilometer-api
Created November 5, 2013 13:23
openstack-ceilometer-api
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=api
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
@tpiperatgod
tpiperatgod / openstack-ceilometer-agent-central
Created November 5, 2013 13:24
openstack-ceilometer-agent-central
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=agent-central
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
@tpiperatgod
tpiperatgod / openstack-ceilometer-agent-compute
Last active September 2, 2019 08:09
openstack-ceilometer-agent-compute
#!/bin/sh
. /etc/rc.d/init.d/functions
suffix=agent-compute
prog=openstack-ceilometer-$suffix
exec="/usr/bin/ceilometer-$suffix"
config="/etc/ceilometer/ceilometer.conf"
pidfile="/var/run/ceilometer/ceilometer-$suffix.pid"
logfile="/var/log/ceilometer/ceilometer-$suffix.log"
@tpiperatgod
tpiperatgod / keystone_data.sh
Created December 20, 2013 13:57
keystone data import shell
#!/bin/sh
#
# Keystone basic configuration
# Mainly inspired by https://github.com/openstack/keystone/blob/master/tools/sample_data.sh
# Modified by Bilel Msekni / Institut Telecom
#
# Support: openstack@lists.launchpad.net
# License: Apache Software License (ASL) 2.0
#!/usr/bin/python
# -*- coding: utf-8 -*-
import subprocess
TMP_INSTANCE_UUID = ''
NETWORK_ID = ''
IMAGE_ID = ''
FLAVOR_ID = ''
DEST_HOST = ''
@tpiperatgod
tpiperatgod / W3GFileHandler.py
Created April 16, 2014 06:52
war3 rep file handler
#!/usr/bin/env python
# *-*coding:utf-8*-*
import os
import zlib
import binascii
class W3GFileHandler(object):
def __init__(self, file):
[general]
# Path to a Public key to install on servers. If a usable key has not
# been installed on the remote servers the user will be prompted for a
# password and this key will be installed so the password will not be
# required again
CONFIG_SSH_KEY=/root/.ssh/id_rsa.pub
# Set to 'y' if you would like Packstack to install MySQL
CONFIG_MYSQL_INSTALL=y
@tpiperatgod
tpiperatgod / string.go
Last active May 3, 2021 02:03
Change '{}' to '[]' for handle JSONB in lib/pg/array.go
package slices
import (
"bytes"
"database/sql/driver"
"encoding/csv"
"encoding/json"
"fmt"
"io"
"strings"