Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions playbooks/discussions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
- name: Deploy discussions MFE Frontend
hosts: all
become: True
gather_facts: True
vars:
ENABLE_NEWRELIC: False
CLUSTER_NAME: 'discussions'
MYMFE_ENABLED: True
MYMFE_SANDBOX_BUILD: False
roles:
- role: mfe
MFE_NAME: discussions
MFE_VERSION: '{{ DISCUSSIONS_MFE_VERSION }}'
- role: splunkforwarder
when: COMMON_ENABLE_SPLUNKFORWARDER
- role: newrelic_infrastructure
when: COMMON_ENABLE_NEWRELIC_INFRASTRUCTURE
6 changes: 5 additions & 1 deletion playbooks/edx_continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@
- oraclejdk
- elasticsearch
- opensearch
- forum
- role: forum
when: FORUM_USE_CS_COMMENTS_SERVICE | default(false)
- { role: "xqueue", update_users: True }
- edx_ansible
- analytics_api
Expand Down Expand Up @@ -82,6 +83,9 @@
- role: mfe
MFE_NAME: learner-dashboard
when: LEARNER_DASHBOARD_MFE_ENABLED
- role: mfe
MFE_NAME: discussions
when: DISCUSSIONS_MFE_ENABLED | default(false)
- { role: oauth_client_setup, when: edxapp_containerized is defined and not edxapp_containerized }
- role: datadog
when: COMMON_ENABLE_DATADOG
Expand Down
3 changes: 2 additions & 1 deletion playbooks/roles/edx_ansible/templates/update.j2
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ IFS=","
<repo> - must be one of edx-platform, edx-workers, xqueue, cs_comments_service, credentials, configuration,
read-only-certificate-code, edx-analytics-data-api, edx-ora2, insights, ecommerce, discovery,
video_web_frontend, video_delivery_worker, veda_pipeline_worker, video_encode_worker, veda_ffmpeg,
registrar, program_console, learner_portal, prospectus, authn, payment, learning, ora_grading, enterprise_catalog
registrar, program_console, learner_portal, prospectus, authn, payment, learning, discussions, ora_grading, enterprise_catalog
<version> - can be a commit or tag
<extra_vars> - specify extra_vars to any of the ansible plays with the -e switch and then ecaptulating your vars in "double quotes"
example: update <repo> <version> -e "-e 'hallo=bye' -e 'bye=hallo'"
Expand Down Expand Up @@ -81,6 +81,7 @@ repos_to_cmd["prospectus"]="$edx_ansible_cmd prospectus.yml -e 'PROSPECTUS_VERSI
repos_to_cmd["authn"]="$edx_ansible_cmd authn_frontend.yml -e 'AUTHN_MFE_VERSION=$2'"
repos_to_cmd["payment"]="$edx_ansible_cmd payment.yml -e 'PAYMENT_MFE_VERSION=$2'"
repos_to_cmd["learning"]="$edx_ansible_cmd learning.yml -e 'LEARNING_MFE_VERSION=$2'"
repos_to_cmd["discussions"]="$edx_ansible_cmd discussions.yml -e 'DISCUSSIONS_MFE_VERSION=$2'"
repos_to_cmd["course_authoring"]="$edx_ansible_cmd course_authoring.yml -e 'COURSE_AUTHORING_MFE_VERSION=$2'"
repos_to_cmd["library_authoring"]="$edx_ansible_cmd library_authoring.yml -e 'COURSE_AUTHORING_MFE_VERSION=$2'"
repos_to_cmd["ora_grading"]="$edx_ansible_cmd ora_grading.yml -e 'ORA_GRADING_MFE_VERSION=$2'"
Expand Down
4 changes: 4 additions & 0 deletions playbooks/roles/edxapp/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1122,6 +1122,9 @@ EDXAPP_DASHBOARD_COURSE_LIMIT: null
# Completion Aggregator URL needed for progress bar
EDXAPP_COMPLETION_AGGREGATOR_URL: null

# Discussion microfrontend URL
EDXAPP_DISCUSSIONS_MICROFRONTEND_URL: null

#-------- Everything below this line is internal to the role ------------

