Skip to content

Instantly share code, notes, and snippets.

@actionjack
actionjack / mcollective-plugins.spec
Created August 4, 2011 15:10 — forked from dcarley/mcollective-plugins.spec
RPM SPEC for bundling up some of the official mcollective plugins.
%define giturl git://github.com/puppetlabs/mcollective-plugins.git
%define gitrev d9305be
%define gituser puppetlabs
%define plugindir %{_libexecdir}/mcollective/mcollective
%define agents puppetd nettest service package filemgr nrpe puppetca puppetral
Name : mcollective-plugins
Version : 0.0.1
Release : 3.%{gitrev}
@actionjack
actionjack / gist:1245003
Created September 27, 2011 13:05 — forked from rantav/gist:626051
mvn snippet to create an rpm for tomcat war
<pluginManagement>
<plugins>
<!--
The RPM plugin is used to create distributable apps from our war file.
To use it fire:
$ mvn install rpm:rpm
...
The resulting rpm is then found at Project/target/rpm/Project/RPMS/noarch/Project-versoin-1.noarch.rpm
For example: ImageServer/target/rpm/ImageServer/RPMS/noarch/ImageServer-6.5.0-1.noarch.rpm
@actionjack
actionjack / gist:2948167
Created June 18, 2012 12:32
Foreman execution expired error
Net::Error
execution expired
lib/net/dns.rb:36:in `lookup'
lib/net/dns.rb:61:in `dns_lookup'
lib/net/dns/a_record.rb:28:in `conflicts'
lib/net.rb:27:in `conflicting?'
app/models/orchestration/dns.rb:125:in `dns_conflict_detected?'
app/models/orchestration.rb:61:in `valid?'
app/controllers/hosts_controller.rb:93:in `create'
@actionjack
actionjack / gist:2953477
Created June 19, 2012 10:43
mcollective error
[root@qiqstanb038avm1 ~]# service mcollective start
Starting mcollective: /usr/lib/ruby/site_ruby/1.8/mcollective/pluginmanager.rb:169:in `load': no such file to load -- mcollective/facts/facter_facts.rb (LoadError)
from /usr/lib/ruby/site_ruby/1.8/mcollective/pluginmanager.rb:169:in `loadclass'
from /usr/lib/ruby/site_ruby/1.8/mcollective/config.rb:127:in `loadconfig'
from /usr/sbin/mcollectived:29
@actionjack
actionjack / gist:2973543
Created June 22, 2012 15:38
updating foreman host's environment with the rest api
command line used: (need to change username and password)
curl -k -u [USERNAME]:[PASSWORD] -X PUT -H "Content-Type:application/json" -H "Accept:application/json" -d '{"host":{"subnet_id":null,"serial":null,"puppetproxy_id":null,"name":"cittavld10.globoi.com","managed":null,"last_report":null,"comment":"","architecture_id":1,"created_at":"2011-10-10T17:46:30Z","sp_mac":"","puppetmaster_name":"puppet-lab.dev.globoi.com","image_file":null,"updated_at":"2012-02-29T14:41:29Z","sp_name":"","mac":"00:16:3e:16:69:b8","installed_at":null,"domain_id":2,"use_image":null,"root_pass":"xybxa6JUkz63w","owner_id":2,"medium_id":null,"id":896,"hostgroup_id":null,"enabled":true,"build":false,"ptable_id":null,"sp_subnet_id":null,"puppet_status":0,"last_freshcheck":null,"ip":"127.0.01","environment_id":2,"source_file_id":null,"model_id":1,"environment":{"environment":{"name":"lab2","id":2}},"sp_ip":"","disk":null,"owner_type":"User","operatingsystem_id":5,"last_compile":"2011-08-21T04:02:27Z"}}' http://localhost:3000/hosts/citta
@actionjack
actionjack / logstash RPM spec
Created August 31, 2012 13:38 — forked from slojo404/logstash RPM spec
logstash monolithic init script and spec file for CentOS / RedHat
Name: logstash
Version: 1.1.0
Release: 1%{?dist}
Summary: logstash is a tool for managing events and logs
Group: System/Logging
License: ASL 2.0
URL: http://logstash.net/
Source0: http://semicomplete.com/files/logstash/logstash-%{version}-monolithic.jar
Source1: logstash
@actionjack
actionjack / tomcat.sh
Created September 20, 2012 14:06 — forked from valotas/tomcat.sh
Tomcat init.d script
#!/bin/bash
#
# tomcat7 This shell script takes care of starting and stopping Tomcat
#
# chkconfig: - 80 20
#
### BEGIN INIT INFO
# Provides: tomcat7
# Required-Start: $network $syslog
# Required-Stop: $network $syslog
@actionjack
actionjack / gist:4059791
Created November 12, 2012 14:44 — forked from faxm0dem/gist:4059786
collectd unquote filter
<Chain PreCache>
<Rule unquote>
<Match regex>
Plugin "^GenericJMX$"
</Match>
<Target replace>
PluginInstance "\"" ""
</Target>
</Rule>
</Chain>
require 'rubygems'
require 'fog'
require 'yaml'
config = YAML::load_file(File.dirname(__FILE__) + '/config.yml')
cf = Fog::AWS::CloudFormation.new(
:aws_access_key_id => config['key'],
:aws_secret_access_key => config['secret']
)

A Continuous Packaging Pipeline

A list of tools mentioned in my Ignite talk from Devopsdays Rome 2012 on a continuous packaging pipeline, with links and short description for each tool.

The talk slides are at https://speakerdeck.com/mpasternacki/a-continuous-packaging-pipeline; a longer blog post will be written soon.

Vendorificator

Available at https://github.com/3ofcoins/vendorificator/ or with gem install vendorificator

Include third party modules in your git repo, using pristine branches to sanely maintain local changes, upgrades, and merges.