View juju-run-split.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import re | |
import pprint | |
import sys | |
import yaml | |
if len(sys.argv) <= 1: | |
print("Usage: juju-split FILE_NAME") |
View ceph_historic_inflight_ops_analyzer.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
require 'pp' | |
require 'json' | |
require 'date' | |
input_fn = ARGV[0] | |
input_file = open(input_fn) | |
j = JSON.parse(input_file.read) | |
ops = {} |
View gist:30ba24de073d45b0979a
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## OnApp template creator Makefile for Ubuntu 14.04 | |
## Creates an OnApp compatible template from the Ubuntu cloud base image | |
## You can run this script continiously to update the image | |
## You will want to customise the timezone and mirror | |
## | |
## Version 0.1 2014-05-07 | |
## Trent Lloyd <trentl@webinabox.net.au> | |
## (1) Create a new directory, e.g. 'template-builder' | |
## (2) Download this file and name it Makefile |
View gist:10790374
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
network_internal: | |
ipaddress: "%{::ipaddress_eth1}" | |
ipaddress6: "%{::ipaddress6_eth1}" | |
network: "%{::network_eth1}" | |
netmask: "%{::netmask_eth1}" | |
prefixlen: "%{::prefixlen_eth1}" | |
netcidr: "%{::netcidr_eth1}" | |
netcidr6: "%{::netcidr6_eth1}" | |
ipcidr: "%{::ipcidr_eth1}" |
View gist:10790228
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'ipaddr' | |
require 'puppet/util/ipcidr' | |
interfaces = Facter.value('interfaces') | |
# If we do not have any interfaces, then there are no requested attributes | |
unless interfaces == :undefined | |
interfaces = interfaces.split(',') | |
interfaces.each do |iface| |