Skip to content

Commit

Permalink
Bc 4710 new tldraw manage (#618)
Browse files Browse the repository at this point in the history
* Adding env vars for tldraw

* Change env naming, add new env vars

* Change env naming

* Reduce env vars

* Add tldraw ingress

* Added ports

* Add ports to thr

* Tidy tldraw ingress adress and create env vars

* Add tldraw-client vars

* Fix

* Add TLDRAW_CLIENT_REPLICAS

* Change value of tldraw env var

* Add envs

* Add envs

* Add tldraw roles

* Delete roles

* Fix tldraw-server svc naming

* Join tldraw vars into group

* add tldraw_client_runtime_config to the ingress to expose runtime config for the tldraw-client SPA app

* Add static

* Add feature enabler for tldraw

* Add evn for testing

* Fix conflicts

* Fix TYPO

* Fix tests

* Integration tldraw into the board column

* Fix error

* Fix error

* Typo fix

* Typo fix

* Change value

* Add tldraw uri, for http management calls

* add env ver for tldraw port

* Addrule to ingres for tldraw management service

* Add ingress config for multiple pods tldraw websocket handling

* unify service form tldraw ws and management

* unify service form tldraw ws and management

* unify service form tldraw ws and management

* Fix tldraw multiple collections value

* Add tldraw db adress

* Add tldraw db adress

* Delete empty spaces

* fix conflicts

* Fix conflicts

* Fix config limits, lint fixes

* Fix config limits

* Configure separate nginx and ingress for tldraw

* Setup proxy routing to tldraw-nginx-svc

* Add dof_tldraw_nginx to playbook rules

* Add fixes

* Add fixes

* remove tldraw secret

* Add config map and secrets

* Delete tldraw secret

* Adding break lines

* Adding break lines

* Add tldraw socket port to config

* Set tldraw tool enabled config in dev to true

* Reverting separate nginx changes, adjusting code after merge from bc-4256

* Remove unnecessary env vars and ingress rules

* Add port_tldraw_management var to group_vars

* Add tldraw enable var

* Change tldraw enabled flag

* Move tldraw env vars to sc-server. Fix code according to review comments

* Remove unnecessary files,change name of server replica nad add replicas info for ref and prod

* Add env vars used in sc-server in deploy, svc and ingress files

* Remove unneccesarry env vars

* Update ansible/group_vars/production/resources.yml

Co-authored-by: mamutmk5 <[email protected]>

* Move replicas info to individual Host_vars, move feature_enable_tldraw from separate file to cfg in group_vars

* Add tldraw repo and delete ingress

* Remove tldraw data from test-loadtest-01/version. Add tldraw replicas info to ref-audit

* Add necessary env vars for tldraw

* Add settings for ref and prod

* Fix comments

* fix comments

* Add deployments to main

---------

Co-authored-by: Błażej Szczepanowski <[email protected]>
Co-authored-by: Viktoriia <1>
Co-authored-by: Bartosz Nowicki <[email protected]>
Co-authored-by: Tomasz Wiaderek <[email protected]>
Co-authored-by: wiaderwek <[email protected]>
Co-authored-by: mamutmk5 <[email protected]>
  • Loading branch information
6 people authored Nov 27, 2023
1 parent 5883676 commit b8ddfe9
Show file tree
Hide file tree
Showing 39 changed files with 88 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/clean.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
workflow_dispatch:
inputs:
branch_name:
description: 'Branch or tag'
description: 'Branch or tag'
required: true

jobs:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/clean_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ jobs:
- version-aggregator
- dof_app_deploy
- h5p-staticfiles-server
- tldraw-client
steps:
- run: |
echo "git_ref_name=${{ inputs.branch }}" >> $GITHUB_ENV
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
- version-aggregator
- dof_app_deploy
- h5p-staticfiles-server
- tldraw-client
steps:
- run: |
echo "git_ref_name=${{ inputs.branch }}" >> $GITHUB_ENV
Expand Down Expand Up @@ -152,4 +153,4 @@ jobs:
tenannt: brb
secrets:
ONEPASSWORD_VAULT: ${{ secrets.DEV_VAULT }}
KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG }}
KUBECONFIG: ${{ secrets.DEV_KUBE_CONFIG }}
6 changes: 6 additions & 0 deletions .github/workflows/host.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,12 @@ jobs:
path: repo/version-aggregator
token: ${{ secrets.token }}
ref: ${{ env.VERSION_AGGREGATOR_VERSION }}
- uses: actions/checkout@v3
with:
repository: hpi-schul-cloud/tldraw-client
path: repo/tldraw-client
token: ${{ secrets.token }}
ref: ${{ env.TLDRAW_CLIENT_VERSION }}
- working-directory: ${{github.workspace }}
run: |
mkdir ansible
Expand Down
9 changes: 9 additions & 0 deletions ansible/group_vars/all/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -942,3 +942,12 @@ configuration_all:
server: true
client: true
nuxtclient: false
FEATURE_TLDRAW_ENABLED:
server: true
client: false
nuxtclient: false
TLDRAW_URI:
value: "http://tldraw-server-svc:3349"
server: true
client: false
nuxtclient: false
1 change: 1 addition & 0 deletions ansible/group_vars/all/git_repos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ ANTIVIRUS_CHECK_SERVICE_REPO_NAME: antivirus-check-service
VERSION_AGGREGATOR_REPO_NAME: version-aggregator
DOF_APP_DEPLOY_REPO_NAME: dof-app-deploy
H5P_STATICFILES_SERVER_REPO_NAME: h5p-staticfiles-server
TLDRAW_CLIENT_REPO_NAME: tldraw-client
1 change: 1 addition & 0 deletions ansible/group_vars/all/x_ingress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,4 @@ default_ingress:
h5p-statics:
path: /h5pstatics
with: WITH_H5P_EDITOR

