Skip to content

Instantly share code, notes, and snippets.

View robbat2's full-sized avatar

Robin H. Johnson robbat2

View GitHub Profile
@robbat2
robbat2 / CEPH-STATICSITES-HOWTO.md
Last active April 14, 2025 08:57
Ceph staticsites config RGW static website serving & SNI

Ceph StaticSites Configuration, with HAProxy & SNI

An instructional document by Robin H Johnson robin.johnson@dreamhost.com. I wrote much of the staticsites functionality of Ceph-RGW, during during late 2015 and early 2016, based on an early prototype by Yehuda Sadeh (yehudasa). It was written for usage at Dreamhost, but developed in the open for community improvement.

It is fully functional as of Jewel v10.2.3 plus PR11280 (ceph/ceph#11280). Prior to that, neither the non-CNAME nor CNAME-to-service modes will function correctly.

These configuration files represent how to quickly set up RGW+HAProxy for staticsite serving. I've tried to make them more readable, without leaving out too many details. You are strongly recommended to run a seperate RGW instance for staticsites, on a DIFFERENT outward-faciing IP than your normal instance (and in fact, certain functionality is not supported without it).

In place of using HAProxy, you could run the second rgw instance on port 80,

@robbat2
robbat2 / boto_override_connection.py
Created October 26, 2016 23:55
Using Boto S3 with overriding the actual connection endpoint, but not the apparent hostname.
# This how you can control where boto/requests are actually connecting to,
# while not otherwise mucking with ANY of the HTTP headers, which could invalidate AWS signatures
# The only DNS lookup that should be triggered by this is from the PATCH_new_conn function.
# No other DNS lookups should occur.
#
# For example, this allows you to configure a Ceph RGW instance to respond to the AWS hostname s3.amazonaws.com,
# and then test it, without any modification of your local DNS.
#
# Copyright Robin Johnson 2016 <robin.johnson@dreamhost.com>
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9f85725..07dd0fa 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,11 @@
+## unreleased
+
+Bugfixes:
+
+ - (POTENTIALLY BREAKING CHANGE) peer-group membership needs to be applied to
@robbat2
robbat2 / gist:69a43d3a48fa1474012ffcd150dd38ca
Created September 20, 2017 21:04
app-crypt/pinentry-1.0.0-r2 changes
--- pinentry-1.0.0-r1.ebuild 2017-09-20 13:58:27.939381419 -0700
+++ pinentry-1.0.0-r2.ebuild 2017-09-20 14:03:05.987903619 -0700
@@ -3,7 +3,7 @@
EAPI=6
-inherit autotools flag-o-matic qmake-utils toolchain-funcs
+inherit autotools eutils flag-o-matic qmake-utils toolchain-funcs
DESCRIPTION="Simple passphrase entry dialogs which utilize the Assuan protocol"
@robbat2
robbat2 / meson-optional.patch
Created October 4, 2017 19:09
meson-optional.patch
commit 7303912472360f48d80800a4adfda64a72b9935e
Author: Robin H. Johnson <robbat2@gentoo.org>
Date: Wed Oct 4 12:03:18 2017 -0700
eclass: MESON_AUTO_DEPEND support
Make it possible to use the meson eclass without it automatically adding
meson to DEPEND. Intended for cases where meson usage is conditional
(e.g. hidden behind a USE flag).
@robbat2
robbat2 / foo.procmailrc
Created October 9, 2017 17:42
procmailrc for format conversion
# Convert old-style inline PGP messages to MIME
:0
* !^Content-Type: message/
* !^Content-Type: multipart/
* !^Content-Type: application/pgp
{
:0 fBw
* ^-----BEGIN PGP MESSAGE-----
* ^-----END PGP MESSAGE-----
| formail \
@robbat2
robbat2 / lspci.txt
Created October 18, 2017 16:47
lspci of Amfeltec PCIe Carrier board for 2 M.2 SSD modules & 2x Samsung 960 Pro
lspci of Amfeltec SKU-086-32 SQUID PCIe Carrier Board for 2 M.2 SSD modules (M.2 key M)
http://amfeltec.com/products/pci-express-gen-3-carrier-board-for-2-m-2-ssd-modules/
The Amteltec shows up as 3 PCIe devices
brief:
04:00.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8718 16-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8718] (rev ab)
05:01.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8718 16-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8718] (rev ab)
05:02.0 PCI bridge [0604]: PLX Technology, Inc. PEX 8718 16-Lane, 5-Port PCI Express Gen 3 (8.0 GT/s) Switch [10b5:8718] (rev ab)
06:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 [144d:a804]
07:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM961/PM961 [144d:a804]
@robbat2
robbat2 / manuale-renew.sh
Created December 1, 2017 00:43
manuale-renew.sh
#!/bin/bash
# # ManuaLE wrapper
# Copyright 2016-2017 Gentoo Foundation Inc
# Robin H. Johnson <robbat2@gentoo.org>
#
# This should be run IN the target directory, e.g.:
# cd ..../etc/ssl/example.com/ && /usr/local/bin/manuale-renew.sh
#
# Your OpenSSL CNF should already exist.
SCRIPTBASE="$(dirname $0)"
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
# Description:
# This ebuild uses genkernel to build tarballs of a kernel.
# - It installs NOTHING on it's own.
# - As a side-effect: It explicitly copies the tarballs from $T to a target
# directory.
EAPI=5
inherit flag-o-matic
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
EAPI="4"
inherit toolchain-funcs
# Find updates by searching and clicking the first link (hopefully it's the one):
# http://www.intel.com/content/www/us/en/search.html?keyword=Processor+Microcode+Data+File