Skip to content

Instantly share code, notes, and snippets.

View sa2ajj's full-sized avatar

Mikhail Sobolev sa2ajj

  • Helsinki, Finland
View GitHub Profile
import os
from twisted.application import service
from buildbot.master import BuildMaster
from buildslave.bot import BuildSlave
# setup master
basedir = os.path.abspath(os.path.dirname(__file__))
configfile = 'master.cfg'
diff --git a/master/buildbot/process/botmaster.py b/master/buildbot/process/botmaster.py
index 4f1f348..a5f28f3 100644
--- a/master/buildbot/process/botmaster.py
+++ b/master/buildbot/process/botmaster.py
@@ -317,11 +317,19 @@ class BotMaster(config.ReconfigurableServiceMixin, service.MultiService):
"""
Call this when something suggests that a particular slave may now be
available to start a build.
+ We delay this for 10 seconds, so that if multiple slaves start at the same
+ time, builds will be distributed between them.
class TriggerSample(SimpleTriggerStep):
descriptionSkipped = "nothing configured"
def addRuntimeSchedulerNames(self):
a_list = ...
autoemr = ['triggerable-{}-mergerequest'.format(a) for a in a_list]
return autoemr
def postExecute(self, res):
import logging
import os
from twisted.internet import defer
from buildbot.schedulers.triggerable import Triggerable
from buildbot.status.results import EXCEPTION
from buildbot.status.results import FAILURE
from buildbot.status.results import SKIPPED
from buildbot.status.results import SUCCESS
@t0mk
t0mk / ans_meetup_20141029.md
Last active August 29, 2015 14:08
Ansible Helsinki meetup 2014-10-29

Demo: To launch a few Docker containers on a virtual machine

Why: I want to have some containers running for playing with (..) (running Docker container on a VM is not the most efficient way to go, but for development it's alright)

To start with: vanilla instance of newest Ubuntu 14.04 cloud image

I use OpenStack. You can get one for free on Amazon. Probably also free tier in Rack, Euca ,...

sudo-capable SSH user, with my key in .ssh/authorized_keys

@brainstorm
brainstorm / efika_card_build.sh
Created September 1, 2014 10:10
Buildbot scripts for Efika MX image/release engineering
#!/bin/bash
dcfldd if=/dev/$1 bs=1M count=1800 status=on statusinterval=1 | xz -z -T3 -c -e >$2
@otoolep
otoolep / sine.py
Last active December 20, 2016 01:07
Pump a sine way into a local influxdb cluster
#!/usr/bin/python
import json
import math
import requests
import sys
from time import sleep
DATABASE = 'test1'
STATUS_MOD = 10
#!/bin/sh
#
# Copyright (c) 2012 beavis
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
@tarcieri
tarcieri / semiprivate.md
Last active January 18, 2023 01:08
Ed25519-based semi-private keys

Semiprivate Keys

🚨 DANGER: INSECURE! 🚨

This may have seemed like a great idea in 2013, but the repeated "set/clear bits", a.k.a. clamping phases at each level of the hierarchy slowly subtract key strength.

Don't use this as described. Check out Ristretto.

Original text

Semi-private keys are an expansion of the traditional idea

@gburd
gburd / haproxy.conf
Last active July 5, 2022 13:34
Recommended haproxy settings to balance Riak protobuf and http interfaces (note: WORK IN PROGRESS)
# Documentation for HAProxy
# http://code.google.com/p/haproxy-docs/w/list
# http://haproxy.1wt.eu/download/1.2/doc/architecture.txt
# NOTES:
# open files limits need to be > 256000, use ulimit -n to set (on most POSIX systems)
global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice