From 5a69ac82f92690d6f95676fb347e27bf87229197 Mon Sep 17 00:00:00 2001 From: Amit Priyadarshi Date: Thu, 24 Jun 2021 12:17:26 +0530 Subject: [PATCH 01/19] SB-24310: Adding framework master category validation configuration - taxonomy service (#2641) * Issue #SB-24310 feat: Adding framework master category validation configuration - taxonomy service --- .../stack-sunbird/templates/taxonomy-service_application.conf | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf b/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf index 66a27cfe62..6a6cbbb11e 100644 --- a/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/taxonomy-service_application.conf @@ -390,3 +390,6 @@ languageCode { telugu : "te" } objectcategorydefinition.keyspace="{{ lp_cassandra_keyspace_prefix }}_category_store" + +# Framework master category validation Supported values are Yes/No +master.category.validation.enabled="{{ master_category_validation_enabled | default('Yes') }}" \ No newline at end of file From a5c2446c550cb927575d9475c863b3e0fa44f731 Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Fri, 25 Jun 2021 13:12:43 +0530 Subject: [PATCH 02/19] fix: add important comments (#2645) --- .../ansible/inventory/dev/Core/secrets.yml | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/private_repo/ansible/inventory/dev/Core/secrets.yml b/private_repo/ansible/inventory/dev/Core/secrets.yml index dc1fe4f623..fbb26b0579 100644 --- a/private_repo/ansible/inventory/dev/Core/secrets.yml +++ b/private_repo/ansible/inventory/dev/Core/secrets.yml @@ -91,17 +91,12 @@ core_vault_kibana_google_client_id: # You can use the same core_vault_kibana_google_client_secret: # You can use the same outh client secret that we used for portal vault_core_url_shortner_access_token: "" # Url shortner access token if you want to shorten urls like forgot password link etc using an external service like bit.ly + +### IMPORTANT! IMPORTANT! IMPORTANT! ### +### NOTE: FOR A REAL ENVIRONMENT YOU MUST CHANGE THE BELOW VALUES TO SOMETHING VERY SECRET WHICH ONLY YOU WILL KNOW! DO NOT USE THE DEFAULTS FOR REAL ENVIRONMENTS! ### # ------------------------------------------------------------------------------------------------------------ # -# Sensible defaults which you need not change - But if you would like to change, you are free to do so -core_vault_enc_entry_password: password # encryption password for the enc service -core_vault_enc_master_pass: password # encryption password for the keys -core_vault_kibana_cookie_secret: long-secret-to-calm-entropy-gods # Cookie secret for kibana Oauth -dp_play_http_secret_key: "long-secret-to-calm-entropy-gods" # Random 32+ character string -core_vault_graph_passport_key: "long-secret-to-calm-entropy-gods" # Should be same as lp_vault_graph_passport_key from KP secrets.yml -crypto_encryption_key: "long-secret-to-calm-entropy-gods" # any crypto key of 32 bit length, used by portal to encrypt and decrypt the userDetails for forgot password flow -sunbird_api_auth_token_bot: "{{ core_vault_sunbird_api_auth_token }}" +# Sensible defaults which you need not change if you are just trying Sunbird- You should change these to something unique for real environments and not use the defaults -# Keycloak related vars core_vault_keycloak_api_management_user_password: admin core_vault_keystore_password: password # Password for encrypting data in cassandra core_vault_sunbird_sso_username: admin # Keycloak SSO username @@ -123,9 +118,21 @@ core_vault_sunbird_keycloak_user_federation_provider_id: "8460f8f8-b6bc-11eb-852 core_vault_proxy_prometheus_admin_creds: admin # Prometheus admin password core_vault_postgres_username: postgres # Postgres user name core_vault_grafana_editor_password: sunbird # Grafana editor user password + + +# ------------------------------------------------------------------------------------------------------------ # +# Sensible defaults which you need not change - But if you would like to change, you are free to do so + core_vault_grafana_dashboards_git_repo_url_with_credentails: "https://github.com/project-sunbird/grafana-dashboards.git" # Changing the sessions secret value will invalidate all existing sessions. # In order to rotate the secret without invalidating sessions, provide an array of secrets, # with the new secret as first element of the array, and followed by previous secrets. -sunbird_portal_session_secret: "long-secret-to-calm-entropy-gods" # Portal session secret -nodebb_admin_password: MySecretPassword # Nodebb admin password +sunbird_portal_session_secret: "long-secret-to-calm-entropy-gods" # Portal session secret +nodebb_admin_password: MySecretPassword # Nodebb admin password +core_vault_enc_entry_password: password # encryption password for the enc service +core_vault_enc_master_pass: password # encryption password for the keys +core_vault_kibana_cookie_secret: long-secret-to-calm-entropy-gods # Cookie secret for kibana Oauth +dp_play_http_secret_key: "long-secret-to-calm-entropy-gods" # Random 32+ character string +core_vault_graph_passport_key: "long-secret-to-calm-entropy-gods" # Should be same as lp_vault_graph_passport_key from KP secrets.yml +crypto_encryption_key: "long-secret-to-calm-entropy-gods" # any crypto key of 32 bit length, used by portal to encrypt and decrypt the userDetails for forgot password flow +sunbird_api_auth_token_bot: "{{ core_vault_sunbird_api_auth_token }}" From 86cb1c2919eb81798f9f3694ce2bd0d27ff5ecef Mon Sep 17 00:00:00 2001 From: Kumar Date: Fri, 25 Jun 2021 13:24:09 +0530 Subject: [PATCH 03/19] Issue #000 | KP Flink Dashboard changes added (#2646) --- .../kp-flink-jobs-metrics-dashboard.json | 2556 ++++++++--------- 1 file changed, 1233 insertions(+), 1323 deletions(-) diff --git a/kubernetes/helm_charts/monitoring/dashboards/dashboards/kp-flink-jobs-metrics-dashboard.json b/kubernetes/helm_charts/monitoring/dashboards/dashboards/kp-flink-jobs-metrics-dashboard.json index 6a7ea5262b..8f348e3b1b 100644 --- a/kubernetes/helm_charts/monitoring/dashboards/dashboards/kp-flink-jobs-metrics-dashboard.json +++ b/kubernetes/helm_charts/monitoring/dashboards/dashboards/kp-flink-jobs-metrics-dashboard.json @@ -3574,7 +3574,7 @@ "thresholds": "", "timeFrom": null, "timeShift": null, - "title": "Dailcode Externla Success Events", + "title": "Dailcode External Success Events", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -3938,7 +3938,7 @@ "h": 4, "w": 8, "x": 0, - "y": 4 + "y": 28 }, "id": 4, "interval": null, @@ -4029,7 +4029,7 @@ "h": 4, "w": 8, "x": 8, - "y": 4 + "y": 28 }, "id": 70, "interval": null, @@ -4120,7 +4120,7 @@ "h": 4, "w": 8, "x": 16, - "y": 4 + "y": 28 }, "id": 72, "interval": null, @@ -4211,7 +4211,7 @@ "h": 4, "w": 6, "x": 0, - "y": 8 + "y": 32 }, "id": 6, "interval": null, @@ -4302,7 +4302,7 @@ "h": 4, "w": 6, "x": 6, - "y": 8 + "y": 32 }, "id": 62, "interval": null, @@ -4393,7 +4393,7 @@ "h": 4, "w": 6, "x": 12, - "y": 8 + "y": 32 }, "id": 71, "interval": null, @@ -4484,7 +4484,7 @@ "h": 4, "w": 6, "x": 18, - "y": 8 + "y": 32 }, "id": 63, "interval": null, @@ -4575,7 +4575,7 @@ "h": 4, "w": 8, "x": 0, - "y": 12 + "y": 36 }, "id": 59, "interval": null, @@ -4666,7 +4666,7 @@ "h": 4, "w": 8, "x": 8, - "y": 12 + "y": 36 }, "id": 64, "interval": null, @@ -4757,7 +4757,7 @@ "h": 4, "w": 8, "x": 16, - "y": 12 + "y": 36 }, "id": 5, "interval": null, @@ -4844,7 +4844,7 @@ "h": 8, "w": 12, "x": 0, - "y": 16 + "y": 40 }, "hiddenSeries": false, "id": 10, @@ -4973,7 +4973,7 @@ "h": 8, "w": 12, "x": 12, - "y": 16 + "y": 40 }, "hiddenSeries": false, "id": 12, @@ -5094,7 +5094,7 @@ "h": 4, "w": 5, "x": 0, - "y": 5 + "y": 29 }, "id": 75, "interval": null, @@ -5185,7 +5185,7 @@ "h": 4, "w": 5, "x": 5, - "y": 5 + "y": 29 }, "id": 77, "interval": null, @@ -5276,7 +5276,7 @@ "h": 4, "w": 4, "x": 10, - "y": 5 + "y": 29 }, "id": 79, "interval": null, @@ -5367,7 +5367,7 @@ "h": 4, "w": 5, "x": 14, - "y": 5 + "y": 29 }, "id": 80, "interval": null, @@ -5459,7 +5459,7 @@ "h": 4, "w": 5, "x": 19, - "y": 5 + "y": 29 }, "id": 83, "interval": null, @@ -5545,7 +5545,7 @@ "h": 8, "w": 12, "x": 0, - "y": 9 + "y": 33 }, "hiddenSeries": false, "id": 81, @@ -5658,7 +5658,7 @@ "h": 8, "w": 12, "x": 12, - "y": 9 + "y": 33 }, "hiddenSeries": false, "id": 82, @@ -7241,7 +7241,7 @@ "h": 4, "w": 6, "x": 0, - "y": 9 + "y": 8 }, "id": 158, "interval": null, @@ -7332,7 +7332,7 @@ "h": 4, "w": 6, "x": 6, - "y": 9 + "y": 8 }, "id": 160, "interval": null, @@ -7423,7 +7423,7 @@ "h": 4, "w": 6, "x": 12, - "y": 9 + "y": 8 }, "id": 161, "interval": null, @@ -7516,7 +7516,7 @@ "h": 4, "w": 6, "x": 18, - "y": 9 + "y": 8 }, "id": 159, "interval": null, @@ -7607,7 +7607,7 @@ "h": 4, "w": 6, "x": 0, - "y": 13 + "y": 12 }, "id": 162, "interval": null, @@ -7698,7 +7698,7 @@ "h": 4, "w": 6, "x": 6, - "y": 13 + "y": 12 }, "id": 166, "interval": null, @@ -7789,7 +7789,7 @@ "h": 4, "w": 6, "x": 12, - "y": 13 + "y": 12 }, "id": 164, "interval": null, @@ -7880,7 +7880,7 @@ "h": 4, "w": 6, "x": 18, - "y": 13 + "y": 12 }, "id": 165, "interval": null, @@ -7969,100 +7969,9 @@ }, "gridPos": { "h": 4, - "w": 8, + "w": 12, "x": 0, - "y": 17 - }, - "id": 167, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "DB Read Count", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_enrolment_reconciliation_processed_enrolment_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "DB Read Count", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Processed Enrolment Count", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 17 + "y": 16 }, "id": 169, "interval": null, @@ -8113,7 +8022,7 @@ "thresholds": "", "timeFrom": null, "timeShift": null, - "title": "Retired Consumption Events Count", + "title": "Retried Consumption Events Count", "type": "singlestat", "valueFontSize": "80%", "valueMaps": [ @@ -8151,9 +8060,9 @@ }, "gridPos": { "h": 4, - "w": 8, - "x": 16, - "y": 17 + "w": 12, + "x": 12, + "y": 16 }, "id": 163, "interval": null, @@ -8234,7 +8143,7 @@ "h": 8, "w": 12, "x": 0, - "y": 21 + "y": 20 }, "hiddenSeries": false, "id": 155, @@ -8346,7 +8255,7 @@ "h": 8, "w": 12, "x": 12, - "y": 21 + "y": 20 }, "hiddenSeries": false, "id": 157, @@ -8427,7 +8336,7 @@ "type": "row" }, { - "collapsed": false, + "collapsed": true, "datasource": null, "gridPos": { "h": 1, @@ -8436,1227 +8345,1228 @@ "y": 8 }, "id": 171, - "panels": [], - "title": "Asset Enrichment", - "type": "row" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 9 - }, - "id": 172, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_total_events_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Total Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 9 - }, - "id": 173, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ + "panels": [ { - "name": "value to text", - "value": 1 + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 0, + "y": 9 + }, + "id": 172, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_total_events_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Total Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_skipped_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Skipped Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 9 - }, - "id": 174, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_image_enrichment_event_count[$__range])) + sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_video_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Total Success Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#73BF69" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 9 - }, - "id": 175, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_image_enrichment_event_count[$__range])) + sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_video_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Total Failed Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 13 - }, - "id": 178, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_image_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Image Enrichment Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 13 - }, - "id": 179, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_image_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Image Enrichment Success Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#73BF69" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 13 - }, - "id": 180, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_image_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Image Enrichment Failed Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 0, - "y": 17 - }, - "id": 181, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_video_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Video Enrichment Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 8, - "y": 17 - }, - "id": 182, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_video_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Video Enrichment Success Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#73BF69" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} - }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 4, - "w": 8, - "x": 16, - "y": 17 - }, - "id": 183, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 6, + "y": 9 + }, + "id": 173, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_skipped_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Skipped Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_video_enrichment_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Video Enrichment Failed Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "cacheTimeout": null, - "colorBackground": false, - "colorValue": true, - "colors": [ - "#73BF69", - "rgba(237, 129, 40, 0.89)", - "#d44a3a" - ], - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 12, + "y": 9 + }, + "id": 174, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_image_enrichment_event_count[$__range])) + sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_video_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Total Success Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, - "overrides": [] - }, - "format": "none", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 3, - "w": 24, - "x": 0, - "y": 21 - }, - "id": 184, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ { - "name": "value to text", - "value": 1 + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#73BF69" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 6, + "x": 18, + "y": 9 + }, + "id": 175, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_image_enrichment_event_count[$__range])) + sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_video_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Total Failed Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 13 + }, + "id": 178, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_image_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Image Enrichment Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, { - "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_video_streaming_event_count[$__range]))", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "A" - } - ], - "thresholds": "", - "timeFrom": null, - "timeShift": null, - "title": "Video Streaming Events", - "type": "singlestat", - "valueFontSize": "80%", - "valueMaps": [ + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 13 + }, + "id": 179, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_image_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Image Enrichment Success Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" + }, { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "aliasColors": { - "Failed Events": "red", - "Skipped Events": "dark-purple", - "Success Events": "yellow", - "Total Events": "green" - }, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#73BF69" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 13 + }, + "id": 180, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_image_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Image Enrichment Failed Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 24 - }, - "hiddenSeries": false, - "id": 176, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": true, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ { - "expr": "sum(flink_taskmanager_job_task_operator_asset_enrichment_success_image_enrichment_event_count) + sum(flink_taskmanager_job_task_operator_asset_enrichment_success_video_enrichment_event_count)", - "instant": false, - "interval": "", - "legendFormat": "Success Events", - "refId": "A" + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 0, + "y": 17 + }, + "id": 181, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_video_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Video Enrichment Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "expr": "sum(flink_taskmanager_job_task_operator_asset_enrichment_skipped_event_count)", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "Skipped Events", - "refId": "B" + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 8, + "y": 17 + }, + "id": 182, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_success_video_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Video Enrichment Success Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "expr": "sum(flink_taskmanager_job_task_operator_asset_enrichment_failed_image_enrichment_event_count) + sum(flink_taskmanager_job_task_operator_post_publish_failed_video_enrichment_event_count)", - "instant": false, - "interval": "", - "legendFormat": "Failed Events", - "refId": "C" + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#d44a3a", + "rgba(237, 129, 40, 0.89)", + "#73BF69" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 4, + "w": 8, + "x": 16, + "y": 17 + }, + "id": 183, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_failed_video_enrichment_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Video Enrichment Failed Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "expr": "sum(flink_taskmanager_job_task_operator_post_publish_processor_total_events_count)", - "instant": false, - "interval": "", - "legendFormat": "Total Events", - "refId": "D" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Asset Enrichment", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true + "cacheTimeout": null, + "colorBackground": false, + "colorValue": true, + "colors": [ + "#73BF69", + "rgba(237, 129, 40, 0.89)", + "#d44a3a" + ], + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "format": "none", + "gauge": { + "maxValue": 100, + "minValue": 0, + "show": false, + "thresholdLabels": false, + "thresholdMarkers": true + }, + "gridPos": { + "h": 3, + "w": 24, + "x": 0, + "y": 21 + }, + "id": 184, + "interval": null, + "links": [], + "mappingType": 1, + "mappingTypes": [ + { + "name": "value to text", + "value": 1 + }, + { + "name": "range to text", + "value": 2 + } + ], + "maxDataPoints": 100, + "nullPointMode": "connected", + "nullText": null, + "postfix": "", + "postfixFontSize": "50%", + "prefix": "", + "prefixFontSize": "50%", + "rangeMaps": [ + { + "from": "null", + "text": "N/A", + "to": "null" + } + ], + "sparkline": { + "fillColor": "rgba(31, 118, 189, 0.18)", + "full": false, + "lineColor": "rgb(31, 120, 193)", + "show": false, + "ymax": null, + "ymin": null + }, + "tableColumn": "", + "targets": [ + { + "expr": "sum(sum_over_time(flink_taskmanager_job_task_operator_asset_enrichment_video_streaming_event_count[$__range]))", + "instant": true, + "interval": "", + "legendFormat": "", + "refId": "A" + } + ], + "thresholds": "", + "timeFrom": null, + "timeShift": null, + "title": "Video Streaming Events", + "type": "singlestat", + "valueFontSize": "80%", + "valueMaps": [ + { + "op": "=", + "text": "N/A", + "value": "null" + } + ], + "valueName": "current" }, { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": false, - "dashLength": 10, - "dashes": false, - "datasource": "Flink-Prometheus", - "fieldConfig": { - "defaults": { - "custom": {} + "aliasColors": { + "Failed Events": "red", + "Skipped Events": "dark-purple", + "Success Events": "yellow", + "Total Events": "green" + }, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 24 + }, + "hiddenSeries": false, + "id": 176, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": true, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(flink_taskmanager_job_task_operator_asset_enrichment_success_image_enrichment_event_count) + sum(flink_taskmanager_job_task_operator_asset_enrichment_success_video_enrichment_event_count)", + "instant": false, + "interval": "", + "legendFormat": "Success Events", + "refId": "A" + }, + { + "expr": "sum(flink_taskmanager_job_task_operator_asset_enrichment_skipped_event_count)", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "Skipped Events", + "refId": "B" + }, + { + "expr": "sum(flink_taskmanager_job_task_operator_asset_enrichment_failed_image_enrichment_event_count) + sum(flink_taskmanager_job_task_operator_post_publish_failed_video_enrichment_event_count)", + "instant": false, + "interval": "", + "legendFormat": "Failed Events", + "refId": "C" + }, + { + "expr": "sum(flink_taskmanager_job_task_operator_post_publish_processor_total_events_count)", + "instant": false, + "interval": "", + "legendFormat": "Total Events", + "refId": "D" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Asset Enrichment", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } }, - "overrides": [] - }, - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 24 - }, - "hiddenSeries": false, - "id": 177, - "legend": { - "avg": false, - "current": true, - "max": false, - "min": false, - "show": true, - "total": false, - "values": true - }, - "lines": true, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ { - "expr": "sum(flink_taskmanager_job_task_operator_KafkaConsumer_records_lag_max { job = \"asset-enrichment-taskmanager-prometheus\" })", - "instant": false, - "interval": "", - "legendFormat": "Consumer lag", - "refId": "A" + "aliasColors": {}, + "bars": false, + "dashLength": 10, + "dashes": false, + "datasource": "Flink-Prometheus", + "fieldConfig": { + "defaults": { + "custom": {} + }, + "overrides": [] + }, + "fill": 1, + "fillGradient": 0, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 24 + }, + "hiddenSeries": false, + "id": 177, + "legend": { + "avg": false, + "current": true, + "max": false, + "min": false, + "show": true, + "total": false, + "values": true + }, + "lines": true, + "linewidth": 1, + "nullPointMode": "null", + "options": { + "dataLinks": [] + }, + "percentage": false, + "pointradius": 2, + "points": false, + "renderer": "flot", + "seriesOverrides": [], + "spaceLength": 10, + "stack": false, + "steppedLine": false, + "targets": [ + { + "expr": "sum(flink_taskmanager_job_task_operator_KafkaConsumer_records_lag_max { job = \"asset-enrichment-taskmanager-prometheus\" })", + "instant": false, + "interval": "", + "legendFormat": "Consumer lag", + "refId": "A" + } + ], + "thresholds": [], + "timeFrom": null, + "timeRegions": [], + "timeShift": null, + "title": "Asset Enrichment", + "tooltip": { + "shared": true, + "sort": 0, + "value_type": "individual" + }, + "type": "graph", + "xaxis": { + "buckets": null, + "mode": "time", + "name": null, + "show": true, + "values": [] + }, + "yaxes": [ + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + }, + { + "format": "short", + "label": null, + "logBase": 1, + "max": null, + "min": null, + "show": true + } + ], + "yaxis": { + "align": false, + "alignLevel": null + } } ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, "title": "Asset Enrichment", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } + "type": "row" } ], "refresh": false, From 00901005f94aba474586db535baae189771cae9b Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Fri, 25 Jun 2021 13:28:25 +0530 Subject: [PATCH 04/19] fix: add important comments (#2647) --- .../ansible/inventory/dev/Core/secrets.yml | 29 ++++++++++++------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/private_repo/ansible/inventory/dev/Core/secrets.yml b/private_repo/ansible/inventory/dev/Core/secrets.yml index dc1fe4f623..fbb26b0579 100644 --- a/private_repo/ansible/inventory/dev/Core/secrets.yml +++ b/private_repo/ansible/inventory/dev/Core/secrets.yml @@ -91,17 +91,12 @@ core_vault_kibana_google_client_id: # You can use the same core_vault_kibana_google_client_secret: # You can use the same outh client secret that we used for portal vault_core_url_shortner_access_token: "" # Url shortner access token if you want to shorten urls like forgot password link etc using an external service like bit.ly + +### IMPORTANT! IMPORTANT! IMPORTANT! ### +### NOTE: FOR A REAL ENVIRONMENT YOU MUST CHANGE THE BELOW VALUES TO SOMETHING VERY SECRET WHICH ONLY YOU WILL KNOW! DO NOT USE THE DEFAULTS FOR REAL ENVIRONMENTS! ### # ------------------------------------------------------------------------------------------------------------ # -# Sensible defaults which you need not change - But if you would like to change, you are free to do so -core_vault_enc_entry_password: password # encryption password for the enc service -core_vault_enc_master_pass: password # encryption password for the keys -core_vault_kibana_cookie_secret: long-secret-to-calm-entropy-gods # Cookie secret for kibana Oauth -dp_play_http_secret_key: "long-secret-to-calm-entropy-gods" # Random 32+ character string -core_vault_graph_passport_key: "long-secret-to-calm-entropy-gods" # Should be same as lp_vault_graph_passport_key from KP secrets.yml -crypto_encryption_key: "long-secret-to-calm-entropy-gods" # any crypto key of 32 bit length, used by portal to encrypt and decrypt the userDetails for forgot password flow -sunbird_api_auth_token_bot: "{{ core_vault_sunbird_api_auth_token }}" +# Sensible defaults which you need not change if you are just trying Sunbird- You should change these to something unique for real environments and not use the defaults -# Keycloak related vars core_vault_keycloak_api_management_user_password: admin core_vault_keystore_password: password # Password for encrypting data in cassandra core_vault_sunbird_sso_username: admin # Keycloak SSO username @@ -123,9 +118,21 @@ core_vault_sunbird_keycloak_user_federation_provider_id: "8460f8f8-b6bc-11eb-852 core_vault_proxy_prometheus_admin_creds: admin # Prometheus admin password core_vault_postgres_username: postgres # Postgres user name core_vault_grafana_editor_password: sunbird # Grafana editor user password + + +# ------------------------------------------------------------------------------------------------------------ # +# Sensible defaults which you need not change - But if you would like to change, you are free to do so + core_vault_grafana_dashboards_git_repo_url_with_credentails: "https://github.com/project-sunbird/grafana-dashboards.git" # Changing the sessions secret value will invalidate all existing sessions. # In order to rotate the secret without invalidating sessions, provide an array of secrets, # with the new secret as first element of the array, and followed by previous secrets. -sunbird_portal_session_secret: "long-secret-to-calm-entropy-gods" # Portal session secret -nodebb_admin_password: MySecretPassword # Nodebb admin password +sunbird_portal_session_secret: "long-secret-to-calm-entropy-gods" # Portal session secret +nodebb_admin_password: MySecretPassword # Nodebb admin password +core_vault_enc_entry_password: password # encryption password for the enc service +core_vault_enc_master_pass: password # encryption password for the keys +core_vault_kibana_cookie_secret: long-secret-to-calm-entropy-gods # Cookie secret for kibana Oauth +dp_play_http_secret_key: "long-secret-to-calm-entropy-gods" # Random 32+ character string +core_vault_graph_passport_key: "long-secret-to-calm-entropy-gods" # Should be same as lp_vault_graph_passport_key from KP secrets.yml +crypto_encryption_key: "long-secret-to-calm-entropy-gods" # any crypto key of 32 bit length, used by portal to encrypt and decrypt the userDetails for forgot password flow +sunbird_api_auth_token_bot: "{{ core_vault_sunbird_api_auth_token }}" From 59b08f10363e9373eef144978735e2ead4abfa00 Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Tue, 29 Jun 2021 14:29:51 +0530 Subject: [PATCH 05/19] feat: add post install script (#2651) * fix: add important comments * fix: checkenv * fix: print values * fix: check print * fix: color coding * fix: create post install script * fix: create post install script * fix: create post install script * fix: updated post install script * fix: updated post install script * fix: run in verbose mode * fix: updated cqlsh path * fix: silent run * fix: add new line breaks * fix: add printf and config.xml * fix: pretty format * fix: cleanup * fix: var name * fix: cleanup * fix: add subject in framework * Update post-install-script.sh fix: master category fix --- .../Core/jobs/PostInstallScript/config.xml | 107 +++ deploy/post-install-script.sh | 682 ++++++++++++++++++ pipelines/ops/post-install-script/Jenkinsfile | 11 +- 3 files changed, 792 insertions(+), 8 deletions(-) create mode 100644 deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/PostInstallScript/config.xml diff --git a/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/PostInstallScript/config.xml b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/PostInstallScript/config.xml new file mode 100644 index 0000000000..a79f67ec33 --- /dev/null +++ b/deploy/jenkins/jobs/OpsAdministration/jobs/dev/jobs/Core/jobs/PostInstallScript/config.xml @@ -0,0 +1,107 @@ + + + + false + + + false + false + + + + + proto + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>proto</i></font> from private repo Core/common.yml</b></font> + + false + + + domain_name + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>domain_name</i></font> from private repo Core/common.yml</b></font> + + false + + + core_vault_sunbird_api_auth_token + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>core_vault_sunbird_api_auth_token</i></font> from private repo Core/secrets.yml</b></font> + + false + + + private_ingressgateway_ip + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>private_ingressgateway_ip</i></font> from private repo Core/common.yml</b></font> + + false + + + learningservice_ip + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>learningservice_ip</i></font> from private repo Core/common.yml</b></font> + + false + + + core_vault_sunbird_sso_client_secret + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>core_vault_sunbird_sso_client_secret</i></font> from private repo Core/secrets.yml</b></font> + + false + + + core_vault_sunbird_google_captcha_site_key_portal + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>core_vault_sunbird_google_captcha_site_key_portal</i></font> from private repo Core/secrets.yml</b></font> + + false + + + sunbird_azure_public_storage_account_name + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>sunbird_azure_public_storage_account_name</i></font> from private repo Core/common.yml</b></font> + + false + + + cassandra + <font style="color:dimgray;font-size:14px;"><b>Value of <font style="color:DarkGreen;font-size:14px;"><i>cassandra-1</i></font> IP private repo Core/hosts</b></font> + + false + + + knowledge_platform_tag + <font style="color:dimgray;font-size:14px;"><b>Provide the value of <font style="color:DarkGreen;font-size:14px;"><a href=https://github.com/project-sunbird/knowledge-platform.git>https://github.com/project-sunbird/knowledge-platform.git</a></font> repo tag used</b></font> + + false + + + + + 0 + 0 + + false + project + false + + + + + + + 2 + + + https://github.com/keshavprasadms/sunbird-devops.git + + + + + release-3.8.0 + + + false + + + + pipelines/ops/post-install-script/Jenkinsfile + false + + + false + diff --git a/deploy/post-install-script.sh b/deploy/post-install-script.sh index e69de29bb2..bf16a26f30 100755 --- a/deploy/post-install-script.sh +++ b/deploy/post-install-script.sh @@ -0,0 +1,682 @@ +#!/bin/bash + +set -euo pipefail + +proto=$1 +domain_name=$2 +core_vault_sunbird_api_auth_token=$3 +private_ingressgateway_ip=$4 +learningservice_ip=$5 +core_vault_sunbird_sso_client_secret=$6 +core_vault_sunbird_google_captcha_site_key_portal=$7 +sunbird_azure_public_storage_account_name=$8 +cassandra=$9 +knowledge_platform_tag=${10} +forms=https://sunbirdpublic.blob.core.windows.net/installation/forms.csv +x_authenticated_token="" +organisation="" +creator="" +reviewer="" +orgadmin="" + +cassandra_forms(){ + # Import the forms into cassandra + echo -e "\e[0;32m${bold}Install cqlsh ${normal}" + pip install -U cqlsh + printf "\n" + echo -e "\e[0;32m${bold}Download forms ${normal}" + wget "$forms" + printf "\n" + echo -e "\e[0;32m${bold}Import forms ${normal}" + /var/lib/jenkins/.local/bin/cqlsh $cassandra 9042 -e "COPY qmzbm_form_service.form_data FROM 'forms.csv' WITH HEADER = true AND CHUNKSIZE = 1;" + rm forms.csv +} + +get_x_authenticated_token(){ + # Keycloak access token + printf "\n\n" + echo -e "\e[0;32m${bold}Get x-authenticated-user-token${normal}" + x_authenticated_token=$(curl -sS -XPOST "${proto}://${domain_name}/auth/realms/sunbird/protocol/openid-connect/token" \ + --header 'Content-Type: application/x-www-form-urlencoded' \ + --data-urlencode 'client_id=lms' \ + --data-urlencode "client_secret=${core_vault_sunbird_sso_client_secret}" \ + --data-urlencode 'grant_type=client_credentials' | jq -r .access_token) + echo "x_authenticated_token: ${x_authenticated_token}" +} + +create_organisation(){ + # Create one organisation as default + printf "\n\n" + echo -e "\e[0;32m${bold}Creating default organisation ${normal}" + organisation=$(curl -sS -XPOST "${proto}://${domain_name}/api/org/v1/create" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "orgName":"Sunbird Org", + "description":"Default Organisation for Sunbird", + "isRootOrg": true, + "channel": "sunbird", + "organisationType": "board", + "isTenant": true + } + }' | jq -r .result.organisationId) + echo "organisationId: ${organisation}" +} + +create_users(){ + # Create 3 users - Content Creator, Content Reviewer, Org Admin + printf "\n\n" + echo -e "\e[0;32m${bold}Creating default users for Content Creator, Content Reviewer and Org Admin ${normal}" + creator=$(curl -sS -XPOST "${proto}://${domain_name}/api/user/v1/signup" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "firstName": "creator", + "lastName": "creator", + "password": "Pass@123", + "phone": "9999911111", + "userName": "creator", + "channel": "sunbird", + "phoneVerified": true + } + }' | jq -r .result.userId) + echo "creator userid: ${creator}" + + reviewer=$(curl -sS -XPOST "${proto}://${domain_name}/api/user/v1/signup" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "firstName": "reviewer", + "lastName": "reviewer", + "password": "Pass@123", + "phone": "9999911112", + "userName": "reviewer", + "channel": "sunbird", + "phoneVerified": true + } + }' | jq -r .result.userId) + echo "reviewer userid: ${reviewer}" + + orgadmin=$(curl -sS -XPOST "${proto}://${domain_name}/api/user/v1/signup" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "firstName": "orgadmin", + "lastName": "orgadmin", + "password": "Pass@123", + "phone": "9999911113", + "userName": "orgadmin", + "channel": "sunbird", + "phoneVerified": true + } + }' | jq -r .result.userId) + echo "orgadmin userid: ${orgadmin}" +} + +assign_roles(){ + # Assign roles to user - Content Creator, Content Reviewer, Org Admin + printf "\n\n" + echo -e "\e[0;32m${bold}Assign roles for default users - Content Creator, Content Reviewer and Org Admin ${normal}" + curl -sS -XPOST "${proto}://${domain_name}/api/user/v1/role/assign" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "organisationId": "'"${organisation}"'", + "userId": "'"${creator}"'", + "roles": ["CONTENT_CREATOR"] + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/user/v1/role/assign" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "organisationId": "'"${organisation}"'", + "userId": "'"${reviewer}"'", + "roles": ["CONTENT_REVIEWER"] + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/user/v1/role/assign" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "organisationId": "'"${organisation}"'", + "userId": "'"${orgadmin}"'", + "roles": ["ORG_ADMIN"] + } + }' +} + +create_master_categories(){ + # Create the 5 master categories + printf "\n\n" + echo -e "\e[0;32m${bold}Creating master categories for board, medium, subject, gradeLevel, topic ${normal}" + curl -XPOST "http://${learningservice_ip}:8080/learning-service/framework/v3/category/master/create" -H 'Content-Type: application/json' -H "X-Channel-Id: ${organisation}" --data-raw '{"request": {"category": {"name": "board","code": "board"}}}' + curl -XPOST "http://${learningservice_ip}:8080/learning-service/framework/v3/category/master/create" -H 'Content-Type: application/json' -H "X-Channel-Id: ${organisation}" --data-raw '{"request": {"category": {"name": "medium","code": "medium"}}}' + curl -XPOST "http://${learningservice_ip}:8080/learning-service/framework/v3/category/master/create" -H 'Content-Type: application/json' -H "X-Channel-Id: ${organisation}" --data-raw '{"request": {"category": {"name": "subject","code": "subject"}}}' + curl -XPOST "http://${learningservice_ip}:8080/learning-service/framework/v3/category/master/create" -H 'Content-Type: application/json' -H "X-Channel-Id: ${organisation}" --data-raw '{"request": {"category": {"name": "gradeLevel","code": "gradeLevel"}}}' + curl -XPOST "http://${learningservice_ip}:8080/learning-service/framework/v3/category/master/create" -H 'Content-Type: application/json' -H "X-Channel-Id: ${organisation}" --data-raw '{"request": {"category": {"name": "topic","code": "topic"}}}' +} + +create_default_licenses(){ + # Create default licenses in the system + printf "\n\n" + echo -e "\e[0;32m${bold}Create default licenses ${normal}" + curl -XPOST "http://${private_ingressgateway_ip}/content/license/v3/create" -H 'Content-Type: application/json' \ + -d '{ + "request":{ + "license":{ + "name": "CC BY-NC-SA 4.0", + "description": "This license is Creative Commons Attribution-NonCommercial-ShareAlike", + "url": "https://creativecommons.org/licenses/by-nc-sa/4.0/legalcode" + } + } + }' + + curl -XPOST "http://${private_ingressgateway_ip}/content/license/v3/create" -H 'Content-Type: application/json' \ + -d '{ + "request":{ + "license":{ + "name": "CC BY-NC 4.0", + "description": "This license is Creative Commons Attribution-NonCommercial", + "url": "https://creativecommons.org/licenses/by-nc/4.0/legalcode" + } + } + }' + + curl -XPOST "http://${private_ingressgateway_ip}/content/license/v3/create" -H 'Content-Type: application/json' \ + -d '{ + "request":{ + "license":{ + "name": "CC BY-SA 4.0", + "description": "This license is Creative Commons Attribution-ShareAlike", + "url": "https://creativecommons.org/licenses/by-sa/4.0/legalcode" + } + } + }' + + curl -XPOST "http://${private_ingressgateway_ip}/content/license/v3/create" -H 'Content-Type: application/json' \ + -d '{ + "request":{ + "license":{ + "name": "CC BY 4.0", + "description": "This is the standard license of any Youtube content", + "url": "https://creativecommons.org/licenses/by/4.0/legalcode" + } + } + }' + + curl -XPOST "http://${private_ingressgateway_ip}/content/license/v3/create" -H 'Content-Type: application/json' \ + -d '{ + "request":{ + "license":{ + "name": "Standard YouTube License", + "description": "This license is Creative Commons Attribution-NonCommercial-ShareAlike", + "url": "https://www.youtube.com/" + } + } + }' +} + +create_default_channel_license(){ + # Choosing a random license from which was created in create_default_licenses() + printf "\n\n" + echo -e "\e[0;32m${bold}Assign a random default license for the organisation ${normal}" + curl -XPATCH "http://${learningservice_ip}:8080/learning-service/channel/v3/update/${organisation}" -H 'Content-Type: application/json' \ + -d '{ + "request":{ + "channel":{ + "defaultLicense":"Standard YouTube License" + } + } + }' +} + +create_other_categories(){ + # Create other category schema + printf "\n\n" + echo -e "\e[0;32m${bold}Create other categories ${normal}" + git clone https://github.com/project-sunbird/knowledge-platform.git -b ${knowledge_platform_tag} + cd knowledge-platform/definition-scripts + sed -i "s#{{host}}#http://${private_ingressgateway_ip}/taxonomy#g" * + sed -i "s#curl#curl -sS#g" * + while read -r line; do printf "\n\n" >> /tmp/all_category_create.sh && cat $line >> /tmp/all_category_create.sh; done <<< $(ls) + bash -x /tmp/all_category_create.sh + rm /tmp/all_category_create.sh +} + +system_settings(){ + # System settings to insert into cassandra + printf "\n\n" + echo -e "\e[0;32m${bold}Initialize the system settings table ${normal}" + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "custodianOrgId", + "field": "custodianOrgId", + "value": "'"${organisation}"'" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "custodianOrgChannel", + "field": "custodianOrgChannel", + "value": "sunbird" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "courseFrameworkId", + "field": "courseFrameworkId", + "value": "TPD" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "sunbird", + "field": "sunbird", + "value": "{\"helpCenterLink\":\"'${proto}':\/\/'${domain_name}'\/faq\",\"helpdeskEmail\":\"support@'${domain_name}'\"}" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "googleReCaptcha", + "field": "googleReCaptcha", + "value": "{\"key\":\"'${core_vault_sunbird_google_captcha_site_key_portal}'\", \"isEnabled\":true}" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "tncConfig", + "field": "tncConfig", + "value": "{\"latestVersion\":\"latest\",\"latest\":{\"url\":\"'${proto}':\/\/'${sunbird_azure_public_storage_account_name}'.blob.core.windows.net\/terms-and-conditions\/terms-and-conditions-v9.html#termsOfUse\"}}" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "orgAdminTnc", + "field": "orgAdminTnc", + "value": "{\"latestVersion\":\"latest\",\"latest\":{\"url\":\"'${proto}':\/\/'${sunbird_azure_public_storage_account_name}'.blob.core.windows.net\/terms-and-conditions\/terms-and-conditions-v9.html#administratorGuidelines\"}}" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "groupsTnc", + "field": "groupsTnc", + "value": "{\"latestVersion\":\"latest\",\"latest\":{\"url\":\"'${proto}':\/\/'${sunbird_azure_public_storage_account_name}'.blob.core.windows.net\/terms-and-conditions\/terms-and-conditions-v9.html#groupGuidelines\"}}" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "portalFaqURL", + "field": "portalFaqURL", + "value": "https://'${sunbird_azure_public_storage_account_name}'.blob.core.windows.net/public/portal-faq/resources/res" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "ssoCourseSection", + "field": "ssoCourseSection", + "value": "'"${organisation}"'" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "userProfileConfig", + "field": "userProfileConfig", + "value": "{\"fields\":[\"firstName\",\"lastName\",\"profileSummary\",\"avatar\",\"countryCode\",\"dob\",\"email\",\"gender\",\"grade\",\"language\",\"location\",\"phone\",\"subject\",\"userName\",\"webPages\",\"jobProfile\",\"address\",\"education\",\"skills\",\"badgeAssertions\"],\"publicFields\":[\"firstName\",\"lastName\",\"profileSummary\",\"userName\"],\"privateFields\":[\"email\",\"phone\"],\"csv\":{\"supportedColumns\":{\"NAME\":\"firstName\",\"MOBILE PHONE\":\"phone\",\"EMAIL\":\"email\",\"SCHOOL ID\":\"orgId\",\"USER_TYPE\":\"userType\",\"ROLES\":\"roles\",\"USER ID\":\"userId\",\"SCHOOL EXTERNAL ID\":\"orgExternalId\"},\"outputColumns\":{\"userId\":\"USER ID\",\"firstName\":\"NAME\",\"phone\":\"MOBILE PHONE\",\"email\":\"EMAIL\",\"orgId\":\"SCHOOL ID\",\"orgName\":\"SCHOOL NAME\",\"userType\":\"USER_TYPE\",\"orgExternalId\":\"SCHOOL EXTERNAL ID\"},\"outputColumnsOrder\":[\"userId\",\"firstName\",\"phone\",\"email\",\"organisationId\",\"orgName\",\"userType\",\"orgExternalId\"],\"mandatoryColumns\":[\"firstName\",\"userType\",\"roles\"]},\"read\":{\"excludedFields\":[\"avatar\",\"jobProfile\",\"address\",\"education\",\"webPages\",\"skills\"]},\"framework\":{\"fields\":[\"board\",\"gradeLevel\",\"medium\",\"subject\",\"id\"],\"mandatoryFields\":[\"id\"]}}" + } + }' + + curl -sS -XPOST "${proto}://${domain_name}/api/data/v1/system/settings/set" -H 'Accept: application/json' -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request":{ + "id": "orgProfileConfig", + "field": "orgProfileConfig", + "value": "{\"csv\":{\"supportedColumns\":{\"SCHOOL NAME\":\"orgName\",\"BLOCK CODE\":\"locationCode\",\"STATUS\":\"status\",\"SCHOOL ID\":\"organisationId\",\"EXTERNAL ID\":\"externalId\",\"DESCRIPTION\":\"description\"}, \"outputColumns\": {\"organisationId\":\"SCHOOL ID\",\"orgName\":\"SCHOOL NAME\",\"locationCode\":\"BLOCK CODE\",\"locationName\":\"BLOCK NAME\",\"externalId\":\"EXTERNAL ID\"}, \"outputColumnsOrder\":[\"organisationId\",\"orgName\",\"locationCode\", \"locationName\",\"externalId\"],\"mandatoryColumns\":[\"orgName\",\"locationCode\",\"status\"]}}" + } + }' +} + +create_framework(){ + # Create the default NCF framework + printf "\n\n" + echo -e "\e[0;32m${bold}Create default NCF framework ${normal}" + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": + { + "framework": + { + "name": "NCF", + "description": "NCF Framework", + "code": "NCF", + "channels": [{"identifier": "'"${organisation}"'"}] + } + } + }' +} + +create_framework_categories(){ + # Create framework categories + printf "\n\n" + echo -e "\e[0;32m${bold}Create framework categories ${normal}" + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "category": { + "name": "Board", + "code": "board" + } + } + }' + + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "category": { + "name": "Medium", + "code": "medium" + } + } + }' + + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "category": { + "name": "Subject", + "code": "subject" + } + } + }' + + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "category": { + "name": "GradeLevel", + "code": "gradeLevel" + } + } + }' +} + +create_framework_terms(){ + # Create framework terms + printf "\n\n" + echo -e "\e[0;32m${bold}Create framework terms ${normal}" + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF&category=board" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "term": { + "name": "Default Board", + "code": "defaultboard" + } + } + }' + + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF&category=medium" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "term": { + "name": "English", + "code": "english" + } + } + }' + + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF&category=subject" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "term": { + "name": "English", + "code": "english" + } + } + }' + + curl -XPOST "${proto}://${domain_name}/api/framework/v1/create?framework=NCF&category=gradeLevel" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "term": { + "name": "Class 1", + "code": "class1" + } + } + }' +} + +publish_framework(){ + # Publish the framework + printf "\n\n" + echo -e "\e[0;32m${bold}Publish framework ${normal}" + curl -XPOST "${proto}://${domain_name}/api/framework/v1/publish/NCF" -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -H "X-Channel-Id: ${organisation}" \ + -d '{}' +} + +tenant_preference(){ + # Create tenant certificate and user preference + printf "\n\n" + echo -e "\e[0;32m${bold}Create tenant certificate and user preference ${normal}" + curl -XPOST "${proto}://${domain_name}/api/org/v2/preferences/create" -H 'Content-Type: application/json' -H 'accept: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "orgId": "'"${organisation}"'", + "key": "certRules", + "data": { + "templateName": "certRules", + "action": "save", + "fields": [ + { + "code": "certTypes", + "dataType": "text", + "name": "certTypes", + "label": "Certificate type", + "description": "Select certificate", + "editable": true, + "inputType": "select", + "required": true, + "displayProperty": "Editable", + "visible": true, + "renderingHints": { + "fieldColumnWidth": "twelve" + }, + "range": [ + { + "name": "Completion certificate", + "value": { + "enrollment": { + "status": 2 + } + } + }, + { + "name": "Merit certificate", + "value": { + "score": "= 100" + } + } + ], + "index": 1 + }, + { + "code": "issueTo", + "dataType": "text", + "name": "issueTo", + "label": "Issue certificate to", + "description": "Select", + "editable": true, + "inputType": "select", + "required": true, + "displayProperty": "Editable", + "visible": true, + "renderingHints": { + "fieldColumnWidth": "twelve" + }, + "range": [ + { + "name": "All", + "value": { + "user": { + "rootid": "" + } + } + } + ], + "index": 2 + } + ] + } + } + }' +} + +create_location(){ + # Create default location + printf "\n\n" + echo -e "\e[0;32m${bold}Create a default location ${normal}" + curl -XPOST "${proto}://${domain_name}/api/data/v1/location/create" -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "code": "KA", + "name": "Karnataka", + "type": "state" + } + }' + + curl -XPOST "${proto}://${domain_name}/api/data/v1/location/create" -H 'Content-Type: application/json' \ + -H "X-Authenticated-User-Token: ${x_authenticated_token}" \ + -H "Authorization: Bearer ${core_vault_sunbird_api_auth_token}" \ + -d '{ + "request": { + "code": "BLRURBAN", + "name": "BENGALURU URBAN", + "type": "district", + "parentCode": "KA" + } + }' +} + +bold=$(tput bold) +normal=$(tput sgr0) + +echo -e "\e[0;32m${bold}User provided inputs ${normal}" +printf "\n" +echo -e "\e[0;90m${bold}proto: $proto ${normal}" +echo -e "\e[0;90m${bold}domain_name: $domain_name ${normal}" +echo -e "\e[0;90m${bold}core_vault_sunbird_api_auth_token: $core_vault_sunbird_api_auth_token ${normal}" +echo -e "\e[0;90m${bold}private_ingressgateway_ip: $private_ingressgateway_ip ${normal}" +echo -e "\e[0;90m${bold}learningservice_ip: $learningservice_ip ${normal}" +echo -e "\e[0;90m${bold}core_vault_sunbird_sso_client_secret: $core_vault_sunbird_sso_client_secret ${normal}" +echo -e "\e[0;90m${bold}core_vault_sunbird_google_captcha_site_key_portal: $core_vault_sunbird_google_captcha_site_key_portal ${normal}" +echo -e "\e[0;90m${bold}sunbird_azure_public_storage_account_name: $sunbird_azure_public_storage_account_name ${normal}" +echo -e "\e[0;90m${bold}cassandra-1: $cassandra ${normal}" +echo -e "\e[0;90m${bold}knowledge-platform-tag: $knowledge_platform_tag ${normal}" +printf "\n\n" + +cassandra_forms +get_x_authenticated_token +create_organisation +create_users +assign_roles +create_master_categories +create_default_licenses +create_default_channel_license +create_other_categories +system_settings +create_framework +create_framework_categories +create_framework_terms +publish_framework +tenant_preference +create_location + +printf "\n\n" +echo -e "\e[0;31m${bold}Please verify all the API calls are successful. If there are any failures, check the script / output and fix the issues${normal}" + +printf "\n\n" +echo -e "\e[0;31m${bold}All the API's must be successful to ensure Sunbird works as expected! ${normal}" + +printf "\n\n" +echo -e "\e[0;32m${bold}If all the API's are succcessful, you can login to Sunbird using the username and password created above ${normal}" + +printf "\n\n" +echo -e "\e[0;32m${bold}If you need more info on the API, refer to Sunbird API documentation ${normal}" diff --git a/pipelines/ops/post-install-script/Jenkinsfile b/pipelines/ops/post-install-script/Jenkinsfile index 19ed544757..4716968c9a 100644 --- a/pipelines/ops/post-install-script/Jenkinsfile +++ b/pipelines/ops/post-install-script/Jenkinsfile @@ -7,18 +7,13 @@ node() { String ANSI_YELLOW = "\u001B[33m" stage('checkout public repo') { - folder = new File("$WORKSPACE/.git") - if (folder.exists()) - { - println "Found .git folder. Clearing it.." - sh'git clean -fxd' - } + cleanWs() checkout scm } ansiColor('xterm') { stage('deploy'){ - "sh deploy/post-install-script.sh" + sh "deploy/post-install-script.sh ${params.proto} ${params.domain_name} ${params.core_vault_sunbird_api_auth_token} ${params.private_ingressgateway_ip} ${params.learningservice_ip} ${params.core_vault_sunbird_sso_client_secret} ${params.core_vault_sunbird_google_captcha_site_key_portal} ${params.sunbird_azure_public_storage_account_name} ${params.cassandra} ${params.knowledge_platform_tag}" currentBuild.result = 'SUCCESS' currentBuild.description = "Private: ${params.private_branch}, Public: ${params.branch_or_tag}" } @@ -28,4 +23,4 @@ node() { currentBuild.result = 'FAILURE' throw err } -} \ No newline at end of file +} From 486960758353b61e3d6078f757d8969868e64176 Mon Sep 17 00:00:00 2001 From: Kartheek Palla Date: Tue, 29 Jun 2021 18:07:24 +0530 Subject: [PATCH 06/19] Issue #SB-25360 fix: sms templates update (#2652) --- .../postgres-migration/files/sunbird_programs/V4.0.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql new file mode 100644 index 0000000000..9998c3446b --- /dev/null +++ b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql @@ -0,0 +1,2 @@ +UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner. Please login to https://vdn.diksha.gov.in for details." WHERE key="smsContentAccept"; +UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to https://vdn.diksha.gov.in for details." WHERE key="smsContentRequestedChanges"; From 453ac4a04814e983f46b52ed5c451f4cabc27f3c Mon Sep 17 00:00:00 2001 From: Rajesh Rajendran Date: Tue, 29 Jun 2021 12:40:46 +0000 Subject: [PATCH 07/19] Revert "Issue #SB-25360 fix: sms templates update (#2652)" (#2653) This reverts commit 486960758353b61e3d6078f757d8969868e64176. --- .../postgres-migration/files/sunbird_programs/V4.0.0.0.sql | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql deleted file mode 100644 index 9998c3446b..0000000000 --- a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner. Please login to https://vdn.diksha.gov.in for details." WHERE key="smsContentAccept"; -UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to https://vdn.diksha.gov.in for details." WHERE key="smsContentRequestedChanges"; From e60edbb5de539bd1e1c582df37ab01e9ecd93f8d Mon Sep 17 00:00:00 2001 From: Kartheek Palla Date: Tue, 29 Jun 2021 18:13:45 +0530 Subject: [PATCH 08/19] Issue #SB-25360 fix: VDN SMS templates (#2654) * Issue #SB-25360 fix: sms templates update * Issue #SB-25360 fix: sms templates update 3ec929d --- .../postgres-migration/files/sunbird_programs/V4.0.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql new file mode 100644 index 0000000000..7b4571a210 --- /dev/null +++ b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql @@ -0,0 +1,2 @@ +UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner. Please login to $url for details." WHERE key="smsContentAccept"; +UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to $url for details." WHERE key="smsContentRequestedChanges"; From ecf7a9bcb0e546f5cda99ec77259159cb72280fd Mon Sep 17 00:00:00 2001 From: Kartheek Palla Date: Wed, 30 Jun 2021 17:28:08 +0530 Subject: [PATCH 09/19] Issue #SB-25360 fix: VDN SMS templates (#2657) * Issue #SB-25360 fix: sms templates update * Issue #SB-25360 fix: sms templates update 3ec929d * Issue #SB-25360 fix: sms templates update --- .../roles/postgres-migration/files/sunbird_programs/V4.0.0.sql | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql new file mode 100644 index 0000000000..e73303c5db --- /dev/null +++ b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql @@ -0,0 +1,2 @@ +UPDATE "public"."configuration" SET value='VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner. Please login to $url for details.' WHERE key='smsContentAccept'; +UPDATE "public"."configuration" SET value='VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to $url for details.' WHERE key='smsContentRequestedChanges'; From d7ed9a3edd9cad808e0682b0bc441804c261a16c Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Wed, 30 Jun 2021 17:43:16 +0530 Subject: [PATCH 10/19] feat: corrected vars in keycloak realm (#2658) * fix: corrected vars in keycloak realm * fix: remove from all.yml --- ansible/inventory/env/group_vars/all.yml | 5 ----- .../keycloak-deploy/templates/keycloak-realm.j2 | 12 ++++++------ 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index cc0a47f274..76463665e8 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -481,11 +481,6 @@ sunbird_portal_offline_app_download_url: "" sunbird_portal_log_level: "debug" ### Release 2.2.0 ### -sunbird_google_android_keycloak_client_id: '' -sunbird_google_android_keycloak_secret: '' -sunbird_trampoline_android_keycloak_client_id: '' -sunbird_trampoline_android_keycloak_secret: '' -sunbird_android_keycloak_client_id: '' sunbird_user_org_api_base_url: http://{{sunbird_swarm_manager_lb_ip}}:9000 ### Release-2.3.0 ### diff --git a/ansible/roles/keycloak-deploy/templates/keycloak-realm.j2 b/ansible/roles/keycloak-deploy/templates/keycloak-realm.j2 index 9f85a77348..059a6dc8df 100644 --- a/ansible/roles/keycloak-deploy/templates/keycloak-realm.j2 +++ b/ansible/roles/keycloak-deploy/templates/keycloak-realm.j2 @@ -661,7 +661,7 @@ "surrogateAuthRequired": false, "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "{{ core_vault_android_secret }}", + "secret": "{{ core_vault_android_keycloak_secret }}", "redirectUris": [ "{{proto}}://{{proxy_server_name}}/oauth2callback", "{{ env }}.sunbird.app://mobile" @@ -796,7 +796,7 @@ "surrogateAuthRequired": false, "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "{{ core_vault_google_desktop_secret }}", + "secret": "{{ sunbird_google_desktop_keycloak_secret }}", "redirectUris": [ "{{proto}}://{{proxy_server_name}}/*" ], @@ -1683,7 +1683,7 @@ "surrogateAuthRequired": false, "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "{{ core_vault_google_android_secret }}", + "secret": "{{ sunbird_google_android_keycloak_secret }}", "redirectUris": [ "{{proto}}://{{proxy_server_name}}/*" ], @@ -2039,7 +2039,7 @@ "surrogateAuthRequired": false, "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "{{ core_vault_google_auth_secret }}", + "secret": "{{ core_vault_sunbird_google_keycloak_secret }}", "redirectUris": [ "{{proto}}://{{proxy_server_name}}/*" ], @@ -2427,7 +2427,7 @@ "surrogateAuthRequired": false, "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "{{ core_vault_trampoline_desktop_secret }}", + "secret": "{{ sunbird_trampoline_desktop_keycloak_secret }}", "redirectUris": [ "{{proto}}://{{proxy_server_name}}/*" ], @@ -2562,7 +2562,7 @@ "surrogateAuthRequired": false, "enabled": true, "clientAuthenticatorType": "client-secret", - "secret": "{{ core_vault_trampoline_android_secret }}", + "secret": "{{ sunbird_trampoline_android_keycloak_secret }}", "redirectUris": [ "{{proto}}://{{proxy_server_name}}/*" ], From a2cabd1fbf991474a15ffe357e9a0bcb1a045d9d Mon Sep 17 00:00:00 2001 From: Kartheek Palla Date: Wed, 30 Jun 2021 17:50:55 +0530 Subject: [PATCH 11/19] Issue #SB-25360 fix: VDN SMS templates (#2657) (#2661) --- .../postgres-migration/files/sunbird_programs/V4.0.0.0.sql | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql deleted file mode 100644 index 7b4571a210..0000000000 --- a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.0.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner. Please login to $url for details." WHERE key="smsContentAccept"; -UPDATE "public"."configuration" SET value="VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to $url for details." WHERE key="smsContentRequestedChanges"; From 8827c3f6dc02091b0e27b61a4314a35e47eefa80 Mon Sep 17 00:00:00 2001 From: Kartheek Palla Date: Wed, 30 Jun 2021 19:21:12 +0530 Subject: [PATCH 12/19] Issue #SB-25360 fix: VDN SMS templates (#2662) --- .../roles/postgres-migration/files/sunbird_programs/V4.0.0.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql index e73303c5db..89da187802 100644 --- a/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql +++ b/ansible/roles/postgres-migration/files/sunbird_programs/V4.0.0.sql @@ -1,2 +1,2 @@ UPDATE "public"."configuration" SET value='VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner. Please login to $url for details.' WHERE key='smsContentAccept'; -UPDATE "public"."configuration" SET value='VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to $url for details.' WHERE key='smsContentRequestedChanges'; +UPDATE "public"."configuration" SET value='VidyaDaan: Your Content $contentName for the project $projectName has been approved by the project owner with few changes. Please login to $url for details.' WHERE key='smsContentAcceptWithChanges'; From fd302dbd3783ab4a7885c68fd1220adeac695e3c Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Fri, 2 Jul 2021 10:27:03 +0530 Subject: [PATCH 13/19] Issue #SB-25321 feat: added additional category (#2665) --- .../stack-sunbird/templates/content-service_application.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 08d2e478e9..23febee1c9 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -568,11 +568,11 @@ objectcategorydefinition.keyspace="{{ lp_cassandra_keyspace_prefix }}_category_s channel { content{ primarycategories=["Course Assessment", "eTextbook", "Explanation Content", "Learning Resource", "Practice Question Set", "Teacher Resource", "Exam Question"] - additionalcategories=["Classroom Teaching Video", "Concept Map", "Curiosity Question Set", "Experiential Resource", "Explanation Video", "Focus Spot", "Learning Outcome Definition", "Lesson Plan", "Marking Scheme Rubric", "Pedagogy Flow", "Previous Board Exam Papers", "TV Lesson", "Textbook"] + additionalcategories=["Classroom Teaching Video", "Concept Map", "Curiosity Question Set", "Experiential Resource", "Explanation Video", "Focus Spot", "Learning Outcome Definition", "Lesson Plan", "Marking Scheme Rubric", "Pedagogy Flow", "Previous Board Exam Papers", "TV Lesson", "Textbook", "CCT", "FLN"] } collection { primarycategories=["Content Playlist", "Course", "Digital Textbook", "Question paper"] - additionalcategories=["Textbook", "Lesson Plan"] + additionalcategories=["Textbook", "Lesson Plan", "CCT", "FLN"] } asset { primarycategories=["Asset", "CertAsset", "Certificate Template"] From 6cb2da7fe4b20250a0ba37ad9da4ee4252d67101 Mon Sep 17 00:00:00 2001 From: kaliraja <34502260+Kaali09@users.noreply.github.com> Date: Fri, 2 Jul 2021 10:33:14 +0530 Subject: [PATCH 14/19] updated the neo4j build job config (#2664) * Update #0000: updated the neo4j build jenkinsfile * Update #0000: updated the flink job config --- .../KnowledgePlatform/jobs/Neo4j/config.xml | 21 +++++++++++-------- .../jobs/FlinkJobs/config.xml | 13 +++++------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/Neo4j/config.xml b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/Neo4j/config.xml index c77b00f762..db93f188a7 100644 --- a/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/Neo4j/config.xml +++ b/deploy/jenkins/jobs/Build/jobs/KnowledgePlatform/jobs/Neo4j/config.xml @@ -1,6 +1,6 @@ - + - + hudson.model.ParametersDefinitionProperty com.sonyericsson.rebuild.RebuildSettings @@ -19,7 +19,7 @@ - + false false @@ -38,7 +38,7 @@ - + 0 0 @@ -57,12 +57,12 @@ - - + + 2 - https://github.com/project-sunbird/sunbird-learning-platform.git + https://github.com/project-sunbird/knowledge-platform-db-extensions.git @@ -70,10 +70,13 @@ ${github_release_tag} + false + + - pipelines/build/neo4j/Jenkinsfile + build/neo4j-extensions/Jenkinsfile false false - \ No newline at end of file + diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml index ac54fa88ca..c58300408f 100644 --- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml +++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml @@ -97,18 +97,15 @@ return """<b>This parameter is not used</b>""" 1 +'collection-certificate-generator'] true @@ -150,7 +147,7 @@ return """<b>This parameter is not used</b>""" - ${branch_or_tag}> + ${branch_or_tag} false From 1ad27fe93aa771b8bc1275c4bd81f9894452a1fe Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Fri, 2 Jul 2021 12:27:58 +0530 Subject: [PATCH 15/19] fix: add a note for ssl change for master realm (#2666) --- private_repo/ansible/inventory/dev/Core/secrets.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/private_repo/ansible/inventory/dev/Core/secrets.yml b/private_repo/ansible/inventory/dev/Core/secrets.yml index fbb26b0579..44e6addd25 100644 --- a/private_repo/ansible/inventory/dev/Core/secrets.yml +++ b/private_repo/ansible/inventory/dev/Core/secrets.yml @@ -25,9 +25,13 @@ core_vault_sunbird_api_auth_token: # Take the jwt token of api-admin consumer fr core_vault_sunbird_sso_publickey: # Public key of keycloak sunbird realm, update this post keycloak deployment. See below for steps # SSH tunnel to the keycloak VM by running ssh -L 8080:localhost:8080 deployer@Keycloak-VM-IP # If you cannot tunnel directly to Keycloak VM, then tunnel to Jenkins first and then tunnel to Keycloak VM from jenkins +# # Go to http://localhost:8080/auth/admin/master/console/#/realms/sunbird/clients -> lms -> service account roles -> Click on client roles drop down -> Select realm-management -> Select manage-users in Available Roles -> Click on Add selected +# # Go to http://localhost:8080/auth/admin/master/console/#/realms/sunbird/keys # Click on Public Key and update the variable +# +# Go to http://localhost:8080/auth/admin/master/console/#/realms/master/login-settings and set the Require SSL to external requests adminutil_refresh_token_public_key_kid: "" # get after keycloak deployment, go to http://localhost:8080/auth/admin/master/console/#/realms/sunbird/keys and use the Kid of the RS256 token From 7925931e0edc638912d604e769c9283dffe11607 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Fri, 2 Jul 2021 15:39:05 +0530 Subject: [PATCH 16/19] Issue #SB-25321 feat: updated content service config (#2667) --- .../stack-sunbird/templates/content-service_application.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index 23febee1c9..c88db8f5f0 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -568,11 +568,11 @@ objectcategorydefinition.keyspace="{{ lp_cassandra_keyspace_prefix }}_category_s channel { content{ primarycategories=["Course Assessment", "eTextbook", "Explanation Content", "Learning Resource", "Practice Question Set", "Teacher Resource", "Exam Question"] - additionalcategories=["Classroom Teaching Video", "Concept Map", "Curiosity Question Set", "Experiential Resource", "Explanation Video", "Focus Spot", "Learning Outcome Definition", "Lesson Plan", "Marking Scheme Rubric", "Pedagogy Flow", "Previous Board Exam Papers", "TV Lesson", "Textbook", "CCT", "FLN"] + additionalcategories= {{ content_additional_categories | default('["Classroom Teaching Video", "Concept Map", "Curiosity Question Set", "Experiential Resource", "Explanation Video", "Focus Spot", "Learning Outcome Definition", "Lesson Plan", "Marking Scheme Rubric", "Pedagogy Flow", "Previous Board Exam Papers", "TV Lesson", "Textbook"]'}} } collection { primarycategories=["Content Playlist", "Course", "Digital Textbook", "Question paper"] - additionalcategories=["Textbook", "Lesson Plan", "CCT", "FLN"] + additionalcategories={{ collection_additional_categories | default('["Textbook", "Lesson Plan"]'}} } asset { primarycategories=["Asset", "CertAsset", "Certificate Template"] From 77814513c58e24e1720723a521278f82c531c552 Mon Sep 17 00:00:00 2001 From: Kumar Gauraw Date: Fri, 2 Jul 2021 18:04:28 +0530 Subject: [PATCH 17/19] Issue #SB-25321 fix: corrected service config (#2668) --- .../stack-sunbird/templates/content-service_application.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ansible/roles/stack-sunbird/templates/content-service_application.conf b/ansible/roles/stack-sunbird/templates/content-service_application.conf index c88db8f5f0..88ef369dc9 100644 --- a/ansible/roles/stack-sunbird/templates/content-service_application.conf +++ b/ansible/roles/stack-sunbird/templates/content-service_application.conf @@ -568,11 +568,11 @@ objectcategorydefinition.keyspace="{{ lp_cassandra_keyspace_prefix }}_category_s channel { content{ primarycategories=["Course Assessment", "eTextbook", "Explanation Content", "Learning Resource", "Practice Question Set", "Teacher Resource", "Exam Question"] - additionalcategories= {{ content_additional_categories | default('["Classroom Teaching Video", "Concept Map", "Curiosity Question Set", "Experiential Resource", "Explanation Video", "Focus Spot", "Learning Outcome Definition", "Lesson Plan", "Marking Scheme Rubric", "Pedagogy Flow", "Previous Board Exam Papers", "TV Lesson", "Textbook"]'}} + additionalcategories= {{ content_additional_categories | default('["Classroom Teaching Video", "Concept Map", "Curiosity Question Set", "Experiential Resource", "Explanation Video", "Focus Spot", "Learning Outcome Definition", "Lesson Plan", "Marking Scheme Rubric", "Pedagogy Flow", "Previous Board Exam Papers", "TV Lesson", "Textbook"]')}} } collection { primarycategories=["Content Playlist", "Course", "Digital Textbook", "Question paper"] - additionalcategories={{ collection_additional_categories | default('["Textbook", "Lesson Plan"]'}} + additionalcategories={{ collection_additional_categories | default('["Textbook", "Lesson Plan"]')}} } asset { primarycategories=["Asset", "CertAsset", "Certificate Template"] From 126940d9a08172731b2f7aa46be048ecf55e71c1 Mon Sep 17 00:00:00 2001 From: Keshav Prasad Date: Mon, 5 Jul 2021 10:50:32 +0530 Subject: [PATCH 18/19] fix: move defaults to all.yml (#2671) --- ansible/inventory/env/group_vars/all.yml | 8 ++++++++ private_repo/ansible/inventory/dev/Core/common.yml | 9 +-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/ansible/inventory/env/group_vars/all.yml b/ansible/inventory/env/group_vars/all.yml index 76463665e8..c0c88c3bef 100644 --- a/ansible/inventory/env/group_vars/all.yml +++ b/ansible/inventory/env/group_vars/all.yml @@ -578,3 +578,11 @@ cassandra_cluster_size: "{{ groups['cassandra'] | length }}" # If you're using any other mail server provider, override this value in common.yaml. mail_server_username: "apikey" bootstrap_namespace: "{{ env }},flink-{{ env }},flink-kp-{{ env }}" + +# Keycloak related variables +sunbird_google_android_keycloak_client_id: google-auth-android +sunbird_android_keycloak_client_id: android +sunbird_desktop_keycloak_client_id: desktop +sunbird_google_desktop_keycloak_client_id: google-auth-desktop +sunbird_trampoline_android_keycloak_client_id: trampoline-android +sunbird_trampoline_desktop_keycloak_client_id: trampoline-desktop diff --git a/private_repo/ansible/inventory/dev/Core/common.yml b/private_repo/ansible/inventory/dev/Core/common.yml index 2cf6f5fa33..17286f141c 100644 --- a/private_repo/ansible/inventory/dev/Core/common.yml +++ b/private_repo/ansible/inventory/dev/Core/common.yml @@ -71,13 +71,6 @@ azure_plugin_storage_account_key: "{{sunbird_public_storage_account_key}}" plugin_container_name: "{{sunbird_content_azure_storage_container}}" kp_schema_base_path: "{{proto}}://{{sunbird_public_storage_account_name}}.blob.core.windows.net/{{plugin_container_name}}/schemas/local" -# Keycloak related variables -sunbird_google_android_keycloak_client_id: google-auth-android -sunbird_android_keycloak_client_id: android -sunbird_desktop_keycloak_client_id: desktop -sunbird_google_desktop_keycloak_client_id: google-auth-desktop -sunbird_trampoline_android_keycloak_client_id: trampoline-android -sunbird_trampoline_desktop_keycloak_client_id: trampoline-desktop keycloak_api_management_user_email: "admin@sunbird.org" sunbird_installation_email: "admin@sunbird.org" @@ -199,4 +192,4 @@ kong_all_consumer_groups: kong_consumers: - username: api-admin groups: "{{ kong_all_consumer_groups }}" - state: present \ No newline at end of file + state: present From a4887f4f608ab0d46b7ac12b9dbcfac47211020d Mon Sep 17 00:00:00 2001 From: keshavprasadms Date: Mon, 5 Jul 2021 11:18:52 +0530 Subject: [PATCH 19/19] fix: add auto-creator-v2 for kp flink --- .../jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml index c58300408f..1ea5b8a6c2 100644 --- a/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml +++ b/deploy/jenkins/jobs/Deploy/jobs/dev/jobs/KnowledgePlatform/jobs/FlinkJobs/config.xml @@ -105,7 +105,8 @@ return """<b>This parameter is not used</b>""" 'audit-event-generator', 'audit-history-indexer', 'collection-cert-pre-processor', -'collection-certificate-generator'] +'collection-certificate-generator', +'auto-creator-v2'] true