Closed Bug 1176044 Opened 9 years ago Closed 9 years ago

Unify MozReview virtualenvs

Categories

(MozReview Graveyard :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gps, Assigned: gps)

Details

Attachments

(7 files)

prod, dev, and the Docker container all create the MozReview virtualenv differently. We should unify things so the environments are more consistent.
ansible/reviewboard-admin: don't install Djblets through easy_install

Djblets has been added to requirements.txt. So this was redundant and
possibly undermined peep's tampering protections.
Attachment #8624415 - Flags: review?(smacleod)
ansible: extract MozReview virtualenv creation to own role (bug 1176044)

This functionality is shared by the admin server, dev server, and
Docker. But it is mostly duplicated 3 times. Establish a shared role to
hold the logic. We base it on the reviewboard-admin copy of the code
because it is the most well implemented. Since we took the
reviewboard-admin code, refactor it to use the new role.
Attachment #8624416 - Flags: review?(smacleod)
ansible/mozreview-virtualenv: work without Mozilla Yum repo

python-virtualenv and the nodejs-* packages were being installed from
Mozilla's Yum repository. This repository isn't accessible inside
Docker. In order to use this role from there, we need to install these
packages through other means.

Configure the system to use the Node package repository and install
lessc and uglify-js via npm. Install virtualenv from source.
Attachment #8624417 - Flags: review?(smacleod)
ansible/mozreview-virtualenv: install peep from local copy

We don't trust the network.
Attachment #8624418 - Flags: review?(smacleod)
ansible/mozreview-virtualenv: install Review Board via pip

Review Board has wheels now. Install via pip/peep instead of
easy_install so we get tampering protection.

While we are here, fix up the global options in the requirements.txt
file.
Attachment #8624419 - Flags: review?(smacleod)
ansible/reviewboard-dev: use the mozreview-virtualenv role (bug 1176044)

The dev server now uses the same virtualenv as production.
Attachment #8624420 - Flags: review?(smacleod)
ansible/docker-rbweb: use mozreview-virtualenv role (bug 1176044)

The role handles installing the dependency packages. So we remove this
code.
Attachment #8624421 - Flags: review?(smacleod)
Comment on attachment 8624415 [details]
MozReview Request: ansible/reviewboard-admin: don't install Djblets through easy_install

https://reviewboard.mozilla.org/r/11689/#review10145

Ship It!
Attachment #8624415 - Flags: review?(smacleod) → review+
Comment on attachment 8624416 [details]
MozReview Request: ansible: extract MozReview virtualenv creation to own role (bug 1176044)

https://reviewboard.mozilla.org/r/11691/#review10147

::: ansible/roles/mozreview-virtualenv/tasks/main.yml:38
(Diff revision 1)
> +  command: "{{ venv }}/bin/easy_install ReviewBoard==2.0.17"

Can we stick the RB version in a variable somewhere?
Attachment #8624416 - Flags: review?(smacleod) → review+
Attachment #8624417 - Flags: review?(smacleod) → review+
Comment on attachment 8624417 [details]
MozReview Request: ansible/mozreview-virtualenv: work without Mozilla Yum repo

https://reviewboard.mozilla.org/r/11693/#review10149

Ship It!
https://reviewboard.mozilla.org/r/11691/#review10151

> Can we stick the RB version in a variable somewhere?

I'm going to drop this since the final state of the series has the Review Board version occurring in exactly one place: the requirements.txt file.
Comment on attachment 8624418 [details]
MozReview Request: ansible/mozreview-virtualenv: install peep from local copy

https://reviewboard.mozilla.org/r/11695/#review10153

Ship It!
Attachment #8624418 - Flags: review?(smacleod) → review+
Comment on attachment 8624419 [details]
MozReview Request: ansible/mozreview-virtualenv: install Review Board via pip

https://reviewboard.mozilla.org/r/11697/#review10155

Ship It!
Attachment #8624419 - Flags: review?(smacleod) → review+
https://reviewboard.mozilla.org/r/11691/#review10157

> I'm going to drop this since the final state of the series has the Review Board version occurring in exactly one place: the requirements.txt file.

Came back to do just that and you'd already done it :)
Attachment #8624420 - Flags: review?(smacleod) → review+
Comment on attachment 8624420 [details]
MozReview Request: ansible/reviewboard-dev: use the mozreview-virtualenv role (bug 1176044)

https://reviewboard.mozilla.org/r/11699/#review10159

Ship It!
Comment on attachment 8624421 [details]
MozReview Request: ansible/docker-rbweb: use mozreview-virtualenv role (bug 1176044)

https://reviewboard.mozilla.org/r/11701/#review10161

Ship It!
Attachment #8624421 - Flags: review?(smacleod) → review+
Assignee: nobody → gps
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: