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

53 Коммитов

Автор SHA1 Сообщение Дата
Andrew Williamson 6aebb99b1f
remove support for django1.11 and python2 (#11195) 2019-04-15 15:17:10 +01:00
Mathieu Pillard 842c9af0bf Fix building docker images for dev with Django 2.2 2019-03-27 15:05:12 +01:00
Andrew Williamson ec4ac13ad7
deploy django22 on -dev & defaul on local dev (#11025) 2019-03-27 11:37:52 +00:00
Mathieu Pillard 19e782a96d Stop building Python 2 images 2019-03-25 11:55:09 +01:00
Andrew Williamson 6fdf5bb9bf switch local dev to python3 2019-02-08 21:54:35 +08:00
Mathieu Pillard 3b2a5855e7
Generate and use /static/js/i18n/{locale}.js instead of using a dynamic view (#10372)
Generate and use /static/js/i18n/{locale}.js instead of using a dynamic view
2019-01-15 11:49:31 +01:00
Christopher Grebs 298bce99a0
Remove explicit npm installation for deployment dockerfile too.
Follow-up for 8f7331bed7
2019-01-02 14:34:42 +01: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
Andrew Williamson 1003752412
deploy prod_py2.txt instead of prod.txt (#9390) 2018-09-10 16:14:43 +01:00
bqbn f922c5e1f2
Upgrade to use node 8 (#9188) 2018-08-17 10:35:25 -07:00
Christopher Grebs 1bf79b82fa
Fold jingo_minify into our code.
This will simplify the upgrade to Django 1.11 and allow us to keep this
under control, upstream isn't properly maintained.

* Cleanup jingo-minify, keep only parts we are using. Cleanup tests

Also fix and simplify compress_assets to link to the correct /static/ folder.

Originally we hardcoded to look for settings.STATIC_ROOT but that
doesn't suffice since it's set to /site-static/ by default.

We are now using hardcoding the source of our static files instead of
guessing and mistakenly re-using STATIC_ROOT.

This commit also removes verbosity as an argument and simply logs all
errors immediately.

To simplify testing it adds a --force parameter.

To verify this works locally:

* Change settings.STATIC_ROOT to `'/site-static/`'
* Add `/site-static/` to the folders served by nginx (I'll open an issue
on our nginx container to serve this by default too)
* You may have to restart the nginx container after that for nginx to
pick things up
* Remove everything inside site-static folder
* Run `make update_assets`

Fixes #8532
2018-07-09 16:14:42 +02:00
Christopher Grebs 812d885b64
Revert "Fold jingo_minify into our code (#8694)"
This reverts commit 762142ee5a.
2018-07-05 15:19:07 +02:00
Christopher Grebs 762142ee5a
Fold jingo_minify into our code (#8694)
This will simplify the upgrade to Django 1.11 and allow us to keep this
under control, upstream isn't properly maintained.

* Copies jingo-minify into our code
* Removed all parts we aren't using (yui, git integration, `{{ inline_css }}` template tag etc)
* Try to clean up how subprocess calls are being made
* Cleaned up tests

This doesn't change anything regarding how jingo-minify works. It's still using good old `cat` and other ugly things but the code now looks nicer.

See 742297fef9 for more specific details about the cleanup from the original jingo-minify dump.

Fixes #8532
2018-07-02 11:14:53 +02:00
Christopher Grebs ceae9d4fd0
Remove cache machine (#8606)
Fixes #7743
2018-06-28 13:20:06 +02:00
Philip Cristiano 4f4c6a4dbf dockerfile: Add uwsgi-dogstatsd in the right place 2018-04-27 15:24:37 -04:00
Philip Cristiano 4e936d281a dockerfile: Add uwsgi-dogstatsd
This will allow more metrics to be collected for uwsgi when deployed
2018-04-27 11:41:12 -04:00
Andrew Williamson 3faf451dca
remove Stylus (#7820) 2018-03-19 22:19:31 +08:00
Mathieu Pillard 3ff221a52a Run new image uploads through pngcrush, add a command to handle existing ones
Icons and previews for both themes and non-themes should go through pngcrush.
For the existing content, the command `crush_images_for_top_addons` focuses
on the content displayed on landing pages only and should only be run once.
2018-02-27 01:52:45 +01: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
Andrew Williamson c05e4cfdf1
Generate static theme Preview on version submit (#7475) 2018-02-14 22:27:16 +08: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 2239e8483e docker: Fix Debian build issue for python package
Explained best at https://github.com/pypa/virtualenv/issues/410

Debian bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=783738
2018-01-29 12:55:37 -05:00
Philip Cristiano 807420bf16 docker: Include uwsgi plugin 2018-01-29 12:21:03 -05:00
Philip Cristiano ceb36b5890 docker: Include uwsgi
And link from the Centos location to allow for puppet to remain the same for the time being. 

It can change later to support Debian after this is deployed
2018-01-29 09:51:00 -05:00
Philip Cristiano 916547d2b5 docker: Update deploy to use Docker Python image
Similar to the last commit, apply this for the deploy image
2018-01-22 16:12:25 -05:00
Christopher Grebs 57410ab97e Pin all our dependencies, including pip, six, ipython and ipdb. (#6663)
* Pin all our dependencies, including pip, six, ipython and ipdb.

This removes all dynamically installed python packages from the
installation pipeline and should result in a cleaner system install.

Fixes #6001

* Cleanup docs, prod and merge a few dependencies with system.

* Move more dependencies from prod to system :-/

* Finally fix docs task
2017-10-13 06:29:40 +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
Andrew Williamson 7d489fc1b6 point make to the correct file in Dockerfile.deploy (#5642)
We don't do `touch /addons-server-centos7-container` in .deploy so the Makefile can't detect we're in the container.
2017-06-15 13:51:51 +01:00
Andrew Williamson aa2f179578 use npm for just jquery (#5530) 2017-06-01 12:32:58 +01:00
Christopher Grebs e3e020d3a1 Install six before we upgrade setuptools. (#5541)
* Install six before we upgrade setuptools.

See pypa/setuptools#964 for a few more details. Currently quite a few
travis and circleci jobs are failing because of that.

* Explicitly upgrade pip and setuptools in 'make update_deps' so for travis too.

* Potentially fix circleci

* Fix setuptools and potentially docs environments

* More explicitly install six and setuptools

* Add more requirements for docs

* Add pyparsing dependency
2017-06-01 19:20:12 +08:00
Andrew Williamson 677f00a3df revert all of use npm for js libs (#5523) 2017-05-30 17:08:30 +01:00
Andrew Williamson 2af008a479 use npm for js libs (#5485) 2017-05-30 13:09:31 +01:00
Mathieu Pillard cefb50b529 Avoid relying on git commit id to generate the assets build id 2017-03-29 17:49:30 +02:00
bqbn b64c26cd05 Remove nodesource.rep. We install node 6 from EPEL. (#4984) 2017-03-20 17:13:22 -07: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 d6f9eb9ba5 Use the version.json file generated by CircleCI (#4543)
Remove the logic that pull the version tag from local git repo. This is
no longer needed now that the build pipeline is moved to pipeline v2.
2017-02-01 10:06:06 -08:00
Christopher Grebs f42f51f8b7 fix(package): update clean-css to version 4.0.2 (#4504)
* fix(package): update clean-css to version 4.0.2

With v4.0 clean-css has split it's command line tools into a separate
package.

Closes #4475

* fix paths
2017-01-30 14:18:06 +01:00
bqbn 8cbdefa01a Use CIRCLE_TAG for version when available (#4246)
CircleCI fails to pull the tag sometimes. But the tag is always passed
to CircleCI by GitHub and is recorded in the CIRCLE_TAG environment
variable.
2017-01-10 09:35:43 -08:00
bqbn 7d9c3ebbc6 Generate version.json in circle.yml for pipeline v2 (#4168)
Also copy the generated file to /app/version.json in Docker.deploy so it
complies with pipeline v2 standard.
2016-12-22 12:42:41 -08:00
Jason Thomas cee688ef06 Do not run yum update during docker build 2016-12-13 13:12:12 -05:00
Jason Thomas f811d043a7 compile locale definition files for utf-8 2016-12-13 13:00:15 -05:00
wezhou 98978435ab Remove settings_local.pyc file
Remove settings_local.pyc along with settings_local.py. Both are build
time temporary files.
2016-10-31 21:35:21 -07:00
bqbn 926761ea13 Fix syntax error in version.json file (#3734)
Should be using double quotes in JSON file instead of single quotes.
2016-10-12 09:18:00 -07:00
bqbn 1e18c7708e Fix bugzilla-1305466, wrong file ownership (#3638)
Environment variable UWSGI_GID makes uwsgi override the command line
--gid option, causing files written by the containers having wrong group
ownership of "uwsgi".

We don't need the uwsgi group specifically defined inside containers
because the containers are going to be run as olympia user and olympia
group anyways.

This change also requires that puppet-config to change the group ownership
of some shared directories such as /var/run/uwsgi to be "olympia".
2016-09-29 10:39:38 -07:00
Jason Thomas c36550074d
Fix SOURCE in Dockerfile.deploy 2016-09-27 18:35:56 -04:00
bqbn b229205f02 Disable cache when building python modules (#3628)
This helps reduce the size of the image by a couple hundred MB.
2016-09-27 15:09:20 -07:00
bqbn 2398074a67 Add mysql client so that dbshell mgmt cmd works (#3431) 2016-09-07 08:14:43 -07:00
bqbn b77b287f5b Bump uwsgi version to 2.0.13 (#3334)
EPEL replaced version 2.0.12 with 2.0.13, which broke the yum install
command.
2016-08-24 09:55:06 -07: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