234 Commits

Author SHA1 Message Date
3c487f988b Added cron job to deployment documentation 2019-05-24 10:40:38 +02:00
b08428ed50 Cross-platform support for sed command 2018-12-11 18:14:06 +01:00
b22d860f91 Update LATEST_SCHEMA_VERSION to 2 2018-12-11 15:56:00 +01:00
5dc82fdb17 Docs: Make port number consistent 2018-12-11 15:55:23 +01:00
7b92e87edd Rename example.sh to submit_benchmark.sh 2018-12-11 15:53:00 +01:00
5b8088bf77 Use TCP/IP sockets instead of UNIX sockets for uWSGI
The UNIX sockets sometimes timed out, so this is a test to see if TCP/IP
sockets work better.
2018-11-07 12:49:50 +01:00
5fc27be7b5 Fixed deleting not-yet-synced benchmarks 2018-11-07 11:32:43 +01:00
b1aeb6f064 Logging improvements 2018-11-07 11:32:27 +01:00
c1adc6cdca Formatting 2018-11-07 11:32:10 +01:00
314fd015ee Reduced timeout between NginX and uWSGI + lowered uWSGI max-requests
This is an attempt to figure out/fix the timeouts between My Data and
Open Data.
2018-11-07 11:06:58 +01:00
b7b10f225c Some more useful commands in bash_history 2018-11-07 11:06:09 +01:00
00d127c91f Upgraded blender-id-oauth-client 0.7 → 0.8 2018-11-07 10:49:09 +01:00
d83468c5fb Added example crontab 2018-11-06 18:31:28 +01:00
563c96dc8f mark manage-{my,open}data.sh as executable 2018-11-06 18:31:28 +01:00
61042e3bff Linux fix 2018-11-06 18:31:28 +01:00
1d56da62fd docker/deploy → docker/staging
For clarity, and to be in sync with what we do in the Blender Dev Fund
website.
2018-11-06 18:31:28 +01:00
bb61c93773 Reworked Docker image into two parts
This is the same approach as used in the Blender Dev Fund site. The
heavy/time-consuming installation of dependencies is done in the base image,
and the project files are contained in the final image.
2018-11-06 17:40:42 +01:00
e2a4698f6e Create database index on Benchmark.date_created
We use this field as default sort field, so an index should speed things up
in the admin.
2018-11-06 17:30:31 +01:00
4ad9bdf8ca Add missing migration 2018-11-06 17:25:36 +01:00
a41d5c1465 Remove trailing spaces 2018-11-06 17:13:51 +01:00
f4ae15b790 Admin tweaks for benchmarks 2018-11-06 17:12:31 +01:00
7abf9dc8a4 Queue submissions to Open Data when it's unreachable 2018-11-06 17:12:20 +01:00
d9b48a6e90 Migrate from custom oauth module to blender-id-oauth-client
The blender-id-oauth-client project was actually born from the My Data
oauth module, so the database layout is pretty similar. However, since
migration with the Django migration system is hard to get right (because
of ordering issues, we'd need the blender-id-oauth-client migrations to
be dependent on MyData migrations, which would break compatibility with any
other project), some manual intervention is necessary; see the README for
this.
2018-11-06 11:52:31 +01:00
eeab6784f8 Made unittests less dependent on local configuration 2018-11-06 11:52:31 +01:00
254cf59d7b Tweaks to prep_elastic.sh
Ensure creation of deploy directory and make sed -i work on macOS.
2018-10-21 13:51:36 +02:00
76810437bc Deleted one line too many 2018-10-09 18:17:13 +02:00
aa2a1f1e75 No longer copy docker-compose.yml to server
It's now managed independently of this project, as it is a cross-project
file.
2018-10-09 17:38:05 +02:00
de1e24b916 Updated REMOTE_DOCKER_COMPOSE_DIR 2018-10-09 17:37:25 +02:00
31c5253274 Remove TLS from docker image in favour of letting Træfik handle it 2018-10-09 16:58:59 +02:00
4ef9fff8b7 Linux fix 2018-10-09 16:58:59 +02:00
9dba25e9a9 Address concerns raised in rBMD74e3f65e8fbf 2018-09-09 18:20:38 +02:00
8b19bcbf78 Cleanly shut down uwsgi when stopping the docker container + nginx last
Stopping nginx last should keep the friendly '502 bad gateway' page
available for as long as possible before shutting down completely.

Stopping uwsgi cleanly should prevent OSErrors trying to write somewhere
while docker is being shut down.
2018-08-29 09:20:50 +02:00
fb7f3c5ed7 deploy.sh: check whether Docker is alive before doing anything else 2018-08-29 09:10:52 +02:00
f2a9e690a8 Forward REMOTE_ADDR as X-Forwarded-For header to Open Data
This will allow us to see the original address for the original request
in the Open Data Sentry logs.
2018-08-29 08:54:46 +02:00
bfbb99634f Added note about why we check the client version way before using it 2018-08-29 08:53:50 +02:00
2122c601b8 Use Requests session to submit to opendata
This ensures that we can reuse the HTTPS connection and don't need TCP/IP
and TLS handshakes for every single submission. It also allows auto-
retrying if there are any hickups.
2018-08-29 08:53:35 +02:00
807b239836 Updated example.sh to work on current mydata 2018-08-28 15:31:04 +02:00
7c4cd3960e Added Raven to Pipefile for Sentry.io integration 2018-08-28 13:07:03 +02:00
369b9b98cf Use pathlib and BASE_DIR in example Raven configuration 2018-08-28 13:04:31 +02:00
5250b653f3 Support multiple schema versions; introduces Benchmark schema v2
Since the validation and possible schema upgrades are done at the Open
Data side, there isn't much to change here.
2018-08-28 12:44:55 +02:00
954a4d4700 Use Django asserts 2018-08-27 08:51:59 +02:00
81fcd88936 Extend tests for benchmark deletion 2018-08-27 08:51:59 +02:00
bdfd6b1b27 Extend description of ConnectionError handling message 2018-08-27 08:51:59 +02:00
ba7add96a6 Display samples not deleted only if they exist 2018-08-27 08:51:59 +02:00
4d06bbdc51 Add utility methods to AbstractBenchmarkTest
Methods to bulk add benchmarks and to mock the
deletion response from Open Data.
2018-08-27 08:51:59 +02:00
1419236ddf Add test docstring 2018-08-27 08:51:59 +02:00
f5f3aa06e6 Extend test_benchmark_deletion 2018-08-27 08:51:59 +02:00
a9d80ac497 Wrap lines at 100 chars 2018-08-27 08:51:59 +02:00
74e3f65e8f Improve samples deletion 2018-08-27 08:51:59 +02:00
c43a7460e6 Improve javascript utilities
Move xhr related functions in dedicated js files.
2018-08-27 08:51:59 +02:00