Skip to content
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
10 changes: 3 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Optionally create your OMERO.server and OMERO.web Helm configuration files.
You can use [`test-omero-server.yaml`](test-omero-server.yaml) and [`test-omero-web.yaml`](test-omero-web.yaml) as examples.

Create a PostgreSQL database, and add the credentials to your OMERO.server chart configuration file.
For testing you could use the `bitnami/postgresql` Helm chart:
For testing you can use the [CloudNativePG](https://cloudnative-pg.io/) operator:

helm repo add bitnami https://charts.bitnami.com/bitnami
helm upgrade --install postgresql bitnami/postgresql -f test-postgresql.yaml
kubectl apply --server-side=true -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-1.28.1.yaml
kubectl apply -f test-postgresql.yaml

Install OMERO.server and OMERO.web

Expand All @@ -44,14 +44,10 @@ You must delete the PVCs manually if you want a fresh installation.

- PostgreSQL is no longer automatically deployed due to the complexity of managing major version upgrades.
You are strongly recommended to deploy a PostgreSQL server separately, for example:
- using a Helm chart such as [bitnami/postgresql](https://artifacthub.io/packages/helm/bitnami/postgresql)
- using an operator such as
- [CloudNativePG](https://github.com/cloudnative-pg/cloudnative-pg)
- [Postgres Operator from Zalondo](https://github.com/zalando/postgres-operator)
- [PGO from Crunchy Data](https://access.crunchydata.com/documentation/postgres-operator/)

which generally provide better support for major PostgreSQL upgrades

- using a managed service such as [Amazon RDS](https://aws.amazon.com/rds/postgresql/) or [Google Cloud SQL](https://cloud.google.com/sql/docs/postgres)

- Kubernetes 1.21+ is required.
Expand Down
16 changes: 12 additions & 4 deletions ci/test.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#!/bin/bash

BITNAMI_POSTGRESQL_VERSION=12.6.0
# Can update when we drop older K8s versions
# CNPG_VERSION=1.28.1
CNPG_VERSION=1.15.1

fold_start() {
echo "::group::$1"
Expand Down Expand Up @@ -36,13 +38,19 @@ display_logs() {

set -eux

fold_start "installing postgresql omero-server omero-web"
fold_start "installing postgresql"
IP=$(hostname -I | awk '{print $1}')

TEST_NAMESPACE=omero-test

helm repo add bitnami https://charts.bitnami.com/bitnami
helm upgrade --install postgresql --namespace $TEST_NAMESPACE --create-namespace bitnami/postgresql --version $BITNAMI_POSTGRESQL_VERSION -f test-postgresql.yaml
kubectl create namespace $TEST_NAMESPACE

kubectl apply --server-side=true -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/main/releases/cnpg-${CNPG_VERSION}.yaml
kubectl -ncnpg-system rollout status deploy cnpg-controller-manager --timeout=300s
kubectl apply --namespace $TEST_NAMESPACE -f test-postgresql.yaml
fold_end

fold_start "installing omero-server omero-web"

helm upgrade --install omero-server --namespace $TEST_NAMESPACE --create-namespace \
./omero-server/ -f test-omero-server.yaml
Expand Down
6 changes: 3 additions & 3 deletions test-omero-server.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
database:
host: postgresql
host: postgresql-rw
username: omero
password: ChAnGeMe
name: omero
Expand Down Expand Up @@ -34,9 +34,9 @@ ingress:
enabled: true
hosts:
# If you only have an IP add `.xip.io` since bare IPs aren't supported
# - 192.168.99.100.xip.io
# - 192.168.99.100.nip.io
- localhost
tls:
- hosts:
# - 192.168.99.100.xip.io
# - 192.168.99.100.nip.io
- localhost
45 changes: 22 additions & 23 deletions test-postgresql.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,24 @@
# See https://github.com/bitnami/charts/tree/master/bitnami/postgresql#parameters
# image:
# tag: 15.0.0-debian-11-r1
image:
# Temporary workaround for https://github.com/manics/kubernetes-omero/issues/55
repository: bitnamilegacy/postgresql

# TODO: Use the autogenerated postgres secret instead

# Bitnami chart v11:
auth:
apiVersion: v1
kind: Secret
metadata:
name: postgresql-omero
type: kubernetes.io/basic-auth
stringData:
username: omero
password: ChAnGeMe
database: omero
# primary:
# persistence:
# enabled:
# existingClaim:
# storageClass:
# accessModes:
# annotations:
# size:
# subPath:
# mountPath:
# resources:

---
apiVersion: postgresql.cnpg.io/v1
kind: Cluster
metadata:
name: postgresql
spec:
instances: 1
storage:
size: 1Gi
bootstrap:
initdb:
database: omero
owner: omero
secret:
name: postgresql-omero
Loading