This repository has been archived by the owner on Aug 21, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 132
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update to running docker containers that are built using the configuration repo. Run all tests on the container with the new code cross mounted. Remove the old shell scripts used to setup analytics-data-api and run acceptance tests.
- Loading branch information
Showing
10 changed files
with
126 additions
and
130 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
version: "2.1" | ||
|
||
services: | ||
es: | ||
image: elasticsearch:1.5.2 | ||
analytics_api: | ||
image: edxops/analytics_api:${DATA_API_VERSION:-latest} | ||
container_name: analytics_api | ||
environment: | ||
ELASTICSEARCH_LEARNERS_HOST: 'http://es:9200/' | ||
ELASTICSEARCH_LEARNERS_INDEX: 'learner' | ||
ELASTICSEARCH_LEARNERS_UPDATE_INDEX: 'index_update' | ||
command: /edx/app/analytics_api/venvs/analytics_api/bin/python /edx/app/analytics_api/analytics_api/manage.py runserver 0.0.0.0:80 | ||
insights: | ||
image: edxops/insights:latest | ||
container_name: insights_testing | ||
volumes: | ||
- ..:/edx/app/insights/edx_analytics_dashboard | ||
command: tail -f /dev/null | ||
environment: | ||
# Pull these from the host environment. | ||
TRAVIS_BRANCH: | ||
TRAVIS_PULL_REQUEST: | ||
DATADOG_API_KEY: | ||
# Rest of the environment variables for testing. | ||
API_SERVER_URL: http://analytics_api/api/v0 | ||
API_AUTH_TOKEN: edx | ||
LMS_HOSTNAME: lms | ||
LMS_PASSWORD: pass | ||
LMS_USERNAME: user | ||
ENABLE_AUTO_AUTH: "True" | ||
ENABLE_OAUTH_TESTS: "False" | ||
ENABLE_ERROR_PAGE_TESTS: "False" | ||
DISPLAY_LEARNER_ANALYTICS: "True" | ||
depends_on: | ||
- "es" | ||
- "analytics_api" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash -xe | ||
. /edx/app/insights/venvs/insights/bin/activate | ||
. /edx/app/insights/nodeenvs/insights/bin/activate | ||
|
||
cd /edx/app/insights/insights | ||
|
||
coverage xml | ||
|
||
bash ./scripts/build-stats-to-datadog.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash -xe | ||
. /edx/app/insights/venvs/insights/bin/activate | ||
. /edx/app/insights/nodeenvs/insights/bin/activate | ||
|
||
apt update | ||
apt install -y xvfb language-pack-en firefox # gettext | ||
|
||
# Need firefox 46 specifically, later versions don't work with Karma(frontend testing library). | ||
curl -O https://ftp.mozilla.org/pub/firefox/releases/46.0/linux-x86_64/en-US/firefox-46.0.tar.bz2 | ||
tar xvf firefox-46.0.tar.bz2 | ||
mv -f firefox /opt | ||
mv -f /usr/bin/firefox /usr/bin/firefox_default | ||
ln -s /opt/firefox/firefox /usr/bin/firefox | ||
|
||
cd /edx/app/insights/edx_analytics_dashboard | ||
export PATH=$PATH:$PWD/node_modules/.bin | ||
|
||
# Make it so bower can run without sudo. | ||
# https://github.com/GeoNode/geonode/pull/1070 | ||
echo '{ "allow_root": true }' > /root/.bowerrc | ||
|
||
make develop | ||
make migrate | ||
|
||
# Compile assets and run validation | ||
make static_no_compress | ||
make validate_translations | ||
make validate | ||
make generate_fake_translations | ||
|
||
# The following tests need insights running. We have to do it here | ||
# because we can't run the production version without rsyslog | ||
# and we can't run `runserver` until after the development requiremnts | ||
# have been installed(This is not generally true but insights needs nose | ||
# to startup runserver.) | ||
/edx/bin/python.insights /edx/bin/manage.insights runserver 0.0.0.0:9000 --noreload --traceback > dashboard.log 2>&1 & | ||
xvfb-run make accept | ||
xvfb-run make a11y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.