Skip to content

Instantly share code, notes, and snippets.

View jonpugh's full-sized avatar

Jon Pugh jonpugh

View GitHub Profile
@jonpugh
jonpugh / README.md
Last active May 19, 2020 16:53
OpenDevShop: A DevOps Framework

Presentation Draft

Re-introducting OpenDevShop 2020: The Open Source DevOps Framework

Summary

For 2020, OpenDevShop is rebranding from a "Cloud Hosting Platform" to an "Open Source DevOps Framework". The DevShop project is following Symfony's lead by creating components that can be used anywhere, or brought together to build any kind of DevOps platform. This session will cover the DevShop Components you might find useful in your Drupal projects for Testing and DevOps, as we create a brand new Drupal 8 site and try to migrate it to Drupal 9.

Abstract

"DevOps" is a wide-ranging practice, but at it's core, it is about one thing: getting software to run on servers.

@jonpugh
jonpugh / docker-compose.yml
Last active January 17, 2020 18:11
Our Monitoring Stack
version: "2"
volumes:
grafana-data:
prometheus-data:
graphite-data:
services:
nginx:
restart: always
image: nginx
@jonpugh
jonpugh / delete-hosting-task-logs.sql
Created January 6, 2020 15:40
Aegir Hosting Task Logs Cleanup
# Delete all hosting_task_logs from all sites that are deleted.
DELETE htl.* FROM hosting_task_log htl LEFT JOIN hosting_task ht ON htl.vid = ht.vid LEFT JOIN hosting_site hs ON ht.rid = hs.nid WHERE hs.status = -2;
@jonpugh
jonpugh / README.md
Last active January 25, 2021 10:11
Modern Symfony/Drupal Development on Windows 10 with WSL / Ubuntu

I bought a $129 Lenovo Windows Laptop

Let's see how much we can get out of this thing.

Rules

  1. Native tools only. No Docker. No Virtualization. No "local dev" products.
  2. Minimize the number of apps. No Chrome.
  3. Use Windows apps whenever possible. VSCode vs IntelliJ
  4. Document all of our steps.
@jonpugh
jonpugh / molecule.yml
Last active October 17, 2019 05:33
Better Molecule "dependency" Experience
# Configure the "dependency" action.
dependency:
name: galaxy
# Set 'ansible-galaxy install' command line options
options:
# Turn off '--force' option so 'ansible-galaxy' doesn't re-download the files every time you run 'molecule'.
force: false
@jonpugh
jonpugh / gist:6455d67d065c369a1f441a77b7ba180d
Created October 16, 2019 23:55
Manual workaround for database dumps "DEFINER" issue.
# Because of these issues:
# - https://stackoverflow.com/a/44015870/292408
# - https://www.drupal.org/project/workflow_participants/issues/3073354
# A second time because the export has the issue too.
- name: Add this function to /var/aegir/.drush/va.drush.inc
function drush_va_post_sql_dump() {
// BACKEND_RESULT is the full path to the file.
$file_ext_gz = drush_get_context('BACKEND_RESULT');
shell_exec("gunzip $file_ext_gz");
$file_ext_sql = str_replace('.gz', '', $file_ext_gz);
@jonpugh
jonpugh / docker-compose.yml
Created August 13, 2019 19:00
Grafana/Graphite/Icinga/StatsD/Rancher/Prometheus Stack
version: "2"
volumes:
grafana-data:
prometheus-data:
graphite-data:
services:
nginx:
restart: always
image: nginx
@jonpugh
jonpugh / tenyears.patch
Created February 13, 2019 12:04
git diff 5.x-0.1 7.x-3.x
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..4a07b38
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,2 @@
+themes/*
+modules/*
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
# Adapted from http://kb.pulsesecure.net/articles/Pulse_Secure_Article/KB40126 and http://adam-perkins.com/post/pulse-secure-ubuntu-1704
# Not yet tested.
apt install \
libc6-i386 \
lib32z1 \
lib32stdc++6 \
libwebkitgtk-1.0-0:i386
libc6-i386 \
webkit2gtk-driver \
libproxy1v5 \
@jonpugh
jonpugh / docker-compose.yml
Created May 18, 2018 15:49
HTTP Router & Encryptor
# This file containers the "ingress" point: the "nginx" container binds to 80 and 443 on the host.
# The `nginx-proxy` network must exist before `docker-compose up` is called.
version: "2"
services:
nginx:
restart: always
image: nginx
container_name: nginx