Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

Insights-configuration for docker #976

Merged
merged 6 commits into from
Nov 3, 2022
Merged
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ dev.shell.analyticsapi:
docker exec -it edx.devstack.analyticsapi env TERM=$(TERM) /edx/app/analytics_api/devstack.sh open

dev.shell.insights:
docker-compose exec insights env TERM=$(TERM) bash -c 'eval $$(source /edx/app/insights/insights_env; echo PATH="$$PATH";) && /edx/app/insights/devstack.sh open'
docker-compose exec insights env TERM=$(TERM) bash -c 'eval $$(source /edx/app/insights/insights_env; echo PATH="$$PATH";) && /bin/bash'
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have removed the devstack.sh file usage in the newer image.
Essentially the file was running these commands in this step:

    . /edx/app/insights/nodeenvs/insights/bin/activate
    . /edx/app/insights/venvs/insights/bin/activate
    cd /edx/app/insights/insights

    /bin/bash

We have already done all these above steps by setting the WORKDIR in docker image and also putting the nodeenv and python virtual env in path.


dev.shell.%: ## Run a shell on the specified service's container.
docker-compose exec $* /bin/bash
Expand Down
58 changes: 58 additions & 0 deletions configuration_files/insights.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
---

APPLICATION_NAME: Insights
BACKEND_SERVICE_EDX_OAUTH2_PROVIDER_URL: http://edx.devstack.lms:18000/oauth2
CACHES:
default:
BACKEND: django.core.cache.backends.memcached.MemcachedCache
KEY_PREFIX: default_env-default_deployment-insights
LOCATION:
- edx.devstack.memcached:11211
CDN_DOMAIN: null
CMS_COURSE_SHORTCUT_BASE_URL: http://edx.devstack.lms:18000/course
COURSE_API_URL: http://edx.devstack.lms:18000/api/courses/v1/
CSRF_COOKIE_NAME: insights_csrftoken
CSRF_COOKIE_SECURE: false
DATABASES:
default:
ENGINE: django.db.backends.mysql
HOST: edx.devstack.mysql
NAME: dashboard
PASSWORD: secret
PORT: '3306'
USER: rosencrantz
DATA_API_AUTH_TOKEN: edx
DATA_API_URL: http://edx.devstack.analyticsapi:18100/api/v0
DOCUMENTATION_LOAD_ERROR_URL: http://127.0.0.1/en/latest/Reference.html#error-conditions
EMAIL_HOST: smtp.example.com
EMAIL_HOST_PASSWORD: mail_password
EMAIL_HOST_USER: mail_user
EMAIL_PORT: 587
ENABLE_AUTO_AUTH: true
GRADING_POLICY_API_URL: http://edx.devstack.lms:18000/api/grades/v1/
HELP_URL: http://127.0.0.1/en/latest
LANGUAGE_CODE: en-us
LANGUAGE_COOKIE_NAME: insights_language
LEARNER_API_LIST_DOWNLOAD_FIELDS: null
LMS_COURSE_SHORTCUT_BASE_URL: URL_FOR_LMS_COURSE_LIST_PAGE
MODULE_PREVIEW_URL: http://edx.devstack.lms:18000/xblock
OPEN_SOURCE_URL: http://set-me-please
PLATFORM_NAME: edX
PRIVACY_POLICY_URL: http://example.com/privacy-policy
RESEARCH_URL: https://www.edx.org/research-pedagogy
SECRET_KEY: YOUR_SECRET_KEY_HERE
SEGMENT_IGNORE_EMAIL_REGEX: null
SEGMENT_IO_KEY: YOUR_KEY
SESSION_COOKIE_NAME: insights_sessionid
SESSION_EXPIRE_AT_BROWSER_CLOSE: false
SOCIAL_AUTH_REDIRECT_IS_HTTPS: false
SOCIAL_AUTH_EDX_OAUTH2_ISSUER: http://localhost:18000
SOCIAL_AUTH_EDX_OAUTH2_URL_ROOT: http://edx.devstack.lms:18000
SOCIAL_AUTH_EDX_OAUTH2_PUBLIC_URL_ROOT: http://localhost:18000
SOCIAL_AUTH_EDX_OAUTH2_LOGOUT_URL: http://localhost:18000/logout
STATICFILES_DIRS:
- /edx/app/insights/edx_analytics_dashboard/analytics_dashboard/static
STATIC_ROOT: /edx/var/insights/staticfiles
SUPPORT_EMAIL: ''
TERMS_OF_SERVICE_URL: http://example.com/terms-service
TIME_ZONE: UTC
5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -483,7 +483,9 @@ services:
DB_PASSWORD: password
LMS_HOST: http://localhost:18000
DJANGO_SETTINGS_MODULE: analytics_dashboard.settings.devstack
image: edxops/insights:${OPENEDX_RELEASE:-latest}
ANALYTICS_DASHBOARD_CFG: /edx/etc/insights.yml
image: edxops/insights-dev:${OPENEDX_RELEASE:-latest}
working_dir: /edx/app/insights/insights
networks:
default:
aliases:
Expand All @@ -492,6 +494,7 @@ services:
- "18110:18110"
volumes:
- /edx/var/insights/
- ${PWD}/configuration_files/insights.yml:/edx/etc/insights.yml

analyticsapi:
image: edxops/analytics_api:${OPENEDX_RELEASE:-latest}
Expand Down