From 4d8f6e141be4b40573d3c3ebf0b0518872cda5f7 Mon Sep 17 00:00:00 2001 From: ankitshahu Date: Fri, 8 Dec 2023 14:08:42 +0530 Subject: [PATCH 1/2] saving changes --- ansible/roles/stack-sunbird/templates/ml-core-service.env | 6 +++++- ansible/roles/stack-sunbird/templates/ml-survey-service.env | 6 ++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ansible/roles/stack-sunbird/templates/ml-core-service.env b/ansible/roles/stack-sunbird/templates/ml-core-service.env index 56313ff44f..eb469832c1 100755 --- a/ansible/roles/stack-sunbird/templates/ml-core-service.env +++ b/ansible/roles/stack-sunbird/templates/ml-core-service.env @@ -69,4 +69,8 @@ KAFKA_GROUP_ID={{ml_core_kafka_group_id | default("ml-core-service")}} PROGRAM_USERS_JOINED_TOPIC={{ml_core_program_users_joined_topic | default (env_name+".programuser.info")}} #TimeOffset with respect to UTC -TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC={{ml_core_timezone_diffrenece_between_local_time_and_utc | default ("+05:30")}} \ No newline at end of file +TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC={{ml_core_timezone_diffrenece_between_local_time_and_utc | default ("+05:30")}} + + +#Validate Entities enable/Disable +VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}} \ No newline at end of file diff --git a/ansible/roles/stack-sunbird/templates/ml-survey-service.env b/ansible/roles/stack-sunbird/templates/ml-survey-service.env index ccda45606e..51f5828455 100644 --- a/ansible/roles/stack-sunbird/templates/ml-survey-service.env +++ b/ansible/roles/stack-sunbird/templates/ml-survey-service.env @@ -65,3 +65,9 @@ KEYCLOAK_PUBLIC_KEY_PATH={{ml_survey_keycloak_public_key_path|default("keycloak- ## portal url of env APP_PORTAL_BASE_URL={{ proto }}://{{ domain_name }} + +#Program join enable/disable +PROGRAM_JOIN_ON_OFF={{ml_program_join_on_off | default ("ON")}} + +#validate entities enable/disable +VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}} From e42b310a6c146f92c1d3c7d88e1ac639d37f1c2b Mon Sep 17 00:00:00 2001 From: ankitshahu Date: Mon, 19 Feb 2024 20:26:17 +0530 Subject: [PATCH 2/2] added Upload api endpoint in public kong --- ansible/roles/kong-api/defaults/main.yml | 21 +++++++++++++++++++ .../templates/ml-core-service.env | 5 ++++- 2 files changed, 25 insertions(+), 1 deletion(-) diff --git a/ansible/roles/kong-api/defaults/main.yml b/ansible/roles/kong-api/defaults/main.yml index 6090bfff0f..837c208319 100644 --- a/ansible/roles/kong-api/defaults/main.yml +++ b/ansible/roles/kong-api/defaults/main.yml @@ -8237,6 +8237,27 @@ kong_apis: config.required: false config.enabled: false +- name: uploadFileToCloud + uris: "{{ cloud_service_prefix }}/mlcore/v1/files/upload" + upstream_url: "{{ ml_core_service_url }}/v1/cloud-services/files/upload" + strip_uri: true + plugins: + - name: jwt + - name: cors + - "{{ statsd_pulgin }}" + - name: acl + config.whitelist: + - cloudUrlsCreate + - name: rate-limiting + config.policy: local + config.hour: "{{ medium_rate_limit_per_hour }}" + config.limit_by: credential + - name: request-size-limiting + config.allowed_payload_size: "{{ small_request_size_limit }}" + - name: opa-checks + config.required: false + config.enabled: false + - name: listPlatformPrograms uris: "{{ user_extension_prefix }}/mlcore/v1/programsByPlatformRoles" upstream_url: "{{ ml_core_service_url }}/v1/user-extension/programsByPlatformRoles" diff --git a/ansible/roles/stack-sunbird/templates/ml-core-service.env b/ansible/roles/stack-sunbird/templates/ml-core-service.env index eb469832c1..91861d991b 100755 --- a/ansible/roles/stack-sunbird/templates/ml-core-service.env +++ b/ansible/roles/stack-sunbird/templates/ml-core-service.env @@ -73,4 +73,7 @@ TIMEZONE_DIFFRENECE_BETWEEN_LOCAL_TIME_AND_UTC={{ml_core_timezone_diffrenece_bet #Validate Entities enable/Disable -VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}} \ No newline at end of file +VALIDATE_ENTITIES={{ml_service_validate_entities | default ("ON")}} + +#Public base url of sunbird +PUBLIC_BASE_URL={{ml_core_public_base_url | default("")}} \ No newline at end of file