Merge lp:~jose/charms/precise/wordpress/fix-1309980 into lp:charms/wordpress
- Precise Pangolin (12.04)
- fix-1309980
- Merge into trunk
Status: | Merged | ||||||||
---|---|---|---|---|---|---|---|---|---|
Merged at revision: | 76 | ||||||||
Proposed branch: | lp:~jose/charms/precise/wordpress/fix-1309980 | ||||||||
Merge into: | lp:charms/wordpress | ||||||||
Diff against target: |
343 lines (+133/-63) 4 files modified
README.md (+124/-60) hooks/cache-relation-changed (+5/-0) hooks/install (+2/-2) inc/common (+2/-1) |
||||||||
To merge this branch: | bzr merge lp:~jose/charms/precise/wordpress/fix-1309980 | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Marco Ceppi (community) | Approve | ||
Matt Bruzek (community) | Needs Fixing | ||
Review via email: mp+216568@code.launchpad.net |
Commit message
Description of the change
Fixed bug #1309980, which throws an error when WP-FFPC is installed due to a relation with memcached. I added a note to the README file as error #1 displayed on the bug (files not being saved) needs to be fixed manually by clicking 'Save Changes' on the WP-FFPC Settings page, as I couldn't find a way to save changes from the CLI.
Also, fixed 80-line wrapping on the README.md file.
Marco Ceppi (marcoceppi) wrote : | # |
José Antonio Rey (jose) wrote : | # |
It's doubled if you check correctly.
Matt Bruzek (mbruzek) wrote : | # |
José
Thanks for your submission on the wordpress charm! Taking the initiative to fix this bug is awesome and I really appreciate it!
I ran the following steps to get this bug with the current wordpress charm (before I downloaded the code).
juju deploy --repository . local:precise/
juju deploy mysql
juju deploy haproxy
juju deploy memcached
juju add-relation mysql wordpress
juju add-relation haproxy wordpress
juju expose haproxy
(wait for the environment to deploy)
juju add-relation memcached wordpress
The wordpress hook ends up with an error:
wordpress/0:
The log indicates:
sed: can't read /var/www/
When I merge the changes from this MP and deploy with the same steps I see this same error!
2014-05-20 21:57:48 INFO cache-relation-
2014-05-20 21:57:48 ERROR juju.worker.uniter uniter.go:490 hook failed: exit status 2
- - - - -
José and I had a chat about this on IRC and he was not able to see the same error. The only differences that we noticed was the version of juju and the environments. José is running 1.18.1-trusty-amd, and I am running 1.19.2-trusty-amd and he is using Amazon, and I was using local LXC. Other than that we had the same bzr revision and deployed in an almost identical way.
This still looks like a problem so I am going to move this to “incomplete” until we can find the root cause. Please move this back to “needs review” when you have fixed the problem.
Thank you for your continued work on this and working with me on IRC!
Matt Bruzek (mbruzek) wrote : | # |
Thanks again for the submission. I'm going to change status of this MP to "needs fixing" and when you are ready for another review please click the "Request another review" button in the upper right hand corner of the commit message.
Preview Diff
1 | === modified file 'README.md' | |||
2 | --- README.md 2013-12-12 18:42:27 +0000 | |||
3 | +++ README.md 2014-06-30 21:18:30 +0000 | |||
4 | @@ -1,12 +1,16 @@ | |||
5 | 1 | # Overview | 1 | # Overview |
6 | 2 | 2 | ||
9 | 3 | WordPress is a powerful blogging platform written in PHP. This charm aims to deploy WordPress in a fashion that will allow anyone to scale and grow out | 3 | WordPress is a powerful blogging platform written in PHP. This charm aims to |
10 | 4 | a single installation. | 4 | deploy WordPress in a fashion that will allow anyone to scale and grow out a |
11 | 5 | single installation. | ||
12 | 5 | 6 | ||
13 | 6 | # Usage | 7 | # Usage |
14 | 7 | 8 | ||
17 | 8 | This charm is available in the Juju Charm Store, to deploy you'll need at a minimum: a cloud environment, a working Juju installation, | 9 | This charm is available in the Juju Charm Store, to deploy you'll need at a |
18 | 9 | and a successful bootstrap. Please refer to the [Juju Getting Started](https://juju.ubuntu.com/docs/getting-started.html) documentation before continuing. | 10 | minimum: a cloud environment, a working Juju installation, and a successful |
19 | 11 | bootstrap. Please refer to the | ||
20 | 12 | [Juju Getting Started](https://juju.ubuntu.com/docs/getting-started.html) | ||
21 | 13 | documentation before continuing. | ||
22 | 10 | 14 | ||
23 | 11 | Once bootstrapped, deploy the MySQL charm then this WordPress charm: | 15 | Once bootstrapped, deploy the MySQL charm then this WordPress charm: |
24 | 12 | 16 | ||
25 | @@ -23,7 +27,9 @@ | |||
26 | 23 | 27 | ||
27 | 24 | ## Scaled Down Usage for Personal Use | 28 | ## Scaled Down Usage for Personal Use |
28 | 25 | 29 | ||
30 | 26 | If you're just looking to run a personal blog and want to save money you can run all of this on a single node, here's an entire single node installation from scratch: | 30 | If you're just looking to run a personal blog and want to save money you can run |
31 | 31 | all of this on a single node, here's an entire single node installation from | ||
32 | 32 | scratch: | ||
33 | 27 | 33 | ||
34 | 28 | juju bootstrap | 34 | juju bootstrap |
35 | 29 | juju deploy --to 0 wordpress | 35 | juju deploy --to 0 wordpress |
36 | @@ -31,40 +37,59 @@ | |||
37 | 31 | juju add-relation wordpress mysql | 37 | juju add-relation wordpress mysql |
38 | 32 | juju expose wordpress | 38 | juju expose wordpress |
39 | 33 | 39 | ||
41 | 34 | This will run everything on one node, however we still have the flexibility to grow horizontally. If your blog gets more traffic and you need to scale: | 40 | This will run everything on one node, however we still have the flexibility to |
42 | 41 | grow horizontally. If your blog gets more traffic and you need to scale: | ||
43 | 35 | 42 | ||
44 | 36 | juju add-unit wordpress | 43 | juju add-unit wordpress |
45 | 37 | 44 | ||
47 | 38 | Since we're omitting the `--to` command Juju will fire up a new dedicated machine for Wordpress and relate it. You can also `remove-unit` when the surge is over and go back to a cheaper one node set up. | 45 | Since we're omitting the `--to` command Juju will fire up a new dedicated |
48 | 46 | machine for Wordpress and relate it. You can also `remove-unit` when the surge | ||
49 | 47 | is over and go back to a cheaper one node set up. | ||
50 | 39 | 48 | ||
51 | 40 | # Scale Out Usage | 49 | # Scale Out Usage |
52 | 41 | 50 | ||
58 | 42 | You can deploy a memcached server and relate it to your WordPress service to add memcache caching. This will | 51 | You can deploy a memcached server and relate it to your WordPress service to add |
59 | 43 | automagically install [WP-FFPC](http://wordpress.org/extend/plugins/wp-ffpc/) (regardless of your tuning settings) and configure it to cache | 52 | memcache caching. This will automagically install |
60 | 44 | rendered pages to the memcache server. In addition to this layer of caching, Nginx will pull directly from memcached bypassing PHP altogether. | 53 | [WP-FFPC](http://wordpress.org/extend/plugins/wp-ffpc/) (regardless of your |
61 | 45 | You could theoretically then turn off php5-fpm on all of your servers and just have Nginx serve static content via memcached (though, you | 54 | tuning settings) and configure it to cache rendered pages to the memcache |
62 | 46 | wouldn't be able to access the admin panel or any uncached pages - it's just a potential scenario). | 55 | server. In addition to this layer of caching, Nginx will pull directly from |
63 | 56 | memcached bypassing PHP altogether. You could theoretically then turn off | ||
64 | 57 | php5-fpm on all of your servers and just have Nginx serve static content via | ||
65 | 58 | memcached (though, you wouldn't be able to access the admin panel or any | ||
66 | 59 | uncached pages - it's just a potential scenario). | ||
67 | 47 | 60 | ||
68 | 48 | juju deploy memcached | 61 | juju deploy memcached |
69 | 49 | juju add-relation memcached wordpress | 62 | juju add-relation memcached wordpress |
70 | 50 | 63 | ||
75 | 51 | This setup will also synchronize the flushing of cache across all WordPress nodes, making it ideal to avoid stale caches. | 64 | This setup will also synchronize the flushing of cache across all WordPress |
76 | 52 | 65 | nodes, making it ideal to avoid stale caches. | |
77 | 53 | A small note, when using the Apache2 engine and memcache, all request will still be sent to WordPress via Apache where typical caching | 66 | |
78 | 54 | procedures will take place and wp-ffpc will render the memcached page. | 67 | Once the relation is set and the hooks have ran accordingly, you will need to |
79 | 68 | manually save the settings for WP-FFPC. Everything will be configured, though. | ||
80 | 69 | Just log in to the administrator Dashboard, and then click the link to the | ||
81 | 70 | WP-FFPC Settings page displayed on the error at the top of the page. Finally, | ||
82 | 71 | scroll down and click on the blue button which says Save Changes. | ||
83 | 72 | |||
84 | 73 | A small note, when using the Apache2 engine and memcache, all request will | ||
85 | 74 | still be sent to WordPress via Apache where typical caching procedures will take | ||
86 | 75 | place and wp-ffpc will render the memcached page. | ||
87 | 55 | 76 | ||
88 | 56 | # Configuration | 77 | # Configuration |
89 | 57 | 78 | ||
91 | 58 | This WordPress charm comes with several tuning levels designed to encompass the different styles in which this charm will be used. | 79 | This WordPress charm comes with several tuning levels designed to encompass the |
92 | 80 | different styles in which this charm will be used. | ||
93 | 59 | 81 | ||
94 | 60 | A use case for each tuning style is outlined below: | 82 | A use case for each tuning style is outlined below: |
95 | 61 | 83 | ||
96 | 62 | ## Bare | 84 | ## Bare |
97 | 63 | 85 | ||
102 | 64 | The Bare configuration option is meant for those who wish to run the stock WordPress setup with no caching, no manipulation of data, | 86 | The Bare configuration option is meant for those who wish to run the stock |
103 | 65 | and no additional scale out features enabled. This is ideal if you intend to install additional plugins to deal with coordinating | 87 | WordPress setup with no caching, no manipulation of data, and no additional |
104 | 66 | WordPress units or simply wish to test drive WordPress as it is out of the box. This will still create a load-balancer when an additional | 88 | scale out features enabled. This is ideal if you intend to install additional |
105 | 67 | unit is created, though everything else will be turned off (WordPress caching, APC OpCode caching, and NFS file sharing). | 89 | plugins to deal with coordinating WordPress units or simply wish to test drive |
106 | 90 | WordPress as it is out of the box. This will still create a load-balancer when | ||
107 | 91 | an additional unit is created, though everything else will be turned off | ||
108 | 92 | (WordPress caching, APC OpCode caching, and NFS file sharing). | ||
109 | 68 | 93 | ||
110 | 69 | To run this WordPress charm under a bare tuning level execute the following: | 94 | To run this WordPress charm under a bare tuning level execute the following: |
111 | 70 | 95 | ||
112 | @@ -72,11 +97,14 @@ | |||
113 | 72 | 97 | ||
114 | 73 | ## Single | 98 | ## Single |
115 | 74 | 99 | ||
121 | 75 | When running in Single mode, this charm will make every attempt to provide a solid base for your WordPress install. By running in single | 100 | When running in Single mode, this charm will make every attempt to provide a |
122 | 76 | the following will be enabled: Nginx microcache, APC OpCode caching, WordPress caching module, and the ability to sync files via NFS. | 101 | solid base for your WordPress install. By running in single the following will |
123 | 77 | While Single mode is designed to allow for scaling out, it's meant to only scale out for temporary relief; say in the event of a large | 102 | be enabled: Nginx microcache, APC OpCode caching, WordPress caching module, |
124 | 78 | traffic in-flux. It's recommended for long running scaled out versions that optimized is used. The removal of the file share speeds up | 103 | and the ability to sync files via NFS. While Single mode is designed to allow |
125 | 79 | the site and servers ensuring that the most efficient set up is provided. | 104 | for scaling out, it's meant to only scale out for temporary relief; say in the |
126 | 105 | event of a large traffic in-flux. It's recommended for long running scaled out | ||
127 | 106 | versions that optimized is used. The removal of the file share speeds up the | ||
128 | 107 | site and servers ensuring that the most efficient set up is provided. | ||
129 | 80 | 108 | ||
130 | 81 | To run this WordPress charm under a single tuning level execute the following: | 109 | To run this WordPress charm under a single tuning level execute the following: |
131 | 82 | 110 | ||
132 | @@ -84,21 +112,29 @@ | |||
133 | 84 | 112 | ||
134 | 85 | ## Optimized | 113 | ## Optimized |
135 | 86 | 114 | ||
141 | 87 | If you need to run WordPress on more than one instance constantly, or require scaling out and in on a regular basis, then Optimized is the | 115 | If you need to run WordPress on more than one instance constantly, or require |
142 | 88 | recommended configuration. When you run WordPress under an Optimized tuning level, the ability to install, edit, and upgrade themes and plugins | 116 | scaling out and in on a regular basis, then Optimized is the recommended |
143 | 89 | is disabled. By doing this the charm can drop the need for an NFS mount which is inefficient and serve everything from it's local disk. | 117 | configuration. When you run WordPress under an Optimized tuning level, the |
144 | 90 | Everything else provided in Single level is available. In order to install or modify plugins with this setup you'll need to edit and commit | 118 | ability to install, edit, and upgrade themes and plugins is disabled. By doing |
145 | 91 | them to a forked version of the charm in the files/wordpress/ directory. | 119 | this the charm can drop the need for an NFS mount which is inefficient and serve |
146 | 120 | everything from it's local disk. Everything else provided in Single level is | ||
147 | 121 | available. In order to install or modify plugins with this setup you'll need to | ||
148 | 122 | edit and commit them to a forked version of the charm in the files/wordpress/ | ||
149 | 123 | directory. | ||
150 | 92 | 124 | ||
152 | 93 | To run this WordPress charm under an optimized tuning level execute the following: | 125 | To run this WordPress charm under an optimized tuning level execute the |
153 | 126 | following: | ||
154 | 94 | 127 | ||
155 | 95 | juju set wordpress tuning=optimized | 128 | juju set wordpress tuning=optimized |
156 | 96 | 129 | ||
157 | 97 | ### Handling wp-content | 130 | ### Handling wp-content |
158 | 98 | 131 | ||
162 | 99 | In order to allow for custom WordPress content within the Juju charm a separate configuration option exists for pointing to any Git or Bzr | 132 | In order to allow for custom WordPress content within the Juju charm a separate |
163 | 100 | repository. An example of a valid formed wp-content repository can be found on the [Juju Tools Github page](https://github.com/jujutools/wordpress-site). | 133 | configuration option exists for pointing to any Git or Bzr repository. An |
164 | 101 | To set the wp-content directive to a git repository, use one of the following formats making sure to replace items like `host`, `path`, and `repo` with their | 134 | example of a valid formed wp-content repository can be found on the |
165 | 135 | [Juju Tools Github page](https://github.com/jujutools/wordpress-site). To set | ||
166 | 136 | the wp-content directive to a git repository, use one of the following formats | ||
167 | 137 | making sure to replace items like `host`, `path`, and `repo` with their | ||
168 | 102 | respective names: | 138 | respective names: |
169 | 103 | 139 | ||
170 | 104 | juju set wordpress wp-content=git@host:path/repo.git | 140 | juju set wordpress wp-content=git@host:path/repo.git |
171 | @@ -111,7 +147,9 @@ | |||
172 | 111 | 147 | ||
173 | 112 | juju set wordpress wp-content=git://host/path/repo.git | 148 | juju set wordpress wp-content=git://host/path/repo.git |
174 | 113 | 149 | ||
176 | 114 | If you wish to use a bzr repository, then apply one of the following schemes replacing items like `host`, `username`, `path`, and `repo` with their respective values: | 150 | If you wish to use a bzr repository, then apply one of the following schemes |
177 | 151 | replacing items like `host`, `username`, `path`, and `repo` with their | ||
178 | 152 | respective values: | ||
179 | 115 | 153 | ||
180 | 116 | For LaunchPad hosted repostiories: | 154 | For LaunchPad hosted repostiories: |
181 | 117 | 155 | ||
182 | @@ -125,15 +163,20 @@ | |||
183 | 125 | 163 | ||
184 | 126 | juju set wordpress wp-content=bzr+ssh://host/path/repo | 164 | juju set wordpress wp-content=bzr+ssh://host/path/repo |
185 | 127 | 165 | ||
188 | 128 | Setting the wp-content option to an empty string ("") will result in no further updates being pulled from that repository; however, the last pull will remain | 166 | Setting the wp-content option to an empty string ("") will result in no further |
189 | 129 | on the system and will not be removed. | 167 | updates being pulled from that repository; however, the last pull will remain on |
190 | 168 | the system and will not be removed. | ||
191 | 130 | 169 | ||
192 | 131 | ## debug | 170 | ## debug |
193 | 132 | 171 | ||
198 | 133 | This option will create a directory `_debug` at the root of each unit (`http://unit-address/_debug`). In this directory are two scripts: info.php (`/_debug/info.php`) | 172 | This option will create a directory `_debug` at the root of each unit |
199 | 134 | and apc.php (`/_debug/apc.php`). info.php is a simple phpinfo script that will outline exactly how the environment is configured. apc.php is the APC admin portal which | 173 | (`http://unit-address/_debug`). In this directory are two scripts: info.php |
200 | 135 | provides APC caching details in addition to several administrative functions like clearing the APC cache. This should never be set to "yes" in production as it exposes | 174 | (`/_debug/info.php`) and apc.php (`/_debug/apc.php`). info.php is a simple |
201 | 136 | detailed information about the environments and may provide a way for an intruder to DDoS the machine. | 175 | phpinfo script that will outline exactly how the environment is configured. |
202 | 176 | apc.php is the APC admin portal which provides APC caching details in addition | ||
203 | 177 | to several administrative functions like clearing the APC cache. This should | ||
204 | 178 | never be set to "yes" in production as it exposes detailed information about the | ||
205 | 179 | environments and may provide a way for an intruder to DDoS the machine. | ||
206 | 137 | 180 | ||
207 | 138 | juju set wordpress debug=yes | 181 | juju set wordpress debug=yes |
208 | 139 | 182 | ||
209 | @@ -145,10 +188,15 @@ | |||
210 | 145 | 188 | ||
211 | 146 | ## Engine | 189 | ## Engine |
212 | 147 | 190 | ||
217 | 148 | By default the WordPress charm will install nginx and php5-fpm to serve pages. In the event you do not wish to use nginx - for whatever reason - you can switch to Apache2. | 191 | By default the WordPress charm will install nginx and php5-fpm to serve pages. |
218 | 149 | This will provide a near identical workflow as if you were using nginx with one key difference: memcached. In nginx, the cached pages are served from memcached prior to | 192 | In the event you do not wish to use nginx - for whatever reason - you can switch |
219 | 150 | hitting the php contents, this isn't possible with apache2. As such memcached support still works, since it falls back to the WordPress caching engine, but it's not as robust. | 193 | to Apache2. This will provide a near identical workflow as if you were using |
220 | 151 | Otherwise, Apache2 will still perform balancing and everything else mentioned above. You can switch between engines at will with the following: | 194 | nginx with one key difference: memcached. In nginx, the cached pages are served |
221 | 195 | from memcached prior to hitting the php contents, this isn't possible with | ||
222 | 196 | apache2. As such memcached support still works, since it falls back to the | ||
223 | 197 | WordPress caching engine, but it's not as robust. Otherwise, Apache2 will still | ||
224 | 198 | perform balancing and everything else mentioned above. You can switch between | ||
225 | 199 | engines at will with the following: | ||
226 | 152 | 200 | ||
227 | 153 | juju set wordpress engine=apache2 | 201 | juju set wordpress engine=apache2 |
228 | 154 | 202 | ||
229 | @@ -162,38 +210,54 @@ | |||
230 | 162 | 210 | ||
231 | 163 | ## HP Cloud | 211 | ## HP Cloud |
232 | 164 | 212 | ||
235 | 165 | At this time WordPress + Memcached don't work on HP Cloud's standard.xsmall. To get around this deploy the WordPress charm with the | 213 | At this time WordPress + Memcached don't work on HP Cloud's standard.xsmall. To |
236 | 166 | charm to at least a `standard.small`, to do this: | 214 | get around this deploy the WordPress charm with the charm to at least a |
237 | 215 | `standard.small`, to do this: | ||
238 | 167 | 216 | ||
239 | 168 | juju deploy --constraints "instance-type=standard.small" wordpress | 217 | juju deploy --constraints "instance-type=standard.small" wordpress |
240 | 169 | 218 | ||
243 | 170 | This only is a problem when attempting to relate memcached to WordPress, otherwise an xsmall is _okay_ though it's really not the best | 219 | This only is a problem when attempting to relate memcached to WordPress, |
244 | 171 | sized platform for running a stable WordPress install. | 220 | otherwise an xsmall is _okay_ though it's really not the best sized platform for |
245 | 221 | running a stable WordPress install. | ||
246 | 172 | 222 | ||
247 | 173 | ## Single mode and the scale-out | 223 | ## Single mode and the scale-out |
248 | 174 | 224 | ||
253 | 175 | If you're in Single mode and you want to/need to scale out, but you've been upgrading, modifying, and installing plugins + themes like | 225 | If you're in Single mode and you want to/need to scale out, but you've been |
254 | 176 | a normal WordPress user on a normal install; you can still scale out but you'll need to deploy a shared-fs charm first. At the time of | 226 | upgrading, modifying, and installing plugins + themes like a normal WordPress |
255 | 177 | this writing only the NFS charm will work, but as more shared-fs charms come out (gluster, ceph, etc) that provide a shared-fs/mount | 227 | user on a normal install; you can still scale out but you'll need to deploy a |
256 | 178 | interface those should all work as well. In this example we'll use NFS: | 228 | shared-fs charm first. At the time of this writing only the NFS charm will work, |
257 | 229 | but as more shared-fs charms come out (gluster, ceph, etc) that provide a | ||
258 | 230 | shared-fs/mount interface those should all work as well. In this example we'll | ||
259 | 231 | use NFS: | ||
260 | 179 | 232 | ||
261 | 180 | juju deploy nfs | 233 | juju deploy nfs |
262 | 181 | juju add-relation nfs wordpress:nfs | 234 | juju add-relation nfs wordpress:nfs |
263 | 182 | 235 | ||
267 | 183 | By doing so, everything in the wp-contents directory is moved to this NFS mount and then shared to all future WordPress units. It's strongly | 236 | By doing so, everything in the wp-contents directory is moved to this NFS mount |
268 | 184 | recommended that you first deploy the nfs mount, _then_ scale WordPress out. Failure to do so may result in data loss. Once nfs is deployed, | 237 | and then shared to all future WordPress units. It's strongly recommended that |
269 | 185 | running, and related you can scale out the WordPress unit using the following command: | 238 | you first deploy the nfs mount, _then_ scale WordPress out. Failure to do so may |
270 | 239 | result in data loss. Once nfs is deployed, running, and related you can scale | ||
271 | 240 | out the WordPress unit using the following command: | ||
272 | 186 | 241 | ||
273 | 187 | juju add-unit wordpress | 242 | juju add-unit wordpress |
274 | 188 | 243 | ||
277 | 189 | In the event you want more than one unit at a time (and do not wish to run the add-unit command multiple times) you can supply a `-n` number | 244 | In the event you want more than one unit at a time (and do not wish to run the |
278 | 190 | of units to add, so to add three more units: | 245 | add-unit command multiple times) you can supply a `-n` number of units to add, |
279 | 246 | so to add three more units: | ||
280 | 191 | 247 | ||
281 | 192 | juju add-unit -n3 wordpress | 248 | juju add-unit -n3 wordpress |
282 | 193 | 249 | ||
283 | 250 | ## Memcached Issues | ||
284 | 251 | |||
285 | 252 | In order to have a working relation with memcached, you need to first set up | ||
286 | 253 | your Wordpress blog, by creating your first user. If you try to relate | ||
287 | 254 | memcached before, you will get a `cache-relation-changed` error on your | ||
288 | 255 | instance. | ||
289 | 256 | |||
290 | 194 | # Contact Information | 257 | # Contact Information |
291 | 195 | 258 | ||
292 | 196 | ## WordPress Contact Information | 259 | ## WordPress Contact Information |
293 | 197 | 260 | ||
294 | 198 | - [WordPress Homepage](http://www.wordpress.org) | 261 | - [WordPress Homepage](http://www.wordpress.org) |
295 | 199 | - [Reporting bugs](http://codex.wordpress.org/Reporting_Bugs) on WordPress itself | ||
296 | 200 | \ No newline at end of file | 262 | \ No newline at end of file |
297 | 263 | - [Reporting bugs](http://codex.wordpress.org/Reporting_Bugs) on WordPress | ||
298 | 264 | itself | ||
299 | 201 | 265 | ||
300 | === modified file 'hooks/cache-relation-changed' | |||
301 | --- hooks/cache-relation-changed 2012-08-24 20:59:04 +0000 | |||
302 | +++ hooks/cache-relation-changed 2014-06-30 21:18:30 +0000 | |||
303 | @@ -6,6 +6,11 @@ | |||
304 | 6 | 6 | ||
305 | 7 | rm -f .memcache | 7 | rm -f .memcache |
306 | 8 | 8 | ||
307 | 9 | if [ -z $memcache_port ]; then | ||
308 | 10 | juju-log "Info hasn't been received from the instance yet, exiting silently" | ||
309 | 11 | exit 0 | ||
310 | 12 | fi | ||
311 | 13 | |||
312 | 9 | cat > .memcache <<EOF | 14 | cat > .memcache <<EOF |
313 | 10 | #!/bin/bash | 15 | #!/bin/bash |
314 | 11 | CACHE_HOST=$memcache_host | 16 | CACHE_HOST=$memcache_host |
315 | 12 | 17 | ||
316 | === modified file 'hooks/install' | |||
317 | --- hooks/install 2013-09-27 18:31:24 +0000 | |||
318 | +++ hooks/install 2014-06-30 21:18:30 +0000 | |||
319 | @@ -6,8 +6,8 @@ | |||
320 | 6 | apt-get update && apt-get -y upgrade | 6 | apt-get update && apt-get -y upgrade |
321 | 7 | 7 | ||
322 | 8 | apt-get -y install php5-memcache mysql-client pwgen php5 php5-fpm \ | 8 | apt-get -y install php5-memcache mysql-client pwgen php5 php5-fpm \ |
325 | 9 | php-apc mailutils php-mail sysstat php5-mysql php5-mcrypt php5-memcache \ | 9 | php-apc mailutils php-mail sysstat php5-mysql php5-mcrypt charm-helper-sh \ |
326 | 10 | charm-helper-sh php5-curl rsync nfs-common git-core mktemp | 10 | php5-curl rsync nfs-common git-core mktemp |
327 | 11 | 11 | ||
328 | 12 | modprobe nfs || true | 12 | modprobe nfs || true |
329 | 13 | 13 | ||
330 | 14 | 14 | ||
331 | === modified file 'inc/common' | |||
332 | --- inc/common 2013-09-19 12:18:50 +0000 | |||
333 | +++ inc/common 2014-06-30 21:18:30 +0000 | |||
334 | @@ -200,7 +200,8 @@ | |||
335 | 200 | source .memcache | 200 | source .memcache |
336 | 201 | 201 | ||
337 | 202 | wp plugin install --path=$wp_install_path wp-ffpc | 202 | wp plugin install --path=$wp_install_path wp-ffpc |
339 | 203 | sed -i -e "s/'host'=>.*/'host'=>'$CACHE_HOST',/" $wp_install_path/wp-content/plugins/wp-ffpc/wp-ffpc.php | 203 | sed -i -e "s/'hosts'=>.*/'hosts'=>'$CACHE_HOST:$CACHE_PORT',/" $wp_install_path/wp-content/plugins/wp-ffpc/wp-ffpc.php |
340 | 204 | sed -i "s/memcached/memcache/g" $wp_install_path/wp-content/plugins/wp-ffpc/wp-ffpc.php | ||
341 | 204 | wp plugin activate --path=$wp_install_path wp-ffpc | 205 | wp plugin activate --path=$wp_install_path wp-ffpc |
342 | 205 | 206 | ||
343 | 206 | install -o www-data -g www-data -m 0644 files/charm/wordpress/advanced-cache.php $wp_install_path/wp-content/advanced-cache.php | 207 | install -o www-data -g www-data -m 0644 files/charm/wordpress/advanced-cache.php $wp_install_path/wp-content/advanced-cache.php |
Why are you removing php-memcache from the install hook? That's required for memcache to work within php