Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lagoon 2.12 documentation updates #3363

Merged
merged 8 commits into from
Jan 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docker-images/solr.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This Dockerfile is intended to be used to set up a standalone Solr server with a

* 5.5 \(available for compatibility, no longer officially supported\)
* 6.6 \(available for compatibility, no longer officially supported\)
* 7.7 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/7.7.Dockerfile) (no longer actively supported upstream) - `uselagoon/solr-7.7`
* 7.7 \(available for compatibility, no longer officially supported\)
* 7 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/7.Dockerfile) - `uselagoon/solr-7`
* 8 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/solr/8.Dockerfile) - `uselagoon/solr-8`

Expand Down
18 changes: 11 additions & 7 deletions docs/docker-images/varnish.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,24 @@
# Varnish

The [Lagoon `Varnish` image Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish/6.Dockerfile). Based on the [official `varnish` package](https://hub.docker.com/_/varnish) provided by `alpine:3.7` image.
The [Lagoon `Varnish` Docker images](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish). Based on the [official `varnish` package](https://hub.docker.com/_/varnish)

By default, `vmod-dynamic` and `vmod-bodyaccess` modules are installed.
## Supported versions

## Lagoon adaptions

This image is prepared to be used on Lagoon. There are therefore some things already done:

* Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/uselagoon/lagoon-images/blob/main/images/commons/fix-permissions), so this image will work with a random user.
* 5 \(available for compatibility, no longer officially supported\) - `uselagoon/varnish-5`
* 6 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish/6.Dockerfile) - `uselagoon/varnish-6`
* 7 [Dockerfile](https://github.com/uselagoon/lagoon-images/blob/main/images/varnish/7.Dockerfile) - `uselagoon/varnish-7`

## Included varnish modules

* [`vbox-dynamic`](https://github.com/nigoroll/libvmod-dynamic) - Dynamic backends from DNS lookups and service discovery from SRV records.
* [`vbox-bodyaccess`](https://github.com/aondio/libvmod-bodyaccess) - Varnish `vmod` that lets you access the request body.

## Lagoon adaptions

This image is prepared to be used on Lagoon. There are therefore some things already done:

* Folder permissions are automatically adapted with [`fix-permissions`](https://github.com/uselagoon/lagoon-images/blob/main/images/commons/fix-permissions), so this image will work with a random user.

## Included `default.vcl` configuration file

The image ships a _default_ `vcl` configuration file, optimized to work on Lagoon. Some options are configurable via environments variables \(see [Environment Variables](./#environment-variables)\).
Expand Down
4 changes: 3 additions & 1 deletion docs/installing-lagoon/install-harbor.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
```bash
helm repo add harbor https://helm.goharbor.io
```
2. Create the file `harbor-values.yml` inside of your config directory:
2. Create the file `harbor-values.yml` inside of your config directory. The proxy-buffering annotations help with large image pushes.:

```yaml title="harbor-values.yml"
expose:
ingress:
annotations:
kubernetes.io/tls-acme: "true"
nginx.ingress.kubernetes.io/proxy-buffering: "off"
nginx.ingress.kubernetes.io/proxy-request-buffering: "off"
hosts:
core: harbor.lagoon.example.com
tls:
Expand Down
13 changes: 9 additions & 4 deletions docs/installing-lagoon/lagoon-logging.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
# **Lagoon Logging**
# Lagoon Logging

Lagoon integrates with OpenSearch to store application, container and router logs. Lagoon Logging collects the application, router and container logs from Lagoon projects, and sends them to the logs concentrator. It needs to be installed onto each `lagoon-remote` instance.

In addition, it should be installed in the `lagoon-core` cluster to collect logs from the `lagoon-core` service. This is configured in the `LagoonLogs` section.

Logging Overview: [**https://lucid.app/lucidchart/b1da011f-2b91-4798-9518-4164b19d327d/view**](https://lucid.app/lucidchart/b1da011f-2b91-4798-9518-4164b19d327d/view)** **
Logging Overview: [https://lucid.app/lucidchart/b1da011f-2b91-4798-9518-4164b19d327d/view](https://lucid.app/lucidchart/b1da011f-2b91-4798-9518-4164b19d327d/view)

See also: [Logging](../logging/logging.md).

Read more about Lagoon logging here: [https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-logging](https://github.com/uselagoon/lagoon-charts/tree/main/charts/lagoon-logging)

1. Create` lagoon-logging-values.yaml`:
1. Create `lagoon-logging-values.yaml`:

```yaml title="lagoon-logging-values.yaml"
tls:
caCert: |
Expand Down Expand Up @@ -43,6 +44,7 @@ Read more about Lagoon logging here: [https://github.com/uselagoon/lagoon-charts
rabbitMQPassword: <<RabbitMQ Lagoon Password>>
excludeNamespaces: {}
```

2. Install `lagoon-logging`:

```
Expand All @@ -53,12 +55,14 @@ Read more about Lagoon logging here: [https://github.com/uselagoon/lagoon-charts
-f lagoon-logging-values.yaml \
lagoon-logging lagoon/lagoon-logging
```

## Logging NGINX Ingress Controller

If you'd like logs from `ingress-nginx` inside `lagoon-logging`:

1. The ingress controller must be installed in the namespace `ingress-nginx`
2. Add the content of this file to `ingress-nginx:
2. Add the content of this file to ingress-nginx:

```yaml title="ingress-nginx log-format-upstream"
controller:
config:
Expand Down Expand Up @@ -88,3 +92,4 @@ If you'd like logs from `ingress-nginx` inside `lagoon-logging`:
"service_port": "$service_port"
}
```
3. Your logs should start flowing!
15 changes: 6 additions & 9 deletions docs/installing-lagoon/requirements.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Requirements

* Kubernetes 1.22+ (Kubernetes 1.19 is supported, but 1.22 is recommended)
* Kubernetes 1.23+ (Kubernetes 1.21 is supported, but 1.23 is recommended)
* Familiarity with [Helm](https://helm.sh) and [Helm Charts](https://helm.sh/docs/topics/charts/#helm), and [kubectl](https://kubernetes.io/docs/tasks/tools/).
* Ingress controller, we recommend [ingress-nginx](https://github.com/kubernetes/ingress-nginx), installed into ingress-nginx namespace
* Cert manager (for TLS) - We highly recommend using letsencrypt
Expand All @@ -11,18 +11,15 @@
!!! Note "Note:"
We acknowledge that this is a lot of steps, and our roadmap for the immediate future includes reducing the number of steps in this process.

## Specific requirements (as of March 2022)
## Specific requirements (as of January 2023)

### Kubernetes
Lagoon supports Kubernetes versions 1.19 onwards. We actively test and develop against Kubernetes 1.23, also regularly testing against 1.21,1.22 and 1.24.
Lagoon supports Kubernetes versions 1.21 onwards. We actively test and develop against Kubernetes 1.24, also regularly testing against 1.21,1.22 and 1.25.

!!! Warning "Kubernetes 1.24:"
Lagoon does not currently support Kubernetes 1.24 due to a bug [here](https://github.com/uselagoon/remote-controller/issues/151)

The next large round of breaking changes is in [Kubernetes 1.25](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25), and we will endeavour to be across these in advance.
The next large round of breaking changes is in [Kubernetes 1.25](https://kubernetes.io/docs/reference/using-api/deprecation-guide/#v1-25), and we will endeavour to be across these in advance, although this will require a bump in the minimum supported version of Lagoon.

### ingress-nginx
Lagoon is currently configured only for a single ingress-nginx controller, and therefore defining an IngressClass has not been necessary.
Lagoon is currently configured only for a single ingress-nginx controller, and therefore defining an IngressClass had not been necessary. in the past

In order to use the recent ingress-nginx controllers (v4 onwards, required for Kubernetes 1.22), the following configuration should be used, as per [the ingress-nginx docs](https://kubernetes.github.io/ingress-nginx/#what-is-an-ingressclass-and-why-is-it-important-for-users-of-ingress-nginx-controller-now).

Expand All @@ -36,7 +33,7 @@ Other configurations may be possible, but have not been tested.
### Harbor
Versions 2.1 and 2.2+ of Harbor are currently supported - the method of retrieving robot accounts was changed in 2.2, and the Lagoon remote-controller is able to handle these tokens. This means that Harbor has to be configured with the credentials in lagoon-build-deploy - not lagoon-core.

We recommend installing a Harbor version greater than [2.5.0](https://github.com/goharbor/harbor/releases/tag/v2.5.0) with Helm chart [1.9.0](https://github.com/goharbor/harbor-helm/releases/tag/v1.9.0) or greater.
We recommend installing a Harbor version greater than [2.6.0](https://github.com/goharbor/harbor/releases/tag/v2.6.0) with Helm chart [1.10.0](https://github.com/goharbor/harbor-helm/releases/tag/v1.10.0) or greater.

### k8up for backups
Lagoon has built in configuration for the [k8up](https://k8up.io/k8up/1.2/index.html) backup operator. Lagoon can configure prebackup pods, schedules and retentions, and manage backups and restores for K8up. Lagoon currently only supports the 1.x versions of k8up, owing to a namespace change in v2 onwards, but we are working on a fix.
Expand Down
12 changes: 9 additions & 3 deletions docs/installing-lagoon/update-lagoon.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,27 @@
-f values.yaml lagoon-core lagoon/lagoon-core
```

3. Run the upgrade using helm
3. [Backup](#database-backups) the Lagoon databases prior to any helm actions .
We suggest to also scale the API to a single pod, to aid the db migration scripts running in the initContainers.

4. Run the upgrade using helm

```
helm upgrade --install --create-namespace --namespace lagoon-core \
-f values.yaml lagoon-core lagoon/lagoon-core
```

4. If upgrading Lagoon Core, ensure you run the `rerun_initdb.sh` script to perform post upgrade migrations
5. (Note that as of Lagoon v2.11.0, this step is no longer required.)
If upgrading Lagoon Core, ensure you run the `rerun_initdb.sh` script to perform post upgrade migrations.

```
kubectl --namespace lagoon-core exec -it lagoon-core-api-db-0 -- \
sh -c /rerun_initdb.sh
```

5. If upgrading Lagoon Core, and you have enabled groups/user syncing for OpenSearch, you may additionally need to run the `sync:opendistro-security` script to update the groups in OpenSearch. This command can also be prefixed with a `GROUP_REGEX=<group-to-sync` to sync a single group at a time, as syncing the entire group structure may take a long time.
6. Re-scale the API pods back to their original level

6. If upgrading Lagoon Core, and you have enabled groups/user syncing for OpenSearch, you may additionally need to run the `sync:opendistro-security` script to update the groups in OpenSearch. This command can also be prefixed with a `GROUP_REGEX=<group-to-sync` to sync a single group at a time, as syncing the entire group structure may take a long time.

```
kubectl --namespace lagoon-core exec -it deploy/lagoon-core-api -- \
Expand Down
12 changes: 12 additions & 0 deletions docs/using-lagoon-the-basics/lagoon-yml.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Common uses for post-rollout tasks include running `drush updb`, `drush cim`, or
* Here you specify what command should run. These are run in the WORKDIR of each container, for Lagoon images this is `/app`, keep this in mind if you need to `cd` into a specific location to run your task.
* `service`
* The service which to run the task in. If following our Drupal example, this will be the CLI container, as it has all your site code, files, and a connection to the database. Typically you do not need to change this.
* `container`
* If the service has multiple containers (eg nginx-php), you will need to specify which container in the pod to connect to (e.g. the `php` container within the `nginx` pod)
* `shell`
* Which shell should be used to run the task in. By default `sh` is used, but if the container also has other shells \(like `bash`, you can define it here\). This is useful if you want to run some small if/else bash scripts within the post-rollouts. \(see the example above how to write a script with multiple lines\).
* `when`
Expand Down Expand Up @@ -104,6 +106,16 @@ Run shell script:
service: cli
```

Target specific container in pod:

```yaml title=".lagoon.yml"
- run:
name: show php env variables
command: env
service: nginx
container: php
```

Drupal & Drush 9: Sync database & files from master environment:

```yaml title=".lagoon.yml"
Expand Down