Merge lp://staging/~marcoceppi/charms/precise/wordpress/apache-dog-pile into lp://staging/charms/wordpress

Proposed by Marco Ceppi
Status: Merged
Approved by: Mark Mims
Approved revision: 81
Merged at revision: 61
Proposed branch: lp://staging/~marcoceppi/charms/precise/wordpress/apache-dog-pile
Merge into: lp://staging/charms/wordpress
Diff against target: 828 lines (+392/-155)
16 files modified
README.md (+19/-1)
config.yaml (+8/-14)
files/charm/apache/etc_apache2_conf-d_php5-fpm.conf (+6/-0)
files/charm/apache/etc_apache2_sites-enabled_loadbalancer (+21/-0)
files/charm/apache/etc_apache2_sites-enabled_wordpress (+20/-0)
hooks/config-changed (+107/-3)
hooks/db-relation-changed (+9/-19)
hooks/install (+5/-30)
hooks/loadbalancer-relation-changed (+20/-1)
hooks/loadbalancer-relation-joined (+97/-44)
hooks/start (+2/-1)
hooks/stop (+2/-3)
hooks/upgrade-charm (+6/-0)
hooks/website-relation-joined (+3/-1)
inc/common (+66/-37)
revision (+1/-1)
To merge this branch: bzr merge lp://staging/~marcoceppi/charms/precise/wordpress/apache-dog-pile
Reviewer Review Type Date Requested Status
Mark Mims (community) Needs Fixing
Review via email: mp+139307@code.staging.launchpad.net

Description of the change

This is another pretty big merge, so to you who's reviewing - first thank you! Second, sorry. Third, I'm not really.

The primary purpose of this merge is to add Apache2 as a web engine for organizations/people who don't trust nginx yet. This adds the "engine" configuration option with either a value of "nginx" or "apache2". Scale-out peer relation still works. To best test this deploy wp and mysql, enable debug config option, check /_debug/info.php - make sure nginx is the server software, change engine, wait for about 5 mins, check info.php for apache.

Other changes
- Using charm-helper-bash/vcs now, opens up support for hg and svn wp-content, better git/bzr support
- Removed default wp-content config value, it should have been an example, not the default
- Copyright fixes
- Added support for arbitrarily building the files from loadbalancer relation via loadbalancer-rebuild in hooks
- website relation now pushes port 8080 instead, making this charm compatible with other proxy charms if the user wants to not use the peer lb

I'm still testing support for upgrading from current version to this version via upgrade charm and any negative impacts from this. Preliminary research shows that this won't break existing installs.

To post a comment you must log in.
67. By Marco Ceppi

Don't need to listen on 80

68. By Marco Ceppi

Make sure sed expands shell variable

69. By Marco Ceppi

Enable multiverse for the apache2 stuff

70. By Marco Ceppi

Backwards compat fix

71. By Marco Ceppi

Use the restart hook

Revision history for this message
Mark Mims (mark-mims) wrote :

multiple units are failing... tried this two ways: add-unit to existing running stack as well as deploy multiple units up front.

units come up in configure-error

I'll attach logs from one of the units.

review: Needs Fixing
Revision history for this message
Mark Mims (mark-mims) wrote :

> multiple units are failing... tried this two ways: add-unit to existing
> running stack as well as deploy multiple units up front.
>
> units come up in configure-error
>
> I'll attach logs from one of the units.

ok, maybe not... pasting logs: http://paste.ubuntu.com/1426284/

72. By Marco Ceppi

Server lines need a ';' and when loading from cache need to strip() results

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Thanks, not sure how this got overlooked. It's repaired now!

Revision history for this message
Mark Mims (mark-mims) wrote :

nother spin now

Revision history for this message
Mark Mims (mark-mims) wrote :

bit a show-stopper... just a note
------------------8<-----------------------

little bit of a problem with the way loadbalancer is called...

here's the situation:

bootstrap
deploy mysql
deploy wordpress wp -n7
add-relation wp mysql
...time...
juju set engine=apache2

all the instances reconfigure to apache instead of nginx, but the loadbalancer relations aren't called again, so the instances are all just passthrough.

------------------8<-----------------------

Revision history for this message
Mark Mims (mark-mims) wrote :

_not_ a show-stopper... just a note

> ------------------8<-----------------------
>
> little bit of a problem with the way loadbalancer is called...
>
> here's the situation:
>
> bootstrap
> deploy mysql
> deploy wordpress wp -n7
> add-relation wp mysql
> ...time...
> juju set engine=apache2
>
> all the instances reconfigure to apache instead of nginx, but the loadbalancer
> relations aren't called again, so the instances are all just passthrough.
>
>
> ------------------8<-----------------------

73. By Marco Ceppi

Fix to loadbalancer conf name for apache2

74. By Marco Ceppi

Fix to balancermember lines and conditional for nginx only memcached configuration

75. By Marco Ceppi

Enable proxy_balancer

76. By Marco Ceppi

Include proxy_http

77. By Marco Ceppi

proxy_http

78. By Marco Ceppi

Set the request header to make sure assets work properly

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Hi Mark,

Thanks for taking the time to look over this. Setting the engine should work at anytime as there's a loadbalancer-rebuild script which handles configuration changes. I've fixed that script to actually work and several other changes to make Apache2 loadbalanced match what occurs in Nginx. There are still improvements to be made for efficiency of Apache2 but I'll save that for a future MP.

79. By Marco Ceppi

Preserve host

80. By Marco Ceppi

Make sure apache respects the canonical name for cookies and the like

81. By Marco Ceppi

Fix for secrety key and cookies

Revision history for this message
Mark Mims (mark-mims) wrote :

beauty man...

passed all my variations of engine switching with flying colors

thanks for taking the time to work through all this!

Revision history for this message
Marco Ceppi (marcoceppi) wrote :

Thank you so much for taking the time to walk through this big merge. New Years resolution: more managable merge proposals!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: