Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
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
3 changes: 2 additions & 1 deletion applications/accounts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM quay.io/keycloak/keycloak:26.5
ARG KEYCLOAK=quay.io/keycloak/keycloak:26.5
FROM $KEYCLOAK

EXPOSE 9000
EXPOSE 8080
Expand Down
9 changes: 5 additions & 4 deletions applications/nfsserver/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# compile provisioner
FROM golang:1.26 AS provisioner
ARG GOLANG=golang:1.26
ARG ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
FROM $GOLANG AS provisioner

WORKDIR /usr/src/app
COPY nfs-subdir-external-provisioner ./
Expand All @@ -17,10 +19,9 @@ RUN go mod tidy && go build -o /usr/local/bin/nfsvol .
# Upstream continuation of the old k8s.gcr.io/volume-nfs:0.8 image, maintained
# by the Kubernetes project at test/images/volume/nfs. CentOS Stream 9 base
# with nfs-utils already installed; we only need to add e2fsprogs for mkfs.ext4.
FROM rockylinux/rockylinux:10.2-minimal
FROM $ROCKYLINUX

RUN microdnf update -y \
&& microdnf install -y \
RUN microdnf install -y \
e2fsprogs \
rpcbind \
nfs-utils \
Expand Down
3 changes: 2 additions & 1 deletion applications/sentry/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
FROM sentry:9.1.2
ARG SENTRY=sentry:9.1.2
FROM $SENTRY

