Closed
Bug 1131546
Opened 10 years ago
Closed 10 years ago
Unify our various Apache configs
Categories
(Tree Management :: Treeherder: Infrastructure, defect, P4)
Tree Management
Treeherder: Infrastructure
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 1197799
People
(Reporter: emorley, Unassigned)
Details
We have multiple Apache configs (vagrant vs dev vs stage vs prod) - all subtly different, and with various parts commented out/different paths etc.
We should abstract out hostnames & use conditionals for things like dist vs non-dist.
We can then have a single file that is identical everywhere, and can be checked into the treeherder-service repo, for improved discoverability & consistency.
Vagrant config:
https://github.com/mozilla/treeherder-service/blob/master/puppet/files/apache/treeherder-service.conf
Prod:
/etc/httpd/mozilla/domains/treeherder.mozilla.org.conf (on one of the webheads)
Stage:
/etc/httpd/mozilla/domains/treeherder.allizom.org.conf
Dev:
/etc/httpd/conf.d/treeherder-service.conf
Reporter | ||
Comment 1•10 years ago
|
||
Also:
<edmorley> is there a reason why we don't just explicitly catch the /api/ case and then let the rest be served by apache out of the dist directory? Would seem to reduce the number of hardcoded paths we have (current conf: http://pastebin.mozilla.org/8654542)
<mdoglio> it's not only api. it's whatever is present here https://github.com/mozilla/treeherder-service/blob/master/treeherder/webapp/urls.py
<mdoglio> a better approach could be to change the python service to a different port, say 8080
<edmorley> mdoglio: ah indeed
<mdoglio> and use the port to distinguish between backend and frontend
<edmorley> I just don't like the fact we have multiple copy-pasted configs not in our repo
<edmorley> dev vs stage vs vagrant vs prod all have different apache configs with bits commented out, rather than a "is_prod" define that can be flipped
<edmorley> if we just had one file, it would be easier to maintain - we could check it into the repo and get puppet to pull it out of there or something
<mdoglio> edmorley: the sad story is that we don't use our puppet for prod and stage
<mdoglio> and puppet on stage and prod doesn't run automatically on deploy
<edmorley> I'm just fed up of having to ssh onto prod and rummage around to find whatever config file I need to answer questions about the current state of things
<mdoglio> I understand your frustration
<mdoglio> I think the best approach to get rid of the different config bits in our vhost is to serve the dynamic content on a different port number
<mdoglio> it's very doable
<mdoglio> and we can maintain retro compatibility for a while before be switch for good
Reporter | ||
Updated•10 years ago
|
Summary: Combine the various Apache configs & use conditionals rather than variants with parts commented out → Unify our various Apache configs
Reporter | ||
Updated•10 years ago
|
Priority: P3 → P4
Reporter | ||
Comment 2•10 years ago
|
||
* Dev went away (bug 1164023)
* Vagrant no longer uses apache (instead, whitenoise) so there is no in-repo apache config (bug 1151803)
* Stage/prod are on virtually identical configs at the moment
+ we're soon going to remove most of the stage/prod apache configs, as part of bug 1197799, which will also fix comment 1.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•