8 changes: 7 additions & 1 deletion ansible/group_vars/develop/cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,10 @@ FEATURE_SCHOOL_POLICY_ENABLED_NEW: "true"

FEATURE_SCHOOL_TERMS_OF_USE_ENABLED: "true"

KEDA_NAMESPACE_ACTIVATOR_ENABLED: "true"
KEDA_NAMESPACE_ACTIVATOR_ENABLED: "true"

TLDRAW_CLIENT_REPLICAS: 1

TLDRAW_SERVER_REPLICAS: 1

FEATURE_TLDRAW_ENABLED: "true"
1 change: 1 addition & 0 deletions ansible/group_vars/infra/cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ NAMESPACE: "{{ inventory_hostname | replace('.', '-') }}"
DOMAIN: "{{ inventory_hostname }}.dbildungscloud.dev"
DISPLAY_REQUEST_LEVEL: -1
ALERT_STATUS_URL: https://status.dbildungscloud.dev/
FEATURE_TLDRAW_ENABLED: "false"
2 changes: 1 addition & 1 deletion ansible/group_vars/infra/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ RABBITMQ_REPLICAS: 1
REDIS_REPLICAS: 1
ROCKET_CHAT_REPLICAS: 1
SHD_REPLICAS: 1
STORAGE_REPLICAS: 1
STORAGE_REPLICAS: 1
2 changes: 1 addition & 1 deletion ansible/group_vars/loadtest/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ RABBITMQ_REPLICAS: 1
REDIS_REPLICAS: 1
ROCKET_CHAT_REPLICAS: 1
SHD_REPLICAS: 1
STORAGE_REPLICAS: 1
STORAGE_REPLICAS: 1
1 change: 1 addition & 0 deletions ansible/group_vars/loadtest/tldraw.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
FEATURE_TLDRAW_ENABLED: "false"
2 changes: 2 additions & 0 deletions ansible/group_vars/production/cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,5 @@ H5P_FRAME_SRC_URLS: "https://rendering.services.edusharing.dbildungscloud.de/"

BETTERMARKS_APPS_URL: "https://apps.bettermarks.com"
BETTERMARKS_SCHOOL_URL: "https://acc.bettermarks.com"

FEATURE_TLDRAW_ENABLED: "false"
8 changes: 8 additions & 0 deletions ansible/group_vars/production/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,11 @@ AMQP_FILE_PREVIEW_CPU_LIMITS: "4000m"
AMQP_FILE_PREVIEW_CPU_REQUESTS: "100m"
AMQP_FILE_PREVIEW_MEMORY_LIMITS: "4Gi"
AMQP_FILE_PREVIEW_MEMORY_REQUESTS: "4Gi"
TLDRAW_CLIENT_CPU_LIMITS: "2000m"
TLDRAW_CLIENT_MEMORY_LIMITS: "2Gi"
TLDRAW_CLIENT_CPU_REQUESTS: "1000m"
TLDRAW_CLIENT_MEMORY_REQUESTS: "2Gi"
TLDRAW_EDITOR_CPU_LIMITS: "2000m"
TLDRAW_EDITOR_MEMORY_LIMITS: "4Gi"
TLDRAW_EDITOR_CPU_REQUESTS: "100m"
TLDRAW_EDITOR_MEMORY_REQUESTS: "4Gi"
4 changes: 3 additions & 1 deletion ansible/group_vars/reference/cfg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ ES_DOMAIN: https://repository.sc-staging-edusharing.dbildungscloud.org
H5P_FRAME_SRC_URLS: "https://rendering.services.sc-staging-edusharing.dbildungscloud.org/"

