Skip to content

Instantly share code, notes, and snippets.

@UrsaDK
UrsaDK / Caching multi-stage builds in GA.md
Last active July 9, 2024 14:34
Speed up your multistage builds in GitHub Actions

Caching multi-stage builds in GitHub Actions

Caching Docker builds in GitHub Actions is an excellent article by @dtinth which analyses various strategies for speeding up builds in GitHub Actions. The upshot of the article is a fairly decisive conclusion that the best two ways to improve build times are:

  1. Build images via a standard docker build command, while using GitHub Packages' Docker registry as a cache = Longer initial build but fastest re-build times.

  2. Build your images via docker integrated BuildKit (DOCKER_BUILDKIT=1 docker build), while using a local registry and actions/cache to persist build caches = Fastest initial build but slightly longer re-build times.

The problem

@DrHayt
DrHayt / cloud-config.yml
Last active January 20, 2021 12:03
CoreOS Container Linux etcd3 cluster cloud-config with SSL on peer, server, and client configs.
#cloud-config
ssh_authorized_keys:
- ssh-rsa PutYourKeysHere
coreos:
locksmith:
endpoint: "https://127.0.0.1:2379"
etcd_cafile: /etc/ssl/certs/ca.pem
etcd_certfile: /etc/ssl/client/client.pem
etcd_keyfile: /etc/ssl/client/client.key
@mumoshu
mumoshu / etcdadm
Last active June 30, 2017 11:45
NOTICE: A successor of this script now exists as `etcdadm` in kube-aws(https://github.com/kubernetes-incubator/kube-aws/)
#!/bin/bash
ETCD_WORK_DIR=${ETCD_WORK_DIR:-$(pwd)/work}
# Usage:
# AWS_DEFAULT_REGION=ap-northeast-1 \
# AWS_ACCESS_KEY_ID=... \
# AWS_SECRET_ACCESS_KEY=... \
# ETCD_VERSION=3.1.2 \
# ETCD_SYSTEMD_UNIT_NAME=etcd-member \
@tjcorr
tjcorr / gist:3baf86051471062b2fb7
Last active August 8, 2021 22:31
CloudFormation to demo etcd-aws-cluster
{
"AWSTemplateFormatVersion": "2010-09-09",
"Description": "An etcd cluster based off an auto scaling group",
"Mappings" : {
"RegionMap" : {
"eu-central-1" : {
"AMI" : "ami-840a0899"
},
"ap-northeast-1" : {
"AMI" : "ami-6c5ac56c"
@abg
abg / snapshot_luks.sh
Created May 7, 2014 16:01
Snapshot an encrypted luks volume backed by LVM
#!/bin/bash
set -x
LUKS_PASSPHRASE="foo"
SNAPSHOT_MOUNTPOINT="/mnt/backup"
MOUNT_OPTIONS="barrier=0" # nouuid for xfs, etc.
# 1) Discover a MySQL datadir
datadir=$(mysql -sse 'select @@datadir')
@gavinhungry
gavinhungry / nginx-tls.conf
Last active July 18, 2024 11:35
Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Name: nginx-tls.conf
# Auth: Gavin Lloyd <gavinhungry@gmail.com>
# Desc: Nginx SSL/TLS configuration for "A+" Qualys SSL Labs rating
#
# Enables HTTP/2, PFS, HSTS and OCSP stapling. Configuration options not related
# to SSL/TLS are not included here.
#
# Additional tips:
#