#Use YAML references (& and *) and hash merge <<: to factor out shared settings
Expand Down Expand Up @@ -1722,6 +1725,7 @@ lms_env_config:
ACCOUNT_MICROFRONTEND_URL: "{{ EDXAPP_ACCOUNT_MICROFRONTEND_URL }}"
PROGRAM_CONSOLE_MICROFRONTEND_URL: "{{ EDXAPP_PROGRAM_CONSOLE_MICROFRONTEND_URL}}"
LEARNING_MICROFRONTEND_URL: "{{ EDXAPP_LEARNING_MICROFRONTEND_URL}}"
DISCUSSIONS_MICROFRONTEND_URL: "{{ EDXAPP_DISCUSSIONS_MICROFRONTEND_URL }}"
DCS_SESSION_COOKIE_SAMESITE: "{{ EDXAPP_DCS_SESSION_COOKIE_SAMESITE }}"
DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL: "{{ EDXAPP_DCS_SESSION_COOKIE_SAMESITE_FORCE_ALL }}"

Expand Down
15 changes: 15 additions & 0 deletions playbooks/roles/edxapp/tasks/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -618,3 +618,18 @@
tags:
- manage
- manage:db

- name: create forum v2 waffle flags
shell: >
. /edx/app/edxapp/edxapp_env &&
/edx/app/edxapp/venvs/edxapp/bin/python ./manage.py lms --settings=production
waffle_flag --create --everyone {{ item }}
args:
chdir: /edx/app/edxapp/edx-platform
loop:
- discussions.enable_forum_v2
- forum_v2.enable_mysql_backend
- discussions.enable_discussions_mfe
- discussions.override_discussion_legacy_settings
- discussions.pages_and_resources_mfe
- discussions.enable_new_structure_discussions
2 changes: 1 addition & 1 deletion playbooks/roles/launch_ec2/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
with_nested:
- "{{ ec2.instances }}"
- ['studio', 'ecommerce', 'preview', 'discovery', 'credentials', 'veda', 'analytics-api', 'registrar', 'program-console',
'learner-portal', 'prospectus', 'authn', 'payment', 'license-manager', 'learning', 'enterprise-catalog', 'ora-grading',
'learner-portal', 'prospectus', 'authn', 'payment', 'license-manager', 'learning', 'discussions', 'enterprise-catalog', 'ora-grading',
'course-authoring','library-authoring', 'commerce-coordinator', 'edx-exams', 'subscriptions', 'profile', 'learner-dashboard']

- name: Add new instance to host group
Expand Down
17 changes: 16 additions & 1 deletion util/jenkins/ansible-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,14 @@ if [[ -z $learning_version ]]; then
LEARNING_MFE_VERSION="master"
fi

if [[ -z $discussions ]]; then
discussions="${forum:-false}"
fi

if [[ -z $discussions_version ]]; then
DISCUSSIONS_MFE_VERSION="master"
fi

if [[ -z $ora_grading ]]; then
ora_grading="false"
fi
Expand Down Expand Up @@ -465,6 +473,12 @@ LEARNING_MFE_VERSION: $learning_version
LEARNING_MFE_ENABLED: $learning
LEARNING_SANDBOX_BUILD: True

DISCUSSIONS_NGINX_PORT: 80
DISCUSSIONS_SSL_NGINX_PORT: 443
DISCUSSIONS_MFE_VERSION: $discussions_version
DISCUSSIONS_MFE_ENABLED: $discussions
DISCUSSIONS_SANDBOX_BUILD: True

ORA_GRADING_NGINX_PORT: 80
ORA_GRADING_SSL_NGINX_PORT: 443
ORA_GRADING_MFE_VERSION: $ora_grading_version
Expand Down Expand Up @@ -586,6 +600,7 @@ EDXAPP_ECOMMERCE_PUBLIC_URL_ROOT: "https://ecommerce-${deploy_host}"
EDXAPP_ECOMMERCE_API_URL: "https://ecommerce-${deploy_host}/api/v2"
EDXAPP_DISCOVERY_API_URL: "https://discovery-${deploy_host}/api/v1"
EDXAPP_COURSE_CATALOG_API_URL: "{{ EDXAPP_DISCOVERY_API_URL }}"
EDXAPP_DISCUSSIONS_MICROFRONTEND_URL: "https://discussions-${deploy_host}"

ANALYTICS_API_LMS_BASE_URL: "https://{{ EDXAPP_LMS_BASE }}/"

Expand Down Expand Up @@ -717,7 +732,7 @@ EOF
fi

declare -A deploy
plays="prospectus edxapp forum ecommerce credentials discovery enterprise_catalog analyticsapi xqueue certs demo testcourses registrar program_console learner_portal"
plays="prospectus edxapp ecommerce credentials discovery enterprise_catalog analyticsapi xqueue certs demo testcourses registrar program_console learner_portal"

for play in $plays; do
deploy[$play]=${!play}
Expand Down
Loading