Skip to content

Commit

Permalink
docs: add UI documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzo-cavazzi committed Apr 30, 2024
1 parent 7611c01 commit dc024b5
Show file tree
Hide file tree
Showing 9 changed files with 78 additions and 180 deletions.
Binary file added docs/_static/images/secrets_selection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
# ones.
extensions = [
"cheatsheet",
"sphinxcontrib.plantuml",
# "sphinxcontrib.plantuml",
"sphinx_click",
"sphinx_copybutton",
"sphinx_rtd_theme",
Expand Down
3 changes: 0 additions & 3 deletions docs/reference/services/api-gateway.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,3 @@ The diagram below illustrates the sequence of events that currently take place
in the API gateway.

.. _fig-uml_gateway_service:

.. uml:: ../../_static/uml/gateway-sequence.uml
:alt: Sequence diagram of notebook launch from the UI via the Notebooks Service.
60 changes: 0 additions & 60 deletions docs/reference/services/graph-services.rst
Original file line number Diff line number Diff line change
Expand Up @@ -25,63 +25,3 @@ Sequence diagram of Graph Services APIs and processes.
**POST <knowledge-graph>/knowledge-graph/graphql**

An endpoint that allows performing GraphQL queries on the Knowledge Graph data.

.. uml:: ../../_static/uml/knowledge-graph-graphql-sequence.uml

**POST <webhook-service>/projects/:id/webhooks**

An endpoint to create a Graph Services webhook for a project in GitLab.

.. uml:: ../../_static/uml/graph-create-hook-sequence.uml

**POST <webhook-service>/projects/:id/webhooks/validation**

An endpoint to validate project's webhook. It checks if a relevant
Graph Services webhook exists on the repository in GitLab and
if Graph Services have an Access Token associated with the project
so they can use it for finding project specific information in GitLab.

.. uml:: ../../_static/uml/graph-validate-hook-sequence.uml

**POST <webhook-service>/webhooks/events**

An endpoint to send Push Events containing information about commits pushed to the GitLab.

.. uml:: ../../_static/uml/graph-push-event-sequence.uml

**GET <webhook-service>/projects/:id/events/status**

An endpoint that returns information about processing progress of events for a specific project.

.. uml:: ../../_static/uml/graph-events-status-sequence.uml

**Subscription to unprocessed Commit Events**

A process initiated and maintained by Triples Generator instances
so Event Log can send them Events requiring generation of triples.

.. uml:: ../../_static/uml/graph-commit-events-subscription-sequence.uml

**Commit Events to RDF Triples**

A process responsible for translating unprocessed Commit Events from the Event Log
to RDF Triples in the RDF Store. This process runs continuously
by polling the Event Log for unprocessed Commit Events.

.. uml:: ../../_static/uml/graph-commit-event-sequence.uml

**Missed commits synchronization job**

A scheduled job which synchronizes state between the Event Log and GitLab
and generates Commit Events missing from the Event Log.
It runs periodically with a configured interval.

.. uml:: ../../_static/uml/graph-sync-events-sequence.uml


**Knowledge Graph re-provisioning process**

A process executed on Triples Generator start-up that checks if triples
in the RDF Store were generated with the version of renku-python currently set in the Triples Generator.

.. uml:: ../../_static/uml/graph-reprovisioning-sequence.uml
4 changes: 0 additions & 4 deletions docs/reference/services/notebooks-service.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ to launch a new notebook using the notebook service:

.. _fig-uml_notebooks_service:

.. uml:: ../../_static/uml/notebook-sequence.uml
:alt: Sequence diagram of notebook launch from the UI via the Notebooks Service.


.. _notebooks_image_builds:

Image builds
Expand Down
106 changes: 0 additions & 106 deletions docs/reference/services/services-architecture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -46,112 +46,6 @@ are either built or extended by us.
System Context
--------------

.. uml::

@startuml
!include <C4/C4_Context>
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/v2.4.0
!include DEVICONS/devicons2/bash.puml
!include DEVICONS/devicons2/kubernetes.puml
!include DEVICONS/devicons2/gitlab.puml

HIDE_STEREOTYPE()

skinparam defaultFontName "Calcutta","DejaVu Sans Condensed","SansSerif"
skinparam linetype ortho

Person(logged_in, "Logged-In user")
Person(cli, "Renku CLI", $sprite="bash")
System(renku, "", $link="../reference/services/services-architecture.html#container-diagram", $sprite="img:https://renku.readthedocs.io/en/latest/_static/icons/renku_logo.png{scale=0.2}")
System(gitlab, "Gitlab", $sprite="gitlab")
System(keycloak, "Keycloak", $sprite="img:https://renku.readthedocs.io/en/latest/_static/icons/keycloak_logofinal_1color.png{scale=0.2}")
System(k8s, "Kubernetes", $sprite="kubernetes")
SystemDb(s3, "S3")
SystemDb(azure_blob, "Azure Blob")

Rel(logged_in, renku, "Uses")
Rel(cli, renku, "Uses")
Rel(renku, keycloak, "Auth")
BiRel(renku, gitlab, "pull/push/events")
Rel(renku, k8s, "sessions")
Rel(renku, s3, "Storage")
Rel(renku, azure_blob, "Storage")
@enduml


Container Diagram
-----------------

.. uml::

@startuml
!include <C4/C4_Container.puml>
!define DEVICONS https://raw.githubusercontent.com/tupadr3/plantuml-icon-font-sprites/v2.4.0
!include DEVICONS/devicons2/bash.puml

skinparam linetype ortho
skinparam defaultFontName "Calcutta","DejaVu Sans Condensed","SansSerif"

HIDE_STEREOTYPE()

AddElementTag("kubernetes", $shape=EightSidedShape(), $bgColor="CornflowerBlue", $fontColor="white", $legendText="micro service (eight sided)")

Person(cli, "Renku CLI", $sprite="bash")
Person(logged_in, "Logged-In user")
System_Boundary(renku, "Renku") {
Container(ui, "UI", "React", "Web Frontend")
Container(ui_server, "UI-Server", "ExpressJs", "Backend for Frontend service")
Container(gateway, "Gateway", "Go", "API Gateway")
Container(core_service, "core-service", "Python", "Backend service for project interaction", $link="../reference/services/services-architecture.html#core-service")
Container(renku_graph, "renku-graph", "Scala", "Backend service for Knowledge Graph data")
Container(renku_notebooks, "renku-notebooks", "Python", "Interactive session management service")
Container(amalthea, "Amalthea", "Python", "K8s Operator for scheduling session CRDs", $tags="kubernetes")
Container(session, "User Session")
Container(renku_crc, "CRC Service", "Python", "Manages compute resource access")
}
System(gitlab, "Gitlab")
System(keycloak, "Keycloak")
System(k8s, "Kubernetes", $tags="kubernetes")
SystemDb(postgres, "PostgreSQL")
SystemDb(redis, "Redis")
SystemDb(jena, "Jena")

Rel(logged_in, ui, "")
Rel(logged_in, session, "")
Rel(ui, ui_server, "")
Rel(ui_server, gateway, "")
Rel(gateway, keycloak, "")
Rel(gateway, core_service, "")
Rel(gateway, renku_graph, "")
Rel(gateway, renku_notebooks, "")
Rel(gateway, renku_crc, "")
Rel(renku_notebooks, renku_crc, "")
Rel(core_service, gitlab, "", "")
Rel(core_service, redis, "")
Rel(k8s, amalthea, "", "")
Rel(k8s, session, "")
Rel(session, keycloak, "")
Rel(session, gitlab, "")
Rel(amalthea, k8s, "", "")
Rel(cli, gitlab, "", "")
Rel(cli, gateway, "")
Rel(cli, renku_notebooks, "")
Rel(cli, renku_graph, "")
Rel(renku_notebooks, amalthea, "")
Rel(gateway, redis, "")
Rel(gitlab, postgres, "")
Rel(renku_graph, postgres, "")
Rel(renku_graph, jena, "")
Rel(renku_graph, gitlab, "")
Rel(keycloak, postgres, "")

Lay_D(cli, renku)
Lay_D(redis, k8s)
Lay_R(redis, renku)
Lay_R(k8s, renku)

@enduml

UI
~~

Expand Down
2 changes: 1 addition & 1 deletion docs/renku-python
Submodule renku-python updated 552 files
81 changes: 76 additions & 5 deletions docs/topic-guides/secrets/secrets.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,85 @@
Secrets in RenkuLab
===================

This is still a placeholder.
What are secrets?
-----------------

Add or change secrets
---------------------
Secrets are sensitive data that you need in sessions but should
not be stored in a repository.
This includes passwords you might need for accessing a database, API keys
for external services, or any other sensitive information.

WIP
You can create, replace, and delete secrets from the RenkuLab interface.
They are securely stored in our systems and are only available in sessions
for your user. They will be mounted as files in the session container in
a path you can customize when starting a new session.
Each secret is stored with a unique name, which will be used for the
corresponding file name.

Keep in mind that secrets are currently defined per user. They cannot be
shared with other users, nor scoped down to a single project. You can select
which secrets to use in a session when starting it, so you don't need
to worry about accidentally mounting secrets into a session that you
do not need.

Add and change secrets
----------------------

To add a new secret, go to the User Secrets page in the RenkuLab interface.
You can find it in the user settings menu on the top right.

.. image:: ../../_static/images/secrets_page.png
:width: 85%
:align: center
:alt: User Secrets page

Click on the ``Add New Secret`` button and fill in the Name and Value fields.

The name is a unique identifier for the secret, used for the file name in
sessions. It cannot be empty and the name follows specific validation rules:
you can include only letters, numbers, underscores (_), and dashes (-).

Values can be any non-empty string, including special characters. The length
cannot exceed 5'000 characters. Should you need to store a longer value,
consider splitting it into multiple secrets.

.. image:: ../../_static/images/secrets_add_new.png
:width: 85%
:align: center
:alt: Add a new secret

Once you add a secret, you cannot visualize its value again for security
reasons. You can still change it by clicking on the ``Replace`` button,
or remove it by clicking on the ``Delete`` button. The name cannot be changed;
should you need to rename a secret, please delete it and create a new one
you the new name.

Use secrets in sessions
-----------------------

WIP
If you need to include secrets in a session, you need to click on the Start
dropdown menu and select ``Start with options``. Quick-start sessions do not
support secrets.

Once on the "Start Session" page, you can select the secrets you want to
include from the ``User Secrets`` section towards the bottom of the page.
Click on the chevron on the right to expand the secrets list and click on
every secret you want to include. You can customize the path where the
secrets will be mounted in the session container by adjusting the
``Mount path`` input. The default path is ``/secrets``.

.. image:: ../../_static/images/secrets_selection.png
:width: 85%
:align: center
:alt: Select secrets to mount in a new session

Click on the ``Start Session`` button to start the session with the selected
secrets. You can now access the secrets in the session container at the
specified path. The secrets will be stored in files with the same name.

.. note::

Secrets will be mounted with the value stored at the session start time.
If you change the value of a secret after starting the session, you will
need to restart the session to apply the changes.

Empty file modified docs/utils/plantuml-asl-1.2023.11.jar
100644 → 100755
Empty file.

0 comments on commit dc024b5

Please sign in to comment.