BETTERMARKS_APPS_URL: "https://apps-ci00.bettermarks.com"
BETTERMARKS_SCHOOL_URL: "https://acc.bettermarks.com"
BETTERMARKS_SCHOOL_URL: "https://acc.bettermarks.com"

FEATURE_TLDRAW_ENABLED: "true"
8 changes: 8 additions & 0 deletions ansible/group_vars/reference/resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,3 +91,11 @@ AMQP_FILE_PREVIEW_CPU_LIMITS: "4000m"
AMQP_FILE_PREVIEW_CPU_REQUESTS: "100m"
AMQP_FILE_PREVIEW_MEMORY_LIMITS: "4Gi"
AMQP_FILE_PREVIEW_MEMORY_REQUESTS: "4Gi"
TLDRAW_CLIENT_CPU_LIMITS: "2000m"
TLDRAW_CLIENT_MEMORY_LIMITS: "2Gi"
TLDRAW_CLIENT_CPU_REQUESTS: "500m"
TLDRAW_CLIENT_MEMORY_REQUESTS: "2Gi"
TLDRAW_EDITOR_CPU_LIMITS: "2000m"
TLDRAW_EDITOR_MEMORY_LIMITS: "4Gi"
TLDRAW_EDITOR_CPU_REQUESTS: "100m"
TLDRAW_EDITOR_MEMORY_REQUESTS: "4Gi"
1 change: 1 addition & 0 deletions ansible/host_vars/dev-loadtest-01/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
1 change: 1 addition & 0 deletions ansible/host_vars/infra.dbildungscloud-01/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/prod-brb/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/prod-brb/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/prod-dbc/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/prod-dbc/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/prod-nbc/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/prod-nbc/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/prod-thr/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/prod-thr/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/ref-audit/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,5 @@ ROCKET_CHAT_REPLICAS: 1
SHD_REPLICAS: 1
STORAGE_REPLICAS: 1
ERWINIDM_REPLICAS: 3
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
2 changes: 2 additions & 0 deletions ansible/host_vars/ref-brb/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/ref-brb/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/ref-dbc/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/ref-dbc/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/ref-nbc/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ ERWINIDM_REPLICAS: 3
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/ref-nbc/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
2 changes: 2 additions & 0 deletions ansible/host_vars/ref-thr/pod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,5 @@ API_H5P_LIBRARY_MANAGEMENT_REPLICAS: 1
AMQP_FILE_PREVIEW_IDLE_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MIN_REPLICA_COUNT: 1
AMQP_FILE_PREVIEW_MAX_REPLICA_COUNT: 5
TLDRAW_CLIENT_REPLICAS: 3
TLDRAW_SERVER_REPLICAS: 3
1 change: 1 addition & 0 deletions ansible/host_vars/ref-thr/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@ SCHULCLOUD_CALENDAR_IMAGE_TAG: 32.9.0
ANTIVIRUS_CHECK_SERVICE_IMAGE_TAG: 32.8.0
VERSION_AGGREGATOR_IMAGE_TAG: 1.0.7
H5P_STATICFILES_SERVER_IMAGE_TAG: 1.0.1
TLDRAW_CLIENT_IMAGE_TAG: 1.0.0
Empty file.
2 changes: 2 additions & 0 deletions ansible/playbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,7 @@
- version-aggregator
- rocketchat
- mongodb_query_exporter
- tldraw-client-core
- ingress
- post_deployment

2 changes: 2 additions & 0 deletions ansible/playbook_rollout.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,7 @@
- role: version-aggregator
- role: rocketchat
- role: mongodb_query_exporter
- role: tldraw-client-core
- role: ingress
- role: post_deployment

Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ deployments_for_scaled_objects:
- redis-deployment
- rocketchat-deployment
- shd-deployment
- version-aggregator-deployment
- version-aggregator-deployment
- tldraw-deployment
- tldraw-client-deployment

0 comments on commit b8ddfe9

Please sign in to comment.