Граф коммитов

58 Коммитов

Автор SHA1 Сообщение Дата
Mathieu Pillard 42f26f29dc
Switch to Node.js 18.x (#21400) 2023-11-06 16:48:52 +01:00
Mathieu Pillard 550a4a4754
Build local mysql apt mirror to work around upstream repo breakage (#21018)
* Build local mysql apt mirror to work around upstream repo breakage
2023-07-19 13:18:05 +02:00
Mathieu Pillard 5c0e7a3c88
Merge deployment and development Dockerfiles (#20480)
* Merge deployment and development Dockerfiles
* Stop using root to install dependencies
* Run make commands from os with --user olympia
2023-03-23 15:46:56 +01:00
Mathieu Pillard 3f83f99131
Remove old update service (#20086)
* Remove old update service

* Remove more code/docs associated with services/

* Add some missing pytest.mark.django_db that the autouse fixture was hiding...

* Remove extra import

* Add a comment documenting what the update URL typically looks like
2022-12-12 12:45:11 +01:00
Mathieu Pillard e906a7f6bf
Switch to Node 16 by default (#19751)
* Switch to Node 16 by default

* Fix python image tag to include node
2022-10-04 19:28:59 +02:00
Andrew Williamson 21e06a38e6
limits all our logging to 10MB per log, with one backup (#19677) 2022-09-08 15:23:15 +01:00
Mathieu Pillard 41d4eba243
Upgrade pygit2 to 1.10.0, remove libgit2-dev dependency (#19570)
We shouldn't need libgit2-dev anymore (and it outdated anyway) because
the latest pygit2 versions provide precompiled wheels that match our
setup.
2022-08-17 10:18:46 +02:00
Mathieu Pillard 79120c148f
Run watchmedo through supervisor in local envs instead of through uwsgi (#19513)
* Run watchmedo through supervisor in local envs instead of through uwsgi

This should prevent a storm of watchmedo processes when there are changes,
as this should keep the same long-lived watchmedo process instead of
spawning new ones.

Also, watch a specific file instead of the whole directory to avoid
reloads when just opening a shell (since bash_history is written to
the artifacts dir)

* add reload file to git, run on with /code/

* Watch /code/src for both celery and uwsgi

* Keep safe-pidfile
2022-07-27 17:53:51 +02:00
Mathieu Pillard 6ad03404b0
Limit number of celery workers in local envs to 2 (#19375) 2022-06-16 18:49:30 +02:00
Mathieu Pillard 8c2e3cdd07
Re-implement update service in Django (#19322)
Re-implement update service in Django

Lives in parallel for now - the switch between the 2 will happen through nginx config changes.
2022-06-07 15:09:17 +02:00
Mathieu Pillard 6b5e175a49
Introduce minimal config to make versioncheck works locally (#19045)
This is nicer than having to remember to look up the docs to
do it manually, make it work with docker etc. It works out of
the box.
2022-03-31 13:19:57 +02:00
Mathieu Pillard 0047612d29
Serve xpis through addons server (#18978)
* Import addons-nginx into addons-server

* Serve xpis through X-Accel-Redirect instead of redirecting to dedicated domain

The so called "CDN URLs" for files are less useful now that even AMO main domain
is behind a CDN, and we want to move away from it because internally it exposes
paths on EFS that nginx is serving directly, making directory structure changes
difficult.

This commit focuses on the download_file/download_latest endpoints
addons-server exposes, and leaves the old dedicated CDN domain intact for the
moment - it is still used by the update service but will go away in a future
commit.

* Few fixes and test updates

* filename is an optional argument

* Test fixes

* Add assertions about caching

* Fix latest url

* Rename type_ to download_type

* reformat url definition
2022-03-16 15:19:47 +01:00
Mathieu Pillard 676b4b2576
Update MySQL releases GPG key (#18636)
Per
https://dev.mysql.com/downloads/repo/apt/
https://dev.mysql.com/doc/refman/8.0/en/checking-gpg-signature.html
2022-01-18 12:03:57 +01:00
bqbn bc56293027
Upgrade Node to v14 (#17475)
Fix #17331
2021-07-13 12:07:45 +02:00
William Durand 319d2063ba
Remove unused mysql config (#16080) 2020-12-02 14:14:15 +01:00
Mathieu Pillard 09030e01bb
Use MySQL client & libs, not MariaDB (#15932)
We're using MySQL 8.0 from MySQL, not MariaDB, so client libs should
follow for consistency - especially as MariaDB doesn't support the
default auth method MySQL 8 uses.

Also contains a slight refactor of the Dockerfile-s to have fewer
steps and be more consistent with each other.
2020-11-06 12:20:43 +01:00
bqbn 6ad8f3c63a
Upgrade node version to v12 (#15549)
Co-authored-by: William Durand <will+git@drnd.me>
2020-09-23 12:08:46 +02:00
William Durand 728925609b
Fix wrong mimetype for ts files (#15102) 2020-07-29 12:04:12 +02:00
William Durand 09bbe0a616
Refactor get_mime_type_for_blob() (#14211) 2020-05-11 11:52:34 +02:00
championshuttler 5e8bac4991 Remove unused file after migrating to Debian Buster Image 2020-04-23 00:50:26 +05:30
championshuttler d17bc0b389 Upgrade docker image to latest Debian Buster 2020-04-20 18:17:55 +05:30
William Durand 57e7dffe7a
Update pygit2 to 1.1.1 (#13925) 2020-04-08 11:54:04 +02:00
William Durand e7b906b290
Revert "Update pygit2 to 1.1.1 (#13921)" (#13924)
This reverts commit 1107b0a00c.
2020-04-07 19:00:50 +02:00
William Durand 1107b0a00c
Update pygit2 to 1.1.1 (#13921) 2020-04-07 18:11:25 +02:00
Christopher Grebs 62a0f78daf
Fix uwsgi.ini syntax error caused by broken merge. 2020-03-12 10:11:18 +01:00
Christopher Grebs b4ceb66311 Revert "Move to a rolling debian-testing release for libmagic and libg… (#13488)"
This reverts commit d0272a9b3a.
2020-02-18 17:51:34 +01:00
Christopher Grebs d0272a9b3a
Move to a rolling debian-testing release for libmagic and libg… (#13488)
* Move to a rolling debian-testing release for libmagic and libgit2

Fixes #13487
Unblocks #13391

And at least refs #12924, #12357 (these need further testing)

* Roll back temporary change
2020-02-18 11:15:17 +01:00
Christopher Grebs dcc103af6e
Fix uwsgi autoreload (#12316)
* Move CI envvar definition to selenium override config.

This should fix autoreload.

* Actually use  to be more explicit

* Disable integration tests

* Try out different approach

* Add docs, move back the variable definition to docker-compose.yml

* Update comment
2019-09-12 14:05:33 +02:00
Benjamin Forehand Jr 0e3725f031
Add additional docker compose 'ups' (#12058)
* Add additional docker compose 'ups'

* Trying to disable autoreload.

* Try disabling autoreload via env variable.

* Added docker compose changes.

* Change image name.
2019-08-08 11:57:45 -05:00
Christopher Grebs b34c8e3102
Fix uwsgi autoreload. (#11992)
* Fix uwsgi autoreload.

This will scan python modules for modifications every 3 seconds. It most
certainly will still be more efficient than Django's autoreload.

Fixes #11990

* re-add vaccum

* Use watchmedo to reload properly
2019-08-05 11:44:29 +02:00
Christopher Grebs d118b4d9d5
Link to olympia.wsgi:application 2019-07-19 13:46:17 +02:00
Christopher Grebs 8a3882a8cd Configure and use uwsgi instead of runserver. 2019-07-18 19:11:04 +02:00
Christopher Grebs cd86316dc2
Update 'file' version to fix json<->html detection for reviewe… (#11690)
* Update 'file' version to fix json<->html detection for reviewer api.

Fixes #11534

* Add fixture file

* Rollback to xenial, install libmagic-dev manually

* Add libmagic1 dependency too

* test amd64

* Add required libmagic-mgc dependency

* Add explaining comment

* Try out using ubuntu disco sources for libmagic installation

* Force installation from the disco repo.
2019-06-25 05:04:56 -07:00
bqbn 3d6ce3cf45 Upgrade to node 10 (#10431) 2019-01-17 19:12:51 +08:00
Christopher Grebs d6e85cea5a
Add pygit2 dependency. (#9497)
* Add debian stretch backports repo as discussed with @autrilla
* Add libgit2-dev dependency that's needed by pygit2 (via debian stretch
to get the proper version that's required by up-to-date pygit2)
* Add pygit 0.27.1

Fixes #9496
2018-09-24 13:15:49 +02:00
Christopher Grebs 9a5d4ae9d2
Remove old rpm-based repository files. 2018-08-21 16:34:30 +02:00
bqbn f922c5e1f2
Upgrade to use node 8 (#9188) 2018-08-17 10:35:25 -07:00
Benjamin Forehand Jr 9747bb84fe
Updated UI tests to use the new AMO frontend. (#7565)
* Uses addons-frontend docker image to create an instance of the new frontend.
* Add testing for both mobile and desktop resolutions.
2018-03-01 14:05:40 -08:00
Christopher Grebs 07dee02dde
Use docker-compose restart instead of supervisorctl.
* Make also use of setting PYTHONDONTWRITEBYTECODE inside the docker
  image to reduce it's size considerably
* Remove some outdated code-parts
* Rename `olympia` inside our worker image to `olympia-worker`
* remove all build and cache folders after every `make update_deps`
  (which might help avoid any more package update/install ambiquities)

Fixes #7518
2018-02-19 17:47:51 +01:00
Philip Cristiano cb51f696df Revert "Merge pull request #7432 from mozilla/revert-docker-changes"
Revert for local work and eventual merge, once this is fixed.

This reverts commit 5307f487a7, reversing
changes made to 49389bd642.
2018-02-05 09:30:36 -05:00
Christopher Grebs 22f864bd14
Revert our centos -> debian docker image changes.
Revert "docker: Fix Debian build issue for python package"

This reverts commit 2239e8483e.

Revert "docker: Include uwsgi plugin"

This reverts commit 807420bf16.

Revert "docker: Include uwsgi"

This reverts commit ceb36b5890.

Revert "docker: Update deploy to use Docker Python image"

This reverts commit 916547d2b5.

Revert "docker: Remove ‘centos’ from docker-indicating file"

This reverts commit d34b92e0e8.

Revert "docker: Update build to use Docker Python image"

This reverts commit b08b51375d.
2018-01-29 19:38:04 +01:00
Philip Cristiano b08b51375d docker: Update build to use Docker Python image
This provides an updated Python (2.7.14) as part of
https://bugzilla.mozilla.org/show_bug.cgi?id=1390789

The Docker images are not based on Centos so package
names needed to be updated. Comparable packages were
added, but may not contain the same versions or even
components.
2018-01-22 16:12:25 -05:00
Christopher Grebs 176383b168 Upgrade to Celery 4 (#6667)
* Update celery, config and dependencies to 4.x

* Remove usage of TaskSet, replace with group(), update `ampq`
* Enable redis on travis for better celery 4.x testing
* Fix lib/celery_tests
* Correct test testing email sending retrying on errors
* Fix celery subtask mocking errors.

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Ensure dependencies are updated for worker and web container.

* Restart all services after the dependency update

* Remove explicit celery loader environment variable.

* Restart all services in web and worker after running 'update_docker'

* Increase sleep time a bit
2017-10-16 11:16:41 +02:00
Mathieu Pillard 43d88b4f55 Revert "Upgrade to Celery 4 (#6625)"
This reverts commit 541688d5f2.

This caused some breakage on dev. We suspect it's because newrelic
hooks into the celery task launching code but does not support
celery 4.x yet.
2017-10-13 00:04:27 +02:00
Christopher Grebs 541688d5f2 Upgrade to Celery 4 (#6625)
* Update celery config to seamlessly upgrade to 4.x

* Update celery initialization for new configs and 4.x

* Update dependencies to celery 4.x

* Fix flake8

* Fix typo

* Remove usage of TaskSet, replace with group(), update `ampq`

* Enable redis on travis for better celery 4.x testing

* Fix more test setting names

* Fix lib/celery_tests

* Correct test testing email sending retrying on errors

* Fix celery subtask mocking errors.

* Fix new line

* Fix celery broker url env variable

* Integrate watchdog for celery autoreload

* Try something weird... ui-tests

* do we need extra hosts?

* more sleep?

* Try logging, try docker run to avoid port collisions

* More debugging

* Cleanup again

* Fix logs?

* Ensure dependencies are updated for worker and web container.

* Remove not functioning log saving for onw

* Restart all services after the dependency update
2017-10-12 21:05:21 +02:00
Christopher Grebs 97342f6a86
Unify and set mysqld collation settings to utf-8.
Fixes #6183
2017-08-17 09:18:06 +02:00
bqbn 8826016c01 Add back nodesource v6 repo (#6036)
* Revert "Remove old node 4 repo"

This reverts commit 7d221f0814.

* Add back nodesource v6 repo

We need to use nodesource v6 repo for latest security fixes. EPEL updates
are often delayed.
2017-07-28 13:51:18 -07:00
Andreas Wagner 7d221f0814 Remove old node 4 repo 2017-05-10 14:40:11 +02:00
Rémy HUBSCHER 75f057c578 Use jingo-minify 0.6.0 release. (#4732)
* Use jingo-minify 0.6.0 release.

* Use a newer version of git.

* @EnTeQuAk review.

* @jasonthomas review.

* Too many spaces.
2017-02-28 14:35:30 +01:00
bqbn 20e136ee53 Dockerfile.deploy adds EPEL repo (#3309)
This repo is needed in order to install uwsgi.
2016-08-22 12:23:17 -07:00