Skip to content
Draft
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
138 changes: 120 additions & 18 deletions .github/workflows/build-global-renkulab-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,87 @@ on:

env:
DOCKER_PREFIX: ghcr.io/swissdatasciencecenter/renku
BUILDER_IMAGE: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/selector:0.0.8
RUN_IMAGE: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/base-image:0.0.8
RUN_IMAGE_AMD64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/run-image:0.2.2
BUILDER_IMAGE_AMD64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/selector:0.2.2
RUN_IMAGE_ARM64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-run-image:0.2.2
BUILDER_IMAGE_ARM64: ghcr.io/swissdatasciencecenter/renku-frontend-buildpacks/cuda-selector:0.2.2

jobs:
build-images:
runs-on: ${{ matrix.PLATFORM == 'linux/arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
strategy:
fail-fast: true
matrix:
PLATFORM:
- linux/amd64
- linux/arm64
FLAVOR:
- basic
- datascience
FRONTEND:
- jupyterlab
- vscodium
- ttyd
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
tags: |
type=sha,prefix=${{ matrix.PLATFORM == 'linux/arm64' && 'arm64' || 'amd64' }}-
- name: Docker meta cache
id: meta_cache
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}-cache
tags: |
type=raw,value=${{ matrix.PLATFORM == 'linux/arm64' && 'arm64' || 'amd64' }}
- name: Setup pack
uses: buildpacks/github-actions/setup-pack@v5.9.3
- name: Build image
working-directory: ./global-images
run: |
BUILD_TAG=$(echo '${{ steps.meta.outputs.json }}' | jq -cr '.tags[0]')
echo "BUILD_TAG=${BUILD_TAG}"
CACHE_IMAGE=$(echo '${{ steps.meta_cache.outputs.json }}' | jq -cr '.tags[0]')
echo "CACHE_IMAGE=${CACHE_IMAGE}"
RUN_IMAGE=${{ matrix.PLATFORM == 'linux/arm64' && env.RUN_IMAGE_ARM64 || env.RUN_IMAGE_AMD64 }}
echo "RUN_IMAGE=${RUN_IMAGE}"
BUILDER_IMAGE=${{ matrix.PLATFORM == 'linux/arm64' && env.BUILDER_IMAGE_ARM64 || env.BUILDER_IMAGE_AMD64 }}
echo "BUILDER_IMAGE=${BUILDER_IMAGE}"
# publish only on pushes to master or release tags
PUBLISH=0
EXTRA_FLAGS=""
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
PUBLISH=1
elif [[ "${GITHUB_REF}" =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
PUBLISH=1
fi
[ "${PUBLISH:-}" = "1" ] && EXTRA_FLAGS="--publish --cache-image ${CACHE_IMAGE}"
echo "PUBLISH=${PUBLISH}"
echo "EXTRA_FLAGS=${EXTRA_FLAGS}"
pack build "${BUILD_TAG}" \
-p "${{ matrix.FLAVOR }}" \
--builder "${BUILDER_IMAGE}" \
--run-image "${RUN_IMAGE}" \
--env BP_RENKU_FRONTENDS="${{ matrix.FRONTEND }}" \
--platform "${{ matrix.PLATFORM }}" \
--previous-image "${CACHE_IMAGE}" \
${EXTRA_FLAGS}

combine-images:
needs: [build-images]
runs-on: ubuntu-24.04
strategy:
fail-fast: true
Expand All @@ -28,7 +105,8 @@ jobs:
- vscodium
- ttyd
steps:
- uses: actions/checkout@v5
- name: Checkout repository
uses: actions/checkout@v5
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -40,32 +118,56 @@ jobs:
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
env:
DOCKER_METADATA_ANNOTATIONS_LEVELS: index
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
annotations: |
org.opencontainers.image.title=renku/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
org.opencontainers.image.description=An image for renku sessions, with ${{ matrix.FLAVOR }} Python packages and a ${{ matrix.FRONTEND }} frontend.
tags: |
type=sha,prefix=
type=raw,value=latest,enable=${{ github.ref == 'refs/heads/master' }}
type=semver,pattern={{version}},event=tag
- uses: buildpacks/github-actions/setup-pack@v5.9.3
- name: Build image
- name: Docker meta amd64
id: meta_amd64
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
tags: |
type=sha,prefix=amd64-
- name: Docker meta arm64
id: meta_arm64
uses: docker/metadata-action@v5
with:
images: ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}
tags: |
type=sha,prefix=arm64-
- name: Combine images
run: |
tags=$(echo "${{ steps.meta.outputs.tags }}" | tr '\n' ',')
tags=${tags::-1}

readarray -t TAG_ARGS<<<$(echo '${{ steps.meta.outputs.json }}' | jq -cr '.tags | map("--tag\n" + .) | join("\n")')
echo "TAG_ARGS=${TAG_ARGS[@]}"
readarray -t ANNOTATION_ARGS<<<$(echo '${{ steps.meta.outputs.json }}' | jq -cr '.annotations | map("--annotation\n" + .) | join("\n")')
echo "ANNOTATION_ARGS=${ANNOTATION_ARGS[@]}"
LINUX_AMD64_IMAGE=$(echo '${{ steps.meta_amd64.outputs.json }}' | jq -cr '.tags[0]')
echo "LINUX_AMD64_IMAGE=${LINUX_AMD64_IMAGE}"
LINUX_ARM64_IMAGE=$(echo '${{ steps.meta_arm64.outputs.json }}' | jq -cr '.tags[0]')
echo "LINUX_ARM64_IMAGE=${LINUX_ARM64_IMAGE}"
# publish only on pushes to master or release tags
PUBLISH=0
EXTRA_FLAGS=""
if [[ "${GITHUB_REF}" == "refs/heads/master" ]]; then
PUBLISH=1
elif [[ "${GITHUB_REF}" =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
PUBLISH=1
fi
[ "${PUBLISH:-}" = "1" ] && EXTRA_FLAGS="--cache-image ${{ env.DOCKER_PREFIX }}/py-${{ matrix.FLAVOR }}-${{ matrix.FRONTEND }}-cache:latest"

TAGS=$tags \
FRONTEND=${{ matrix.FRONTEND }} \
RUN_IMAGE=${{ env.RUN_IMAGE }} \
BUILDER=${{ env.BUILDER_IMAGE }} \
PUBLISH=$PUBLISH \
EXTRA_FLAGS=$EXTRA_FLAGS \
make -C global-images ${{ matrix.FLAVOR }}
echo "PUBLISH=${PUBLISH}"
if [[ "${PUBLISH:-}" != "1" ]]; then
echo "Skipping"
exit 0
fi
set -x
docker buildx imagetools create \
"${TAG_ARGS[@]}" \
"${ANNOTATION_ARGS[@]}" \
"${LINUX_AMD64_IMAGE}" \
"${LINUX_ARM64_IMAGE}"
4 changes: 2 additions & 2 deletions cypress-tests/cypress/e2e/v2/projectResources.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ describe("Project resources - work with code, data, environments", () => {
.find("[data-cy=code-repository-item]")
.contains(repoName);
cy.contains("[data-cy=code-repository-item]", repoName).contains(
"Pull only",
/Integration recommended|Request integration/,
);

// Edit code repository
Expand All @@ -172,7 +172,7 @@ describe("Project resources - work with code, data, environments", () => {
.find("[data-cy=code-repository-item]")
.contains(repoNameEdited);
cy.contains("[data-cy=code-repository-item]", repoNameEdited).contains(
"Pull only",
/Integration recommended|Request integration/,
);
});

Expand Down
11 changes: 7 additions & 4 deletions cypress-tests/cypress/e2e/v2/sessionBasics.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -129,9 +129,8 @@ describe("Start a session that consumes project resources", () => {
cy.getDataCy("code-repositories-box")
.find("[data-cy=code-repository-item]")
.contains(repositoryName);
cy.contains("[data-cy=code-repository-item]", repositoryName).contains(
"Pull only",
);
cy.contains("[data-cy=code-repository-item]", repositoryName)
.contains(/Integration recommended|Request integration/);

cy.getDataCy("add-session-launcher").click();
cy.getDataCy("environment-kind-custom").click();
Expand Down Expand Up @@ -175,7 +174,11 @@ describe("Start a session that consumes project resources", () => {
timeout: TIMEOUTS.long,
})
.click();
cy.getDataCy("session-status-starting");
cy.get("[data-cy=session-repositories-modal]", {
timeout: TIMEOUTS.long,
})
.should("be.visible");
cy.getDataCy("session-repositories-modal-continue").click();
cy.get("[data-cy=session-status-starting]", {
timeout: TIMEOUTS.long,
}).should("be.visible");
Expand Down
11 changes: 1 addition & 10 deletions helm-chart/renku/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,9 @@ dependencies:
repository: "oci://harbor.renkulab.io/bitnami-mirror"
version: 20.3.0
condition: redis.install
- name: renku-jena
version: "0.0.25"
repository: "https://swissdatasciencecenter.github.io/helm-charts/"
alias: jena
condition: enableV1Services
- name: amalthea
repository: "https://swissdatasciencecenter.github.io/helm-charts/"
version: "0.22.0"
condition: enableV1Services
- name: amalthea-sessions
repository: "https://swissdatasciencecenter.github.io/helm-charts/"
version: "0.22.0"
version: "0.22.1"
- name: dlf-chart
repository: "https://swissdatasciencecenter.github.io/datashim/"
version: "0.3.9-renku-2"
Expand Down
10 changes: 8 additions & 2 deletions helm-chart/renku/templates/data-service/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,8 +132,10 @@ spec:
value: {{ .Values.dataService.imageBuilders.enabled | quote }}
- name: BUILD_OUTPUT_IMAGE_PREFIX
value: {{ .Values.dataService.imageBuilders.outputImagePrefix | default "" | quote }}
- name: BUILD_VSCODIUM_PYTHON_RUN_IMAGE
value: {{ .Values.dataService.imageBuilders.vscodiumPythonRunImage | default "" | quote }}
- name: BUILD_BUILDER_IMAGE
value: {{ .Values.dataService.imageBuilders.builderImage | default "" | quote }}
- name: BUILD_RUN_IMAGE
value: {{ .Values.dataService.imageBuilders.runImage | default "" | quote }}
- name: BUILD_STRATEGY_NAME
value: {{ .Values.dataService.imageBuilders.strategyName | default "" | quote }}
- name: BUILD_PUSH_SECRET_NAME
Expand All @@ -152,6 +154,10 @@ spec:
- name: BUILD_NODE_TOLERATIONS
value: {{ toJson . | quote }}
{{- end }}
{{- with .Values.dataService.imageBuilders.platformOverrides }}
- name: BUILD_PLATFORM_OVERRIDES
value: {{ toJson . | quote }}
{{- end }}
- name: V1_SESSIONS_ENABLED
value: {{ .Values.ui.client.supportLegacySessions | default false | quote }}
- name: ENABLE_INTERNAL_GITLAB
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,14 @@ spec:
fieldRef:
apiVersion: v1
fieldPath: metadata.namespace
- name: SENTRY_ENABLED
value: {{ .Values.dataService.k8sWatcher.sentry.enabled | quote }}
- name: SENTRY_DSN
value: {{ .Values.dataService.k8sWatcher.sentry.dsn | quote }}
- name: SENTRY_ENVIRONMENT
value: {{ .Values.dataService.k8sWatcher.sentry.environment | quote }}
- name: SENTRY_SAMPLE_RATE
value: {{ .Values.dataService.k8sWatcher.sentry.sampleRate | quote }}
{{- if .Values.dataService.remoteClustersKubeconfigSecretName }}
- name: K8S_CONFIGS_ROOT
value: "/secrets/kube_configs"
Expand Down
5 changes: 5 additions & 0 deletions helm-chart/renku/templates/gateway/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -95,4 +95,9 @@ data:
prometheus:
enabled: {{ .Values.gateway.metrics.enabled }}
port: {{ .Values.gateway.metrics.port }}
redirects:
gitlab:
enabled: {{ .Values.gateway.redirects.gitlab.enabled }}
renkuBaseUrl: {{ include "renku.baseUrl" . | quote }}
redirectedHost: {{ .Values.gateway.redirects.gitlab.redirectedHost | default "" | quote }}
---
34 changes: 34 additions & 0 deletions helm-chart/renku/templates/gateway/gitlab-redirect-ingress.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{{- if .Values.gateway.redirects.gitlab.enabled -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: gitlab-redirect-{{ template "renku.fullname" . }}
labels:
app: gitlab
chart: {{ template "renku.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
{{- with .Values.gateway.redirects.gitlab.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
spec:
ingressClassName: {{ .Values.gateway.redirects.gitlab.ingress.className }}
{{- if .Values.ingress.tls }}
tls:
- hosts:
- {{ .Values.gateway.redirects.gitlab.ingress.host }}
secretName: gitlab-{{ .Values.global.renku.domain }}-tls
{{- end }}
rules:
- host: {{ .Values.gateway.redirects.gitlab.ingress.host }}
http:
paths:
- backend:
service:
name: {{ template "renku.fullname" . }}-gateway
port:
number: 80
path: /(.*)
pathType: ImplementationSpecific
{{- end }}
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,11 @@ spec:
- name: http
containerPort: 8080
protocol: TCP
{{- if .Values.ui.client.prometheus.enabled }}
- name: metrics
containerPort: 9090
protocol: TCP
{{- end }}
env:
- name: BASE_URL
value: {{ (include "renku.baseUrl" .) | quote }}
Expand Down Expand Up @@ -100,6 +105,8 @@ spec:
value: {{ .Values.dataService.imageBuilders.enabled | quote }}
- name: LEGACY_SUPPORT
value: {{ dict "enabled" .Values.enableV1Services "supportLegacySessions" .Values.ui.client.supportLegacySessions | toJson | quote }}
- name: METRICS_ENABLED
value: {{ .Values.ui.client.prometheus.enabled | quote }}
livenessProbe:
httpGet:
path: /
Expand Down
10 changes: 10 additions & 0 deletions helm-chart/renku/templates/ui/ui-client-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ apiVersion: v1
kind: Service
metadata:
name: {{ template "ui.fullname" . }}
{{- with .Values.ui.client.prometheus.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
app: "ui"
chart: {{ template "renku.chart" . }}
Expand All @@ -14,6 +18,12 @@ spec:
targetPort: 8080
protocol: TCP
name: http
{{- if .Values.ui.client.prometheus.enabled }}
- port: 9090
targetPort: 9090
protocol: TCP
name: metrics
{{- end }}
selector:
app: "ui"
release: {{ .Release.Name }}
Expand Down
Loading