Skip to content

Instantly share code, notes, and snippets.

#!/bin/bash
NAME="qemu-kvm"
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
RPMBUILD_OPTS="--define '_topdir ${DIR}' --define 'dist .el6_5' --define 'rhel 6'"
# Default variables that have command line flags
QUIET=0
DEBUG=0
TRACE=0
#PBS -l walltime=02:00:00
#PBS -q academy
#PBS -j oe
[ -z "$MODE" ] && MODE="all"
[ -z "$BTL" ] && MPIRUN_MCA_ARGS="" || MPIRUN_MCA_ARGS="-mca btl ${BTL},self"
MDTEST_ROOT="${HOME}/mdtest"
MDTEST_TEST_DIR="/fdata/scratch/${USER}/mdtest"
-- -*- lua -*-
-- vim:ft=lua:et:ts=4
require("sandbox")
require("strict")
local Dbg = require("Dbg")
local dbg = Dbg:dbg()
local unpack = unpack or table.unpack
local hook = require("Hook")
@treydock
treydock / node.rb
Created July 13, 2014 06:10
node.rb that uses PuppetDB
#!/usr/bin/env ruby
# If copying this template by hand, replace the settings below including the angle brackets
SETTINGS = {
:url => "https://foreman", # e.g. https://foreman.example.com
:puppetdir => "/var/lib/puppet", # e.g. /var/lib/puppet
:puppetuser => "puppet", # e.g. puppet
:facts => true, # true/false to upload facts
:timeout => 10,
:threads => nil,
@treydock
treydock / job_submit.lua
Last active March 5, 2024 17:54
SLURM job_submit lua script
--[[
SLURM job submit filter for QOS
Some code and ideas pulled from https://github.com/edf-hpc/slurm-llnl-misc-plugins/blob/master/job_submit.lua
--]]
--########################################################################--
--
@treydock
treydock / ovirt_node_regster.sh
Last active August 29, 2015 14:05
oVirt node registration using Host Deploy Protocol
#!/bin/bash
# Uses oVirt Host Deploy Protocol - http://www.ovirt.org/Features/HostDeployProtocol
# Define variables
engine="<CHANGEME ENGINE FQDN>"
address="<CHANGEME IPADDRESS>" # Could use `facter ipaddress`
sshPort=22
sshKeyFingerprint=$(ssh-keygen -lf /etc/ssh/ssh_host_rsa_key | awk -F' ' '{ print $2 }') # Facter does not yet have this fact
sshUser="root"
@treydock
treydock / SitePackage.lua
Created August 22, 2014 22:34
Lmod SitePackage.lua
-- -*- lua -*-
-- vim:ft=lua:et:ts=4
require("sandbox")
require("strict")
local Dbg = require("Dbg")
local dbg = Dbg:dbg()
local unpack = unpack or table.unpack
local hook = require("Hook")
@treydock
treydock / build.sh
Created September 12, 2014 18:39
SLURM build script
#!/bin/bash
RPMBUILD_OPTS="--define '_without_aix 1' \
--define '_with_blcr 1' \
--define '_with_lua 1' \
--define '_without_postgres 1' \
--define '_without_sgijob 1' \
--define '_with_pam 1' \
--define '_with_readline 1' \
--define '_with_mysql 1' \
@treydock
treydock / local_hierarchical_mns.py
Created September 14, 2014 17:37
LocalHierarchicalMNS
##
# Copyright 2013-2014 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://www.herculesstichting.be/in_English)
# and the Department of Economy, Science and Innovation (EWI) (http://www.ewi-vlaanderen.be/en).
#
@treydock
treydock / 00-extract.sh
Last active August 29, 2015 14:07
Kickstart install PerfSONAR
# Steps to extract the contents of perfSONAR NetInstall ISO
# Download ISO and MD5 checksum
wget http://software.internet2.edu/pS-Performance_Toolkit/pS-Performance_Toolkit-3.4-NetInstall-x86_64.iso
wget http://software.internet2.edu/pS-Performance_Toolkit/pS-Performance_Toolkit-3.4-NetInstall-x86_64.iso.md5
md5sum -c pS-Performance_Toolkit-3.4-NetInstall-x86_64.iso.md5
# Mount ISO
mkdir /mnt/perfsonar
sudo mount -o loop pS-Performance_Toolkit-3.4-NetInstall-x86_64.iso /mnt/perfsonar