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

feat: revamped cloud storage #3214

Merged
merged 76 commits into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
0dcfc13
feat: combine gateway and renku helm charts
olevski Jul 17, 2023
bfa0295
Merge branch 'master' into feat-move-gateway-helm-chart
olevski Jul 17, 2023
e5ec04f
squashme:edits
olevski Aug 7, 2023
e00f4b2
Merge branch 'master' into feat-move-gateway-helm-chart
olevski Aug 7, 2023
6bd432d
squashme: minor fix
olevski Aug 8, 2023
7695e9f
squashme: fix for internal gitlab setup
olevski Aug 8, 2023
5c0b134
squashme: cleanup gitlab secrets
olevski Aug 8, 2023
a40fa12
squashme: test if client secret is set
olevski Aug 8, 2023
3c43c1e
squashme: remove unused file
olevski Aug 8, 2023
999f8e9
Merge branch 'master' into feat-move-gateway-helm-chart
olevski Aug 8, 2023
0702dd8
Merge branch 'master' into feat-move-gateway-helm-chart
olevski Aug 9, 2023
64b2951
Merge branch 'master' into feat-move-gateway-helm-chart
olevski Aug 10, 2023
112c01c
feat(chart): move the ui
olevski Aug 20, 2023
78fe9f7
feat(chart): move the core service
olevski Aug 20, 2023
d8ade9c
unify crc and storage service
Aug 23, 2023
43536ef
fix postgres networking
Aug 24, 2023
c7104c3
add gitlab url value
Aug 24, 2023
5289dd9
feat(chart): move graph
olevski Sep 14, 2023
405631e
feat(chart): move notebooks
olevski Sep 15, 2023
ad8d69a
squashme: minor fixes
olevski Sep 15, 2023
51448f2
feat(chart): move certificates
olevski Sep 15, 2023
df11747
chore: update helm chart changelog
olevski Sep 15, 2023
9407b45
squashme: minor fixes
olevski Sep 15, 2023
fe45bc6
Merge branch 'master' into feat-combine-all-helm-charts
olevski Sep 15, 2023
19d6a59
squashme: minor fixes
olevski Sep 25, 2023
78c7718
Merge branch 'master' into feat-combine-all-helm-charts
olevski Sep 25, 2023
d8afc9a
chore: use new actions
olevski Sep 26, 2023
ceab630
squashme: minor changes
olevski Sep 26, 2023
8847d4f
chore: use updated secrets
olevski Sep 27, 2023
e207e22
squashme: fix ui values
olevski Sep 27, 2023
d98052e
squashme: use correct images in post init jobs
olevski Sep 27, 2023
7603446
squashme: fix core
olevski Sep 27, 2023
41749a3
squashme: minor fix
olevski Sep 27, 2023
fc87082
squashme: use latest project templates
olevski Sep 27, 2023
70f9ce4
squashme: document the cli_version override
olevski Sep 27, 2023
e9c103e
Merge branch 'master' into feat-combine-all-helm-charts
olevski Sep 28, 2023
ea7545a
Merge branch 'master' into feat-combine-all-helm-charts
olevski Sep 28, 2023
b40b250
squashme: update renku actions to 1.7.0
olevski Sep 28, 2023
45aca20
Merge branch 'master' into feat-combine-all-helm-charts
olevski Sep 28, 2023
82b51a5
squashme: update the ui version
olevski Sep 28, 2023
78440e2
squashme: update core service to 2.7.0
olevski Sep 28, 2023
cfd3492
squashme: use amalthea 0.9.1
olevski Sep 29, 2023
f4c88cd
test(cypress): fix editing dataset (#3277)
lorenzo-cavazzi Oct 2, 2023
699eb2f
Merge branch 'master' into feat-combine-all-helm-charts
olevski Oct 2, 2023
b132069
chore: update changelog
olevski Oct 2, 2023
ed69aac
chore: bump graph version
olevski Oct 2, 2023
4d51a54
Merge branch 'feat-combine-all-helm-charts' into data-service-chart
Panaetius Oct 2, 2023
9d274e2
squashme: fix formatting and spelling in changelog
olevski Oct 2, 2023
597df78
Merge branch 'master' into feat-combine-all-helm-charts
olevski Oct 2, 2023
3decf24
fix merge issues
Panaetius Oct 2, 2023
894d195
Merge branch 'master' into data-service-chart
Panaetius Oct 2, 2023
6122108
Merge branch 'feat-combine-all-helm-charts' into data-service-chart
Panaetius Oct 2, 2023
09064ee
Merge branch 'master' into data-service-chart
Panaetius Oct 2, 2023
1ce936c
Merge branch 'master' into data-service-chart
Panaetius Oct 3, 2023
6d5d136
update deploy action
Oct 3, 2023
aa2dd81
Merge branch 'data-service-chart' of github.com:SwissDataScienceCente…
Oct 3, 2023
7a9e96a
update action
Oct 3, 2023
40d7895
Merge branch 'master' into data-service-chart
Panaetius Oct 4, 2023
5c966e4
use proper action
Panaetius Oct 5, 2023
8e6c3b1
address comments
Oct 10, 2023
a0899d4
Merge branch 'master' into data-service-chart
Oct 10, 2023
aea914c
Merge branch 'master' into data-service-chart
Panaetius Oct 10, 2023
2f46e89
Merge branch 'master' into data-service-chart
Panaetius Oct 12, 2023
9f0d76e
add helm value for custom certificates on data service (#3302)
Panaetius Oct 13, 2023
6a902a6
tests: add cypress test to validate cloud storage (#3287)
leafty Oct 13, 2023
4770dd0
change ssl cert envvar
Panaetius Oct 19, 2023
0bf60da
Merge branch 'master' into data-service-chart
olevski Oct 23, 2023
5695d5b
chore: update values for data-services release
olevski Oct 23, 2023
aac8e19
chore: update changelog for amalthea release
olevski Oct 23, 2023
6349607
chore: update changelog for renku notebooks
olevski Oct 23, 2023
a3564b1
squashme: use correct amalthea version
olevski Oct 23, 2023
298cf03
chore: update values for gateway
olevski Oct 23, 2023
6428af6
chore: add breaking helm chart changes for crc
olevski Oct 23, 2023
70afbd4
chore: update UI to version 3.14.0 (#3317)
lorenzo-cavazzi Oct 24, 2023
5ddd087
chore: increase timeout for deleting js in tests
olevski Oct 24, 2023
737e34a
squashme: fix tests
olevski Oct 24, 2023
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: 2 additions & 0 deletions .github/workflows/pull-request-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ jobs:
renku-graph: ${{ steps.deploy-comment.outputs.renku-graph}}
renku-notebooks: ${{ steps.deploy-comment.outputs.renku-notebooks}}
renku-ui: ${{ steps.deploy-comment.outputs.renku-ui}}
renku-data-services: ${{ steps.deploy-comment.outputs.renku-data-services}}
test-enabled: ${{ steps.deploy-comment.outputs.test-enabled}}
extra-values: ${{ steps.deploy-comment.outputs.extra-values}}
steps:
Expand Down Expand Up @@ -94,6 +95,7 @@ jobs:
renku_graph: "${{ needs.check-deploy.outputs.renku-graph }}"
renku_notebooks: "${{ needs.check-deploy.outputs.renku-notebooks }}"
renku_ui: "${{ needs.check-deploy.outputs.renku-ui }}"
renku_data_services: "${{ needs.check-deploy.outputs.renku-data-services }}"
extra_values: "${{ needs.check-deploy.outputs.extra-values }}"
- name: Check existing renkubot comment
if: needs.check-deploy.outputs.pr-contains-string == 'true'
Expand Down
53 changes: 48 additions & 5 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,64 @@
------

Renku ``0.41.0`` allows the RenkuLab homepage to be configured to highlight chosen projects.
In addition we are rolling out a much more comprehensive support for saving and using S3
cloud storage.

Internal Changes
A note to Renku administrators, this release includes breaking changes in our Helm chart values file.
Refer to the ``Internal Changes`` section below for more details.

User-Facing Changes
~~~~~~~~~~~~~~~~~~~

**🌟 New Features**

- 🚀 **UI**: [Showcase] Admins can designate projects to be showcased on the home page, which will show them
in the showcase section of the home page. (`#2799 <https://github.com/SwissDataScienceCenter/renku-ui/pull/2799>`_).
- 🖼 **UI**: Admins can designate projects to be showcased on the home page, which will show them
in the showcase section of the home page
(`#2799 <https://github.com/SwissDataScienceCenter/renku-ui/pull/2799>`_).

**✨ Improvements**

- 💾 **UI**: Add support for cloud storage configuration per project. There are now more options
to customize to support external S3 and S3 compatible storage better
(`#2760 <https://github.com/SwissDataScienceCenter/renku-ui/pull/2760>`_).
- 🌈 **UI**: Improve color contrast and other UX elements
(`#2846 <https://github.com/SwissDataScienceCenter/renku-ui/pull/2846>`_).


This is a breaking change to the values file and it requires minor edits to the following field:
Internal Changes
~~~~~~~~~~~~~~~~~~~

This release is a breaking change to the Helm values file and it requires minor edits to the following field:

- ``ui.homepage`` removed the unused ``projects`` field and added the ``showcase`` field.
- ``amalthea.scheduler.*`` deprecates all existing child fields and adds new child fields. If you are not defining these fields
in your values file then you are using the default Kubernetes scheduler and this requires no action. But if you are
defining a custom scheduler in your deployment's values file then this requires additional edits to your values file
so that you can retain the same functionality as before.
- the ``crc`` field in the values file has been renamed to ``dataService``, all child fields remain the same
functionally and by name.

For more details please refer to the explanation in ``helm-chart/values.yaml.changelog.md``.
For more details on the Helm chart values changes please refer to the explanation in ``helm-chart/values.yaml.changelog.md``.

In addition to this, other notable changes include:

- add node affinities and tolerations for resource classes
- persist cloud storage configurations at the project level
- validation of Rclone cloud storage configuration by the backend
- update the Amalthea scheduler to work with newer versions of Kubernetes
- ``renku-notebooks`` now get S3 cloud storage configuration from ``renku-data-services``
- ``renku-gateway`` now provides credentials for the cloud storage potion of ``renku-data-services``
- UI shows prominent banners during major outages
- various bug fixes across many components

Individual components
~~~~~~~~~~~~~~~~~~~~~~

- `renku-data-services 0.1.1 <https://github.com/SwissDataScienceCenter/renku-data-services/releases/tag/v0.1.1>`_
- `renku-gateway 0.22.0 <https://github.com/SwissDataScienceCenter/renku-gateway/releases/tag/0.22.0>`_
- `renku-notebooks 1.20.0 <https://github.com/SwissDataScienceCenter/renku-notebooks/releases/tag/1.20.0>`_
- `renku-ui 3.14.0 <https://github.com/SwissDataScienceCenter/renku-ui/releases/tag/3.14.0>`_
- `amalthea 0.10.0 <https://github.com/SwissDataScienceCenter/amalthea/releases/tag/0.10.0>`_

0.40.1
------
Expand Down
110 changes: 107 additions & 3 deletions cypress-tests/cypress/e2e/useSession.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,7 @@ describe("Basic public project functionality", () => {

// Save the changes
cy.getDataCy("save-session-button").should("be.visible").click();
cy.get(".modal")
.contains("1 commit will be pushed")
.should("be.visible");
cy.get(".modal").contains("1 commit will be pushed").should("be.visible");
cy.getDataCy("save-session-modal-button").should("be.visible").click();
cy.get(".modal")
.contains("Saving Session", { timeout: TIMEOUTS.long })
Expand Down Expand Up @@ -224,4 +222,110 @@ describe("Basic public project functionality", () => {
cy.pauseSession();
cy.deleteSession();
});

it("Start a new session with cloud storage attached.", () => {
cy.stopAllSessionsForProject(projectIdentifier);

cy.intercept("/ui-server/api/data/storage*").as("getProjectCloudStorage");

cy.getProjectSection("Settings").click();
cy.getDataCy("settings-navbar")
.contains("a.nav-link", "Cloud Storage")
.should("be.visible")
.click();

// Add a S3 storage configuration if it doesn't exist
cy.wait("@getProjectCloudStorage").then(({ response }) => {
const storages = response.body as { storage: { name: string } }[];
if (storages.find(({ storage }) => storage.name === "data_s3")) {
return;
}

cy.getDataCy("settings-container")
.find("button")
.contains("Add Cloud Storage")
.should("be.visible")
.click();

cy.get(".modal").contains("Add Cloud Storage").should("be.visible");

cy.get("label").contains("Name").click();
cy.get(":focused").type("data_s3");

cy.get(".modal")
.contains("For AWS S3 buckets, supported URLs are of the form")
.should("be.visible");
cy.get("label").contains("Endpoint URL").click();
cy.get(":focused").type("s3://giab");

cy.get("label")
.contains("Requires credentials")
.siblings("input")
.click()
.should("not.be.checked");

// NOTE: Temporarily removed this from the tests until we enable read-write
// cy.get("label")
// .contains("Read-only")
// .siblings("input")
// .should("be.checked");

cy.get("button[type='submit']")
.contains("Add Storage")
.should("be.visible")
.click();
});

cy.getDataCy("more-menu").should("be.visible").click();
cy.getProjectPageLink(projectIdentifier, "sessions/new")
.should("be.visible")
.first()
.click();

// Wait for the image to be ready and start a session
cy.get(".renku-container")
.contains("A session gives you an environment")
.should("exist");
cy.get(".renku-container .badge.bg-success", { timeout: TIMEOUTS.vlong })
.contains("available")
.should("exist");
cy.get(".renku-container button.btn-secondary", { timeout: TIMEOUTS.long })
.contains("Start Session")
.should("exist")
.click();
cy.get(".progress-box .progress-title").should("exist"); //.contains("Step 2 of 2");
cy.get("button")
.contains(projectTestConfig.projectName)
.should("be.visible");
cy.get(".progress-box .progress-title")
.contains("Starting Session")
.should("exist");
cy.get(".progress-box .progress-title", { timeout: TIMEOUTS.vlong }).should(
"not.exist"
);

// Verify that the S3 data is mounted
cy.getIframe("iframe#session-iframe").within(() => {
cy.get(".jp-DirListing-content", { timeout: TIMEOUTS.long }).should(
"be.visible"
);
cy.get(".jp-DirListing-item")
.contains("data_s3")
.should("be.visible")
.dblclick();

cy.get(".jp-DirListing-item")
.contains("README.s3_structure")
.should("be.visible")
.dblclick();

cy.get(".jp-FileEditor", { timeout: TIMEOUTS.long }).should("be.visible");
cy.get(".jp-FileEditor")
.contains("The GIAB s3 bucket and URLs")
.should("be.visible");
});

cy.pauseSession();
cy.deleteSession();
});
});
8 changes: 4 additions & 4 deletions cypress-tests/cypress/e2e/verifyInfrastructure.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("Verify the infrastructure is ready", () => {
retryRequest("api/renku/versions", "Core basic");
retryRequest("api/notebooks/version", "Notebooks");
retryRequest("api/kg/entities", "Graph");
retryRequest("api/data/version", "CRC");
retryRequest("api/data/version", "Data Service");
retryRequest("api/auth/login", "Gateway");
retryRequest(
"ui-server/api/allows-iframe/https%3A%2F%2Fgoogle.com",
Expand Down Expand Up @@ -80,9 +80,9 @@ describe("Verify the infrastructure is ready", () => {
throw new Error("Graph backend not working as expected.");
});

// CRC should return a list of default resopurce pools
const crcUrl = "/ui-server/api/data/resource_pools";
cy.request(crcUrl).then((resp) => {
// Data service should return a list of default resopurce pools
const dataServiceUrl = "/ui-server/api/data/resource_pools";
cy.request(dataServiceUrl).then((resp) => {
if (resp.status >= 400 || !resp.body.length)
throw new Error("GitLab not working as expected.");
});
Expand Down
4 changes: 2 additions & 2 deletions cypress-tests/cypress/support/commands/sessions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ function stopAllSessionsForProject(
cy.getDataCy("delete-session-modal-button").should("be.visible").click();
}
});
cy.contains("No currently running sessions.", { timeout: TIMEOUTS.long });
cy.contains("No currently running sessions.", { timeout: TIMEOUTS.vlong });
}

function deleteSession(fromSessionPage = false) {
Expand All @@ -69,7 +69,7 @@ function deleteSession(fromSessionPage = false) {
cy.getDataCy("delete-session-button").first().should("be.visible").click();
cy.getDataCy("delete-session-modal-button").should("be.visible").click();
cy.getDataCy("stopping-btn").should("be.visible");
cy.get(".renku-container", { timeout: TIMEOUTS.long })
cy.get(".renku-container", { timeout: TIMEOUTS.vlong })
.contains("No currently running sessions")
.should("be.visible");
}
Expand Down
4 changes: 2 additions & 2 deletions helm-chart/renku/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ dependencies:
alias: jena
- name: amalthea
repository: "https://swissdatasciencecenter.github.io/helm-charts/"
version: "0.9.1"
version: "0.10.0"
- name: dlf-chart
repository: "https://swissdatasciencecenter.github.io/datashim/"
version: "0.3.0-renku-1"
version: "0.3.9-renku-2"
condition: notebooks.cloudstorage.s3.installDatashim
39 changes: 0 additions & 39 deletions helm-chart/renku/templates/crc/hpa.yaml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ template "renku.fullname" . }}-crc
name: {{ template "renku.fullname" . }}-data-service
labels:
app: renku-crc
app: renku-data-service
chart: {{ template "renku.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
{{- if not .Values.crc.autoscaling.enabled }}
replicas: {{ .Values.crc.replicaCount }}
{{- if not .Values.dataService.autoscaling.enabled }}
replicas: {{ .Values.dataService.replicaCount }}
{{- end }}
strategy:
{{- toYaml .Values.crc.updateStrategy | nindent 4 }}
{{- toYaml .Values.dataService.updateStrategy | nindent 4 }}
selector:
matchLabels:
app: renku-crc
app: renku-data-service
release: {{ .Release.Name }}
template:
metadata:
labels:
app: renku-crc
app: renku-data-service
release: {{ .Release.Name }}
{{- with .Values.crc.podAnnotations }}
{{- with .Values.dataService.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -33,9 +33,9 @@ spec:
initContainers:
{{- include "certificates.initContainer" . | nindent 8 }}
containers:
- name: crc
image: "{{ .Values.crc.image.repository }}:{{ .Values.crc.image.tag }}"
imagePullPolicy: {{ .Values.crc.image.pullPolicy }}
- name: data-service
image: "{{ .Values.dataService.image.repository }}:{{ .Values.dataService.image.tag }}"
imagePullPolicy: {{ .Values.dataService.image.pullPolicy }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
Expand All @@ -57,14 +57,17 @@ spec:
- name: KEYCLOAK_TOKEN_SIGNATURE_ALGS
value: "RS256"
- name: SERVER_DEFAULTS
value: /etc/renku-crc/server_options/server_defaults.json
value: /etc/renku-data-service/server_options/server_defaults.json
- name: SERVER_OPTIONS
value: /etc/renku-crc/server_options/server_options.json
value: /etc/renku-data-service/server_options/server_options.json
- name: K8S_NAMESPACE
value: {{ .Release.Namespace | quote }}
- name: GITLAB_URL
value: {{ .Values.global.gitlab.url | quote}}
{{- include "certificates.env.python" $ | nindent 12 }}
volumeMounts:
- name: server-options
mountPath: /etc/renku-crc/server_options
mountPath: /etc/renku-data-service/server_options
{{- include "certificates.volumeMounts.system" . | nindent 12 }}
livenessProbe:
httpGet:
Expand All @@ -87,16 +90,16 @@ spec:
periodSeconds: 5
failureThreshold: 60
resources:
{{ toYaml .Values.crc.resources | nindent 12 }}
{{- with .Values.crc.nodeSelector }}
{{ toYaml .Values.dataService.resources | nindent 12 }}
{{- with .Values.dataService.nodeSelector }}
nodeSelector:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.crc.affinity }}
{{- with .Values.dataService.affinity }}
affinity:
{{ toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.crc.tolerations }}
{{- with .Values.dataService.tolerations }}
tolerations:
{{ toYaml . | nindent 8 }}
{{- end }}
Expand All @@ -105,4 +108,4 @@ spec:
configMap:
name: {{ template "renku.fullname" . }}-server-options
{{- include "certificates.volumes" . | nindent 8 }}
serviceAccountName: {{ template "renku.fullname" . }}-crc
serviceAccountName: {{ template "renku.fullname" . }}-data-service
Loading
Loading