Skip to content

Instantly share code, notes, and snippets.

@tomkukral
tomkukral / Dockerfile.buildah
Last active April 19, 2022 11:05
Gitlab CI with buildah
FROM fedora
RUN dnf install -y \
buildah \
podman \
make \
&& \
dnf clean all
@tomkukral
tomkukral / list_stacks.py
Created November 1, 2017 13:44
List CloudFormation stacks
#!/usr/bin/env python3
import boto3
from pprint import pprint
session = boto3.Session(profile_name='mi')
client = session.client('cloudformation')
stacks = client.describe_stacks()
for stack in stacks['Stacks']:
@tomkukral
tomkukral / jenkins
Created September 5, 2017 13:24
Jenkins in Kubernetes
apiVersion: apps/v1beta1
kind: Deployment
metadata:
name: jenkins
namespace: jenkins
spec:
replicas: 1
template:
metadata:
labels:
kubectl taint nodes --all node-role.kubernetes.io/master-
@tomkukral
tomkukral / notes.rst
Created April 5, 2017 15:04
Container performance notes

= Performance testing =

Kubernetes scaling SLO * 99% apiserver response under 1s * 99% pods scheduled under 5s (prepull images)

== Process performance ==

Containers vs VMs vx process on host

@tomkukral
tomkukral / cfssl certs
Last active February 27, 2017 15:34
cfssl certs
These certificates (and keys) were never used. They are uses as a referenece for etcd certificate guide.
@tomkukral
tomkukral / fit_c2_ext4
Last active February 10, 2017 10:43
Ceph disks ICT FIT CVUT
-bash-4.2# mount | grep /mnt/floppy
/dev/vdb on /mnt/floppy type ext4 (rw,relatime,seclabel,data=ordered)
-bash-4.2# fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test --bs=4k --iodepth=64 --size=4G --readwrite=randrw --rwmixread=75
test: (g=0): rw=randrw, bs=4K-4K/4K-4K/4K-4K, ioengine=sync, iodepth=64
fio-2.2.8
Starting 1 process
test: Laying out IO file(s) (1 file(s) / 4096MB)
Jobs: 1 (f=1): [m(1)] [100.0% done] [2000KB/594KB/0KB /s] [500/148/0 iops] [eta 00m:00s]
test: (groupid=0, jobs=1): err= 0: pid=2184: Thu Aug 4 10:16:39 2016
read : io=3071.7MB, bw=2065.9KB/s, iops=516, runt=1522573msec
@tomkukral
tomkukral / sync-salt-formula.sh
Last active January 30, 2017 13:04
Test salt fomula on Saltmaster
#!/bin/bash
FORMULA=$1
if [ "$FORMULA" != "" ]; then
rsync -rv --rsync-path "sudo rsync" ~/mi/formulas/${FORMULA}/ saltmaster:/root/salt-formula-${FORMULA}/
fi
@tomkukral
tomkukral / watson2toggl.rb
Last active August 24, 2016 07:50
Watson frames to toggl time entries
#!/usr/bin/env ruby
require 'togglv8'
require 'date'
project = ARGV[0]
token = ARGV[1]
workspace_id = ARGV[2]
date = ARGV[3] || Time.new.strftime("%Y-%m-%d")
# watson commands

Keybase proof

I hereby claim:

  • I am tomkukral on github.
  • I am tomkukral (https://keybase.io/tomkukral) on keybase.
  • I have a public key whose fingerprint is 2730 A7D6 D09C B6D8 8F9E 897F 953A D75A 472D A78A

To claim this, I am signing this object: