Skip to content

Instantly share code, notes, and snippets.

View tobybellwood's full-sized avatar

Toby Bellwood tobybellwood

View GitHub Profile
@tobybellwood
tobybellwood / lagoon-token-rotate.md
Last active October 10, 2022 04:13
Rotating lagoon-remote tokens in the Lagoon API

Rotating lagoon-remote tokens in the Lagoon API

This is the process that run when a lagoon-remote token requires rotating in the Lagoon API.

Whilst this process was possible previously, it required some advanced GraphQL manipulation. With the most recent releases of Lagoon and Lagoon-CLI, it is much more straightforward.

Requirements:

@tobybellwood
tobybellwood / .lagoon.yml
Created May 27, 2022 00:42
bare bones Lagoon database project
docker-compose-yaml: docker-compose.yml
project: generic
tasks:
post-rollout:
- run:
name: populate mariadb
command: |
mysql --host=mariadb --user=lagoon --password=lagoon --database=lagoon -e 'CREATE TABLE IF NOT EXISTS time ( timestamp timestamp NOT NULL);'
apiVersion: v1
kind: Service
metadata:
name: odfe-node1
namespace: opendistro
spec:
type: ExternalName
externalName: odfe-node1
ports:
- name: tcp-9200
@tobybellwood
tobybellwood / image_replacement.md
Last active February 1, 2022 13:36
lagoon-images reference

The following is a table to indicate how users of the current amazeeio-namespaced Lagoon images can upgrade seamlessly to the new uselagoon-namespaced ones.

This brings with it a number of improvements:

  • Versioning is now available for a number of images that previously were susceptible to major version increments (mariadb, postgres, redis, varnish), ensuring more predictability
  • ARM (Apple Silicon) compatibility is only available in uselagoon-namespaced & versioned images
  • Automated updates via GitHub/Dependabot, RenovateBot etc are much easier under the new versioning system

For more information see the blog series at https://dev.to/uselagoon/moving-lagoon-to-semantic-versioned-docker-images-57d0

To use the table below - find the image you currently use in the "Old Image" column, and replace it with the "New Image" in your Dockerfile/docker-compose.yml

@tobybellwood
tobybellwood / helmfile.yml
Created September 20, 2021 06:15
preliminary helmfile for lagoon
# Chart repositories used from within this state file
#
# Use `helm-s3` and `helm-git` and whatever Helm Downloader plugins
# to use repositories other than the official repository or one backend by chartmuseum.
repositories:
# To use official "stable" charts a.k.a https://github.com/helm/charts/tree/master/stable
- name: stable
url: https://charts.helm.sh/stable
- name: harbor
url: https://helm.goharbor.io
@tobybellwood
tobybellwood / 6.6.Dockerfile
Created September 1, 2021 03:39
varnish 6.6
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-lagoon}/commons as commons
FROM varnish:6.6 as vmod
ENV LIBVMOD_DYNAMIC_VERSION=6.6
ENV VARNISH_MODULES_VERSION=6.6
RUN apt-get update && apt-get -y install build-essential curl zip
RUN curl -L https://packagecloud.io/varnishcache/varnish66/gpgkey | apt-key add - && \
echo "deb https://packagecloud.io/varnishcache/varnish66/debian/ buster main" | tee /etc/apt/sources.list.d/varnish-cache.list && \
@tobybellwood
tobybellwood / lagoon-images.txt
Created August 12, 2021 04:40
Lagoon Images
10:09:40 commons,images/commons/Dockerfile,images/commons
10:10:01 nginx,images/nginx/Dockerfile,images/nginx
10:10:16 nginx-drupal,images/nginx-drupal/Dockerfile,images/nginx-drupal
10:10:18 mariadb-10.5,images/mariadb/10.5.Dockerfile,images/mariadb
10:10:48 toolbox,images/toolbox/Dockerfile,images/toolbox
10:11:26 rabbitmq,images/rabbitmq/Dockerfile,images/rabbitmq
10:11:56 rabbitmq-cluster,images/rabbitmq-cluster/Dockerfile,images/rabbitmq-cluster
10:12:04 php-7.2-fpm,images/php-fpm/7.2.Dockerfile,images/php-fpm
10:49:13 php-7.3-fpm,images/php-fpm/7.3.Dockerfile,images/php-fpm
11:28:33 php-7.4-fpm,images/php-fpm/7.4.Dockerfile,images/php-fpm
@tobybellwood
tobybellwood / Readme.md
Last active June 16, 2021 22:07
Rough Lagoon2 instructions

Cloning the repo

To set up Lagoon 2 as easily as possible, use the lagoon-charts repository from the uselagoon organisation

git clone git@github.com:uselagoon/lagoon-charts.git
cd lagoon-charts

Setting up the cluster

Create the KinD cluster to host this Lagoon (NB other k8s are a WIP)

@tobybellwood
tobybellwood / php8.0.Dockerfile
Created November 27, 2020 02:14
PHP8.0 Dockerfile with all options
ARG IMAGE_REPO
FROM ${IMAGE_REPO:-lagoon}/commons as commons
FROM composer:latest as healthcheckbuilder
RUN composer create-project --no-dev amazeeio/healthz-php /healthz-php v0.0.6
FROM php:8.0.0RC5-fpm-alpine3.12
LABEL maintainer="amazee.io"
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups: