Skip to content

Instantly share code, notes, and snippets.

@johnrengelman
johnrengelman / frigga.txt
Last active September 9, 2022 14:29
Netflix Frigga Naming Schema
ASG name = frigga.group = app-stack-detail(-options)-push
frigga.cluster = app-stack-detail
frigga.push = v<sequence)
options:
- c0<value> = countries
- d0<value = devPhase
- h0<value> = hardware
@johnrengelman
johnrengelman / InfluxDBMetricsModules.java
Created September 22, 2016 18:48
InfluxDB Reporter module for Ratpack
package com.peoplenet.common.ratpack.metrics
import com.codahale.metrics.MetricRegistry
import com.google.inject.Inject
import com.google.inject.Provides
import com.izettle.metrics.influxdb.InfluxDbHttpSender
import com.izettle.metrics.influxdb.InfluxDbSender
import com.izettle.metrics.influxdb.InfluxDbTcpSender
import com.izettle.metrics.influxdb.InfluxDbUdpSender
import com.peoplenet.common.ratpack.config.Application
@johnrengelman
johnrengelman / document.json
Created July 7, 2016 19:42
Upgrade Rancher Cluster with Amazon EC2 Run Command
{
"schemaVersion":"1.2",
"description":"Upgrade Rancher cluster to specified version",
"parameters":{
"version":{
"type":"String",
"description":"(Required) The version to upgrade to.",
"maxChars":4096
}
},
node {
// Mark the code checkout 'Checkout'....
stage 'Checkout'
// // Get some code from a GitHub repository
git url: '[email protected]:myorg/infrastructure.git'
// Get the Terraform tool.
def tfHome = tool name: 'Terraform', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool'
@johnrengelman
johnrengelman / ShadowJar.java
Created May 20, 2016 18:22
Gradle 2.14-rc-1 Shadow issue
public class ShadowJar extends CopySpec {
public <T extends Transformer> ShadowSpec transform(Class<T> clazz) throws InstantiationException, IllegalAccessException {
//..
}
public <T extends Transformer> ShadowSpec transform(Class<T> clazz, Action<T> configure) throws InstantiationException, IllegalAccessException {
//..
}
}
@johnrengelman
johnrengelman / docker-compose.yml
Created May 9, 2016 15:56
Consul-Rancher stack
consul-registrator:
log_driver: ''
labels:
io.rancher.sidekicks: consul,consul-data
io.rancher.scheduler.global: 'true'
io.rancher.container.pull_image: always
io.rancher.container.hostname_override: container_name
tty: true
restart: always
command:
@johnrengelman
johnrengelman / build.gradle
Created April 8, 2015 13:57
Self applying Gradle plugin project
//place this content in your buildSrc/build.gradle file
//Then apply your plugin to its own build in build.gradle
import org.codehaus.groovy.control.CompilerConfiguration
apply plugin: 'groovy'
repositories {
jcenter()
}
@johnrengelman
johnrengelman / README.md
Created January 8, 2015 18:54
Monit Install
@johnrengelman
johnrengelman / build.gradle
Created December 29, 2014 17:37
Injected Gradle Task
class MyTask extends DefaultTask {
@Inject
FileResolver fileResolver
@TaskAction
public void action() {
//...
}
}
package foo
class Bar {
String name
}