Merge lp:~abentley/charms/trusty/apache2/apache-website into lp:charms/trusty/apache2
Status: | Merged |
---|---|
Merged at revision: | 66 |
Proposed branch: | lp:~abentley/charms/trusty/apache2/apache-website |
Merge into: | lp:charms/trusty/apache2 |
Prerequisite: | lp:~abentley/charms/trusty/apache2/apache2-ports |
Diff against target: |
405 lines (+298/-20) 5 files modified
README.md (+20/-0) hooks/hooks.py (+115/-9) hooks/tests/test_config_changed.py (+15/-11) hooks/tests/test_hooks.py (+145/-0) metadata.yaml (+3/-0) |
To merge this branch: | bzr merge lp:~abentley/charms/trusty/apache2/apache-website |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Tim Van Steenburgh (community) | Approve | ||
Adam Israel (community) | Approve | ||
Review via email: mp+249758@code.launchpad.net |
Commit message
Support apache-website interface.
Description of the change
This branch updates the apache2 charm to support a new configuration method: the apache-website interface.
Basically, this is a way to push some configuration responsibility out to subordinate charms. The subordinate charms can then make opinionated decisions, and many vhosts can be supported simultaneously in an understandable way.
juju-qa is using this approach already. We have one charm, apache2-
In this approach
1. The subordinate charm supplies the apache config for its particular vhost
2. The subordinate charm indicates whether it is "enabled" or not. (This allows subordinates to delay activating their site until they, themselves are fully configured.)
3. The subordinate charm indicates all the ports it uses. The Apache charm then ensures all ports for all subordinates are open, both on the Apache daemon and via juju open-port. When a port is no longer in use by any configured site, the charm can detect it and close that port.
4. The subordinate indicates which modules its site requires. If Apache is configured to disable those modules, it disables the site. Otherwise, it makes sure that all modules for all sites are enabled.
5. The configurations are named after the relation-id rather than the site name, because the relation-id is permanent, unlike site names.
All tests pass locally.
Hi Aaron,
Thanks for your efforts to land this new functionality in the apache2 charm. I had the opportunity to review the merge proposal today, but ran into a few issues.
There was a merge conflict against trunk, so I used your branch directly.
One of the modules installed into .venv, linecache2, failed with a syntax error:
Compiling /charms/ trusty/ apache2/ .venv/build/ linecache2/ linecache2/ tests/inspect_ fodder2. py ... trusty/ apache2/ .venv/build/ linecache2/ linecache2/ tests/inspect_ fodder2. py", line 102
File "/charms/
def keyworded(*arg1, arg2=1):
The install continued and the tests ran, however, two of them failed:
tests.test_ cert.CertTests. test_is_ selfsigned_ cert_stale_ private_ address_ changed cert.CertTests. test_is_ selfsigned_ cert_stale_ public_ address_ changed
tests.test_
I don't believe your changes have anything to do with these two failures; they also fail in trunk. I'm not going to hold those failures against this merge. I've posted the complete log of the test run here:
http:// pastebin. ubuntu. com/10622663/
I would like to see the interface documented in the README, so developers unfamiliar with the interface will know how to construct or use subordinates that take advantage of the new functionality, before I'm comfortable pushing this forward. With that, and the clean merge into trunk, this should be good to move forward.
Thanks again for your time on this!