Skip to content

Instantly share code, notes, and snippets.

Dick Davies rasputnik

Block or report user

Report or block rasputnik

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 pytest-cloudbuild.yaml
steps:
- name: python:3.7-alpine
volumes:
- name: virtualenv
path: /testlibs
args: ['pip', 'install', '-t', '/testlibs', '-r', '/workspace/ci-requirements.txt']
- name: python:3.7-alpine
volumes:
- name: virtualenv
path: /testlibs
View gist:3c4a846b5aedcef6ea02
{{ range $index, $app := .Apps }}
listen {{ $app.EscapedId }}_{{ $app.ServicePort }}
bind *:{{ $app.ServicePort }}
mode http
{{ if $app.HealthCheckPath }}
option httpchk GET {{ $app.HealthCheckPath }}
{{ end }}
balance leastconn
capture request header X-Forwarded-For len 15
{{ range $page, $task := .Tasks }}
@rasputnik
rasputnik / site.yml
Created Apr 29, 2015
conditional role loading:
View site.yml
- hosts: frontends
roles:
- { role: bamboo, when: discovery == 'bamboo' }
- { role: mesos-dns, when: discovery == 'mesos-dns' }
@rasputnik
rasputnik / mesos-slave.py
Created Feb 11, 2015
mesos slave collectd plugin (mesos 0.21.x)
View mesos-slave.py
#! /usr/bin/python
# Copyright 2014 Ray Rodriguez
#
# Licensed 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
#
# Unless required by applicable law or agreed to in writing, software
@rasputnik
rasputnik / gist:98aac2f8230a26f06e64
Created Sep 23, 2014
find marathon master using zk CLI tool
View gist:98aac2f8230a26f06e64
Although marathon nodes proxy to the master, that will only happen if they're alive to proxy :)
We've worked around this by using https://github.com/mmcgrana/zk to find the current marathon master from zookeeper and make the request to that. Something like:
export ZOOKEEPER_SERVERS=zk://.......
export MARATHON_ZNODE=/marathon
export LEADER=$MARATHON_ZNODE/leader
# find marathon master (each active master shows here, just grab the last)
@rasputnik
rasputnik / gist:376b9e69426afa0f43bd
Created Jun 20, 2014
apache vhost template for graphite
View gist:376b9e69426afa0f43bd
# <%= @sysadmin_beware %>
# This configuration assumes the default installation prefix
# of /usr/share/graphite/
<% #grab some variables
wsgifile = scope.lookupvar("graphite::settings::wsgipath")
-%>
<IfModule !wsgi_module.c>
LoadModule wsgi_module modules/mod_wsgi.so
</IfModule>
@rasputnik
rasputnik / gist:155aa11277147178fe8f
Created Jun 12, 2014
marathon 0.5.1 Dockerfile
View gist:155aa11277147178fe8f
# run marathon 0.5.1 against mesos 0.18.2
#
# docker build -t 'your/marathon051' <directory-holding-this-file>
#
# then run with:
# docker run -name marathon -d your/marathon051 ..... command line args ....
#
# logs via : docker logs -f marathon
FROM centos
View gist:8558364
production:
adapter: mysql2
database: {{DB_NAME}}
host: {{DB_HOST}}
username: {{DB_USER}}
password: {{DB_PASS}}
pool: {{DB_POOL}}
You can’t perform that action at this time.