Unify MozReview virtualenvs

RESOLVED FIXED

Status

MozReview
General
RESOLVED FIXED
3 years ago
2 years ago

People

(Reporter: gps, Assigned: gps)

Tracking

Details

MozReview Requests

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(7 attachments)

(Assignee)

Description

3 years ago
prod, dev, and the Docker container all create the MozReview virtualenv differently. We should unify things so the environments are more consistent.
(Assignee)

Comment 1

3 years ago
Created attachment 8624415 [details]
MozReview Request: ansible/reviewboard-admin: don't install Djblets through easy_install

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)
(Assignee)

Comment 2

3 years ago
Created attachment 8624416 [details]
MozReview Request: ansible: extract MozReview virtualenv creation to own role (bug 1176044)

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)
(Assignee)

Comment 3

3 years ago
Created attachment 8624417 [details]
MozReview Request: ansible/mozreview-virtualenv: work without Mozilla Yum repo

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)
(Assignee)

Comment 4

3 years ago
Created attachment 8624418 [details]
MozReview Request: ansible/mozreview-virtualenv: install peep from local copy

ansible/mozreview-virtualenv: install peep from local copy

We don't trust the network.
Attachment #8624418 - Flags: review?(smacleod)
(Assignee)

Comment 5

3 years ago
Created attachment 8624419 [details]
MozReview Request: ansible/mozreview-virtualenv: install Review Board via pip

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)
(Assignee)

Comment 6

3 years ago
Created attachment 8624420 [details]
MozReview Request: ansible/reviewboard-dev: use the mozreview-virtualenv role (bug 1176044)

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)
(Assignee)

Comment 7

3 years ago
Created attachment 8624421 [details]
MozReview Request: ansible/docker-rbweb: use mozreview-virtualenv role (bug 1176044)

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!
(Assignee)

Comment 11

3 years ago
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)

Comment 17

3 years ago
https://hg.mozilla.org/hgcustom/version-control-tools/rev/55eea0294ae1
https://hg.mozilla.org/hgcustom/version-control-tools/rev/97da2a201e23
https://hg.mozilla.org/hgcustom/version-control-tools/rev/6f6d28dbba2c
(Assignee)

Updated

3 years ago
Assignee: nobody → gps
Status: NEW → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
Product: Developer Services → MozReview
You need to log in before you can comment on or make changes to this bug.