Skip to content

Instantly share code, notes, and snippets.

Jon Skarpeteig Yuav

  • Norway
Block or report user

Report or block Yuav

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View Jenkins-php-pipeline
pipeline {
agent any
stages {
stage('Prepare') {
steps {
sh 'composer install'
sh 'rm -rf build/api'
sh 'rm -rf build/coverage'
sh 'rm -rf build/logs'
View puppet-monitoring-stages2.pp
refacter { 'monitoring':
patterns => [
'^apache_',
],
}
Service <| title != 'collectd' |> {
before +> Class['monitoring::metrics::collectd'],
notify +> Refacter['monitoring']
}
View puppet-monitoring-stages1.pp
stage { 'last': }
Stage['main'] -> Stage['last']
class { 'apache2': }
class { 'monitoring':
stage => last
}
View puppet-monitoring-factpattern2.pp
node 'www1.example.com' {
include ::apache
include ::monitoring
}
View puppet-monitoring-factpattern1.pp
if ($::apache_statuspage_enabled) {
include ::collectd::plugin::apache
}
View puppet-monitoring-antipattern2.pp
node 'www1.example.com' {
include ::apache
sensu::check { 'apache2':
command => 'check-process.rb --pattern apache2 --warn-under 1'
}
}
View puppet-monitoring-antipattern1.pp
class apache2 {
package { 'apache2': ensure => present }
service { 'apache2:' ensure => running }
sensu::check { 'apache2':
command => 'check-process.rb --pattern apache2 --warn-under 1'
}
}
@Yuav
Yuav / build.xml
Last active Jun 22, 2016
Puppet module testing with acceptance tests in parallel using Apache Ant. Simplifies integration with Jenkins
View build.xml
<?xml version="1.0" encoding="UTF-8"?>
<project name="project" default="build">
<target name="build" depends="clean,bundle-install,syntax,lint">
<antcall target="spec" />
<antcall target="acceptance" />
</target>
<target name="clean">
<delete includeemptydirs="true" removeNotFollowedSymlinks="true" failonerror="false">
View phpmakegoodhack
#!/bin/bash
# MakeGood for PHP stopped working after Eclipse Indigo (3.8) due to inability to run testrunner.php
# This is a hack PHP binary, to be configured as PHP executable for MakeGood to start working in Juno, Kepler and Luna.
# Remove the -n operator to read all config files
options=`echo $@ | sed 's%-n %%' | sed 's%-c .+? %%'`
# Hardcode path to testrunner.php
options=`echo $options | sed 's@open_tag=on [^ ]*@open_tag=on /opt/testrunner.php
View gist:5716947
You can’t perform that action at this time.