ADD sentryrunner.sh ./sentryrunner.sh
RUN chmod +x ./sentryrunner.sh
Expand Down
101 changes: 98 additions & 3 deletions deployment/codefresh-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ steps:
buildkit: true
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/accounts
title: Accounts
working_directory: ./applications/accounts
Expand All @@ -77,6 +82,11 @@ steps:
buildkit: true
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/cloudharness-base
title: Cloudharness base
working_directory: ./.
Expand All @@ -99,6 +109,11 @@ steps:
buildkit: true
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/cloudharness-frontend-build
title: Cloudharness frontend build
working_directory: ./.
Expand All @@ -121,6 +136,11 @@ steps:
buildkit: true
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/nfsserver
title: Nfsserver
working_directory: ./applications/nfsserver
Expand All @@ -143,6 +163,11 @@ steps:
buildkit: true
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/test-e2e
title: Test e2e
working_directory: ./test/test-e2e
Expand Down Expand Up @@ -172,6 +197,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/cloudharness-django
title: Cloudharness django
working_directory: ./infrastructure/common-images/cloudharness-django
Expand All @@ -195,6 +225,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/cloudharness-flask
title: Cloudharness flask
working_directory: ./infrastructure/common-images/cloudharness-flask
Expand All @@ -218,6 +253,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/jupyterhub
title: Jupyterhub
working_directory: ./applications/jupyterhub
Expand All @@ -241,6 +281,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/sampleapp-print-file
title: Samples print file
working_directory: ./applications/samples/tasks/print-file
Expand All @@ -264,6 +309,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/sampleapp-secret
title: Samples secret
working_directory: ./applications/samples/tasks/secret
Expand All @@ -287,6 +337,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/test-api
title: Test api
working_directory: ./.
Expand All @@ -311,6 +366,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/workflows-extract-download
title: Workflows extract download
working_directory: ./applications/workflows/tasks/extract-download
Expand All @@ -334,6 +394,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/workflows-notify-queue
title: Workflows notify queue
working_directory: ./applications/workflows/tasks/notify-queue
Expand All @@ -357,6 +422,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_BASE=${{REGISTRY}}/cloud-harness/cloudharness-base:${{CLOUDHARNESS_BASE_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/workflows-send-result-event
title: Workflows send result event
working_directory: ./applications/workflows/tasks/send-result-event
Expand Down Expand Up @@ -385,6 +455,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/common
title: Common
working_directory: ./applications/common/server
Expand All @@ -409,6 +484,11 @@ steps:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_FRONTEND_BUILD=${{REGISTRY}}/cloud-harness/cloudharness-frontend-build:${{CLOUDHARNESS_FRONTEND_BUILD_TAG}}
- CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/sampleapp
title: Samples
working_directory: ./applications/samples
Expand All @@ -432,6 +512,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/volumemanager
title: Volumemanager
working_directory: ./applications/volumemanager/server
Expand All @@ -455,6 +540,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- CLOUDHARNESS_FLASK=${{REGISTRY}}/cloud-harness/cloudharness-flask:${{CLOUDHARNESS_FLASK_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/workflows
title: Workflows
working_directory: ./applications/workflows/server
Expand Down Expand Up @@ -483,6 +573,11 @@ steps:
build_arguments:
- NOCACHE=${{CF_BUILD_ID}}
- SAMPLES=${{REGISTRY}}/cloud-harness/sampleapp:${{SAMPLES_TAG}}
- KEYCLOAK=quay.io/keycloak/keycloak:26.5
- GOLANG=golang:1.26
- ROCKYLINUX=rockylinux/rockylinux:10.1-minimal
- NODE=node:22-alpine
- PYTHON=python:3.12-slim-trixie
image_name: cloud-harness/sampleapp-sum
title: Samples sum
working_directory: ./applications/samples/tasks/sum
Expand Down Expand Up @@ -519,7 +614,7 @@ steps:
kube_context: ${{CLUSTER_NAME}}
namespace: test-${{NAMESPACE_BASENAME}}
chart_version: ${{CF_SHORT_REVISION}}
cmd_ps: --timeout 600s --create-namespace
cmd_ps: --timeout 200s --create-namespace
custom_value_files:
- ./deployment/helm/values.yaml
custom_values:
Expand All @@ -532,11 +627,11 @@ steps:
commands:
- kubectl config use-context ${{CLUSTER_NAME}}
- kubectl config set-context --current --namespace=test-${{NAMESPACE_BASENAME}}
- kubectl rollout status statefulset/samples
- kubectl rollout status deployment/common
- kubectl rollout status deployment/workflows
- kubectl rollout status deployment/volumemanager
- kubectl rollout status statefulset/samples
- kubectl rollout status deployment/accounts
- kubectl rollout status deployment/workflows
- sleep 60
tests_nfs_failover:
stage: qa
Expand Down
72 changes: 72 additions & 0 deletions docs/base-common-images.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,75 @@ libraries or to provide new libraries to share within all applications.

To override cloudharness-base, create a directory `MY_SOLUTION/infrastructure/base-images/cloudharness-base`
then run `harness-deployment cloudharness MY_SOLUTION`


## Change the base image of any application (`FROM [xxx]`)

It's possible to change the image each dockerfile inherits by using the `FROM` directive.
Depending on the kind of application, changing the base image is done in two different ways.
There is basically two main situations:

. your application has a `Dockerfile` (e.g: Keycloak, the app you're building);
. your application doesn't have a `Dockerfile` (e.g: gogatekeeper, Kafka, etc), and the image is directly injected inside the helm chart when the helm chart is generated.

In both situations, the modification is done in the `value-template.yaml` of your CloudHarness projects, but the YAML path to modify depends on the app your targetting then.

### Change the base image for applications with a `Dockerfile`

Changing the base image for your application or applications which have a `Dockerfile` is done through the `source_images` entry of your `value-template.yaml` file.
This entry defines a mapping between the `ARG` of your `Dockerfile` and the value you want to inject.
Here is an example of a declared mapping to change the base image for Python based apps and Node base apps:

```yaml
# value-template.yaml
source_images:
NODE: "mybaseimg:14.5"
PYTHON: "myotherimage:15.1"
```

The list of the base images variables and the value they resolve to is automatically generated in the `helm/values.yaml` file which is generated by the `harness-deployment` command under the `source_images` key. You can then copy/paste the entries you need in your `value-template.yaml` file and tweak the values there.


### Change the base image for applications which inject their image in the helm chart

Those applications are not providing a Dockerfile, but directly an image which is injcted in the helm chart from the helm template.
Each of those applications considers a specific path from the helm configuration (i.e: `values.yaml` or `value-template.yaml`).
To change the base image for those, you need to know this path and change it in the `value-template.yaml` by redefining it.
The redefinition will override the base value from the sub-`values.yaml` files on configuration merging.
Here is an example for the gatekeeper and the Argo controller:

```yaml
# value-template.yaml
harness:
proxy:
gatekeeper:
image: YOUR_NEW_IMG

# or, depending on your application
argo:
controller:
image:
registry: YOUR_REG
tag: YOUR TAG
```

Here is a table of the identified applications inside of CloudHarness which do not own a `Dockerfile`.

| Application | Image path |
| --- | --- |
| gatekeeper | harness.proxy.gatekeeper.image |
| Argo controller | argo.controller.image.{repository, tag} |
| Argo executor | argo.executor.image.{repository, tag} |
| Argo server | argo.server.image.{repository, tag} |
| Elasticsearch | elasticsearch.image |
| Events | events.image.{repository, tag, nullPolicy} |
| Events kafka | events.kafka.image |
| JupyterHub | jupyterhub.singleuser.image.{pullSecrets, name, tag} |
| JupyterHub proxy | jupyterhub.proxy.chp.image.{name, tag, pullPolicy} |
| JupyterHub scheduling | jupyterhub.scheduling.userPlaceHolder.image.{name, pullPolicy, tag} |
| NFS server | nfsserver.harness.deployment.image |
| Sentry redis | sentry.redis.image |
| MongoDB | harness.database.mongo.image |
| Neo4J | harness.database.neo4j.image |
| Neo4J reverseProxy | neo4j.reverseProxy.image |
| Postgres | harness.database.postgres.image |
4 changes: 2 additions & 2 deletions infrastructure/base-images/cloudharness-base/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
ARG PARENT=python:3.12-slim-trixie
FROM ${PARENT}
ARG PYTHON=python:3.12-slim-trixie
FROM $PYTHON

RUN apt update && apt install -y --no-install-recommends \
gcc \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
FROM node:22-alpine


ARG NODE=node:22-alpine
FROM $NODE
Loading
Loading