Skip to content

Instantly share code, notes, and snippets.

View fatmcgav's full-sized avatar

Gavin Williams fatmcgav

View GitHub Profile
@fatmcgav
fatmcgav / netapp_export.rb
Last active August 29, 2015 14:02
Undefined method stack
1 require 'puppet/provider/netapp'
2
3 Puppet::Type.type(:netapp_export).provide(:netapp_export, :parent => Puppet::Provider::Netapp) do
4 @doc = "Manage Netapp export creation, modification and deletion."
5
6 confine :feature => :posix
7 #defaultfor :feature => :posix
8
9 # Restrict to 7Mode
10 confine :false => begin
@fatmcgav
fatmcgav / Vagrantfile
Last active August 29, 2015 14:02
etcd cluster dev env
# -*- mode: ruby -*-
# vi: set ft=ruby :
#Get hostname
hostname = Socket.gethostname.downcase!
Vagrant.configure("2") do |config|
# Server hash
etcd_servers = { "etcd-node1.#{hostname}.local" => '192.168.250.20',
@fatmcgav
fatmcgav / node1
Created June 24, 2014 08:00
etcd-logs
[etcd] Jun 23 14:57:58.212 INFO | Discovery via http://discovery.dt0388.local:4001 using prefix etcd-devel-cluster.
[etcd] Jun 23 14:57:58.216 INFO | Discovery _state was empty, so this machine is the initial leader.
[etcd] Jun 23 14:57:58.216 INFO | Discovery fetched back peer list: []
[etcd] Jun 23 14:57:58.216 INFO | etcd-node1.dt0388.local is starting a new cluster
[etcd] Jun 23 14:57:58.217 INFO | etcd server [name etcd-node1.dt0388.local, listen on :4001, advertised url http:/ /etcd-node1.dt0388.local:4001]
[etcd] Jun 23 14:57:58.218 INFO | peer server [name etcd-node1.dt0388.local, listen on :7001, advertised url http:/ /etcd-node1.dt0388.local:7001]
[etcd] Jun 23 14:57:58.218 INFO | etcd-node1.dt0388.local starting in peer mode
[etcd] Jun 23 14:57:58.218 INFO | etcd-node1.dt0388.local: state changed from 'initialized' to 'follower'.
[etcd] Jun 23 14:57:58.218 INFO | etcd-node1.dt038
@fatmcgav
fatmcgav / prefetch-provider-run.log
Created June 27, 2014 11:12
Prefetch provider logs
[vagrant@karaf ~]$ sudo puppet apply -e "karaf_feature{'wrapper': ensure => present}" -vd --trace
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/pe_version.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
Info: Loading facts in /etc/puppet/modules/stdlib/lib/facter/root_home.rb
Debug: Loaded Puppet::Provider::Karaf
Notice: Compiled catalog for karaf.dt0388.test in environment production in 0.05 seconds
Debug: Creating default schedules
Debug: Puppet::Type::User::ProviderPw: file pw does not exist
Debug: Puppet::Type::User::ProviderDirectoryservice: file /usr/bin/dsimport does not exist
@fatmcgav
fatmcgav / librarian-puppet log
Created July 4, 2014 14:17
LIbrarian Puppet log
[gavinw@puppet librarian-test]$ librarian-puppet clean
[gavinw@puppet librarian-test]$ librarian-puppet version
librarian-puppet v1.1.2
[gavinw@puppet librarian-test]$ librarian-puppet install --verbose
[Librarian] Ruby Version: 1.9.3
[Librarian] Ruby Platform: x86_64-linux
[Librarian] Rubygems Version: 2.2.2
[Librarian] Librarian Version: 0.1.2
[Librarian] Librarian Adapter: puppet
[Librarian] Librarian Adapter Version: 1.1.2
@fatmcgav
fatmcgav / jre.properties
Created July 14, 2014 12:39
Karaf config files that need managing
################################################################################
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
@fatmcgav
fatmcgav / augparse log
Last active August 29, 2015 14:03
Augeas lense example
augeas-test]$ augparse -I. tests/test_jreproperties.aug
tests/test_jreproperties.aug:33.0-53.35:exception thrown in test
tests/test_jreproperties.aug:33.5-.31:exception: Iterated lens matched less than it should
Lens: ./jreproperties.aug:30.12-.39:
Error encountered at 27:0 (1131 characters into string)
<with a mandatory attribute\n\n|=|jre-16\njre-17\n>
Tree generated so far:
/#comment[1] = "##############################################################################"
/(none)[1]
@fatmcgav
fatmcgav / config-file
Created July 15, 2014 15:40
Apache karaf config file
----------------------------------------------------------------
Pid: app.post.ncr
BundleLocation: mvn:app.post/NCR-Etcd/1.0-SNAPSHOT
Properties:
felix.fileinstall.filename = file:/opt/apache-karaf-3.0.1/etc/app.post.ncr.cfg
service.pid = app.post.ncr
app.post.ncr.etcd.etcdUrl = http://localhost:4001
app.post.ncr.utils.rackUrlPath = /cxf/ncr/v1
app.post.ncr.utils.rackUrlPort = 8181
app.post.ncr.utils.rackUrlProtocol = http
@fatmcgav
fatmcgav / grok-test.rb
Created July 31, 2014 09:38
Grok pattern example
require 'rubygems'
require 'grok-pure'
require 'awesome_print'
grok = Grok.new
#grok.add_patterns_from_file("/home/logstash/patterns/bigip-f5.patterns")
grok.add_patterns_from_file("/home/logstash/patterns/payload.patterns")
grok.add_patterns_from_file("/opt/logstash/patterns/grok-patterns")
@fatmcgav
fatmcgav / grok-test.rb
Created July 31, 2014 16:35
Grok pattern match
#!/usr/bin/env ruby
#
require 'rubygems'
require 'grok-pure'
require 'awesome_print'
grok = Grok.new
grok.add_patterns_from_file("/home/logstash/patterns/payload.patterns")