Skip to content

Instantly share code, notes, and snippets.

Avatar
👨‍🏭

Gonéri Le Bouder goneri

👨‍🏭
View GitHub Profile
@goneri
goneri / gist:713620
Created Nov 24, 2010
fusioninventory.json
View gist:713620
{
"QUERY" : "INVENTORY",
"DEVICEID" : "aofr08093-2010-09-17-23-20-34",
"CONTENT" : {
"PROCESSES" : [
{
"VIRTUALMEMORY" : "2080",
"PID" : "1",
"CPUUSAGE" : "0.0",
"CMD" : "init [2]",
@goneri
goneri / gist:6638262
Last active Feb 8, 2016
A light wrapper around GLPI webservice.
View gist:6638262
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import xmlrpclib
class GLPI:
def __init__(self, url=None, login=None, password=None):
"""
View keybase.md

Keybase proof

I hereby claim:

  • I am goneri on github.
  • I am goneri (https://keybase.io/goneri) on keybase.
  • I have a public key whose fingerprint is 1FF3 68E8 0199 1373 1705 B8AF 049E D9B9 4765 572E

To claim this, I am signing this object:

@goneri
goneri / create RHEL deploy-ramdisk-ironic.tar
Last active Jan 3, 2016
Create deploy-ramdisk-ironic RAM disk
View create RHEL deploy-ramdisk-ironic.tar
env DIB_LOCAL_IMAGE=/home/goneri/Downloads/rhel-guest-image-7.2-20151102.0.x86_64.qcow2 ./bin/ramdisk-image-create -o deploy.ramdisk --ramdisk-element dracut-ramdisk ironic-agent rhel7
mv deploy.ramdisk.vmlinuz deploy-ramdisk-ironic.kernel
mv deploy.ramdisk.initramfs deploy-ramdisk-ironic.initramfs
tar cfv deploy-ramdisk-ironic.tar deploy-ramdisk-ironic.initramfs deploy-ramdisk-ironic.kernel
View export_for_khaleesi.py
import os
import subprocess
from osp_deployer.config import Settings
from auto_common import Ssh
from auto_common import Scp
from jinja2 import Template
from novaclient import client as novaclient
View gist:6c5c0fd8c16114955104
#!/usr/bin/env python
#-*- coding:utf-8 -*-
import xmlrpclib
class GLPI:
def __init__(self, url=None, login=None, password=None):
"""
@goneri
goneri / prepare_rhel.sh
Last active Feb 23, 2018
Prepare RHEL
View prepare_rhel.sh
subscription-manager register
pool_id=$(subscription-manager list --available --matches 'Instructor SKU for Red Hat Training product downloads' --pool-only|head -n1)
subscription-manager attach --pool ${pool_id}
subscription-manager repos '--disable=*' --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enable=rhel-7-server-extras-rpms --enable=rhel-7-server-openstack-10-rpms
yum install -y tmux vim
View sosreport.sh
#!/bin/bash
source stackrc
ip_address_list=$(nova list|sed -n 's,.*ctlplane=\([0-9.]\+\).*,\1,p')
for ip in ${ip_address_list}; do
ssh -o stricthostkeychecking=no heat-admin@${ip} sudo sosreport --batch -p system,virt,openstack,network,kernel,services,storage,security
ssh -o stricthostkeychecking=no heat-admin@${ip} "sudo find /var/tmp -name 'sosreport-*' -exec chmod 664 {} \;"
scp -o stricthostkeychecking=no heat-admin@${ip}:/var/tmp/sosreport-* /var/tmp
done
sudo sosreport --batch
View gist:d0722d48dae8806071a7d327ce4bbccb
subscription-manager repos '--disable=*' --enable=rhel-server-rhscl-7-rpms --enable=rhel-7-server-rpms --enable=rhel-7-server-optional-rpms --enab│··········································································
le=rhel-7-server-extras-rpms
yum install -y rh-python34
@goneri
goneri / run
Last active May 18, 2016
run rally on a fresh OSP8 installation
View run
sudo yum install -y openstack-rally
source ~/overcloudrc
mkdir ~/.rally
git clone http://github.com/redhat-openstack/rally-plugins.git ~/.rally/plugins
curl http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.raw.tar.gz|tar xfz -
glance image-create --name "CentOS-7-x86_64-GenericCloud" --disk-format qcow2 --container-format bare --is-public True --progress < CentOS-7-x86_64-GenericCloud-*.raw
curl http://download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-uec.tar.gz | tar zfxv -