Skip to content

Instantly share code, notes, and snippets.

@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:

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)

rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- get
- list
- watch
- apiGroups:
git filter-repo --path README.md --path .gitignore --path docker-compose.yaml --path Jenkinsfile --path Makefile --path package.json --path yarn.lock --path .env.defaults --path tsconfig.json --path build/ --path images/ --path local-dev/ --path node-packages/ --path services/ --path tests/
git filter-repo --path README.md --path .gitignore --path docker-compose.yaml --path Jenkinsfile --path Makefile --path .env.defaults --path build/ --path images/ --path local-dev/ --path tests/
@tobybellwood
tobybellwood / Makefile
Created August 4, 2020 09:05
WIP image-only Makefile
SHELL := /bin/bash
# amazee.io lagoon Makefile The main purpose of this Makefile is to provide easier handling of
# building images and running tests It understands the relation of the different images (like
# nginx-drupal is based on nginx) and builds them in the correct order Also it knows which
# services in docker-compose.yml are depending on which base images or maybe even other service
# images
#
# The main commands are:
# make build/<imagename>