Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Delta Between Two Patch Sets: modules/trac/manifests/init.pp

Issue 29362580: Issue 4641 - Append performance fix to trac cgi file (Closed)
Left Patch Set: Issue 4641 - Performance fix to trac cgi file Created Nov. 17, 2016, 9:43 p.m.
Right Patch Set: Forgot the py file Created Nov. 18, 2016, 9:32 a.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
« no previous file with change/comment | « modules/trac/files/trac_performance_fix.py ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
1 class trac( 1 class trac(
2 $domain, 2 $domain,
3 $certificate, 3 $certificate,
4 $private_key, 4 $private_key,
5 $fcgi_config_dir = '/etc/nginx/trac.d', 5 $fcgi_config_dir = '/etc/nginx/trac.d',
6 $is_default = false) inherits private::trac { 6 $is_default = false) inherits private::trac {
7 7
8 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']: 8 package {['python-mysqldb','python-pip','subversion', 'tofrodos', 'graphviz']:
9 ensure => present 9 ensure => present
10 } 10 }
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
142 } 142 }
143 143
144 file {'/home/trac/robots.txt': 144 file {'/home/trac/robots.txt':
145 ensure => 'present', 145 ensure => 'present',
146 source => 'puppet:///modules/trac/robots.txt', 146 source => 'puppet:///modules/trac/robots.txt',
147 owner => 'trac', 147 owner => 'trac',
148 mode => 644, 148 mode => 644,
149 } 149 }
150 150
151 file {"trac_performance_fix_py": 151 file {"trac_performance_fix_py":
152 ensure => present, 152 ensure => present,
mathias 2016/11/17 22:08:37 Please do not align arrows. This is a documented e
f.nicolaisen 2016/11/18 09:23:29 Acknowledged.
153 path => '/usr/local/lib/python2.7/dist-packages/trac_performance_fix.py', 153 path => '/usr/local/lib/python2.7/dist-packages/trac_performance_fix.py',
154 source => 'puppet:///modules/trac/trac_performance_fix.py', 154 source => 'puppet:///modules/trac/trac_performance_fix.py',
155 owner => 'trac', 155 owner => 'root',
mathias 2016/11/17 22:08:36 The owner should probably be set to 'root' for any
f.nicolaisen 2016/11/18 09:23:29 Acknowledged.
156 mode => 644, 156 mode => 644,
157 } 157 }
158 158
159 159
160 define instance ( 160 define instance (
161 $config = 'trac/trac.ini.erb', 161 $config = 'trac/trac.ini.erb',
162 $description = 'Issue Tracker', 162 $description = 'Issue Tracker',
163 $location = '/', 163 $location = '/',
164 $logo = 'puppet:///modules/trac/logo.png', 164 $logo = 'puppet:///modules/trac/logo.png',
165 $database = 'trac', 165 $database = 'trac',
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
251 && fromdos /home/trac/htdocs-$name/cgi-bin/trac.fcgi \ 251 && fromdos /home/trac/htdocs-$name/cgi-bin/trac.fcgi \
252 && chmod 755 /home/trac/htdocs-$name/cgi-bin/trac.fcgi", 252 && chmod 755 /home/trac/htdocs-$name/cgi-bin/trac.fcgi",
253 user => trac, 253 user => trac,
254 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin', 254 path => '/usr/bin:/usr/sbin:/bin:/usr/local/bin',
255 require => [ 255 require => [
256 Exec["update_env_$name"], 256 Exec["update_env_$name"],
257 Package["tofrodos"]], 257 Package["tofrodos"]],
258 } 258 }
259 259
260 file_line { "patch $name trac.fcgi": 260 file_line { "patch $name trac.fcgi":
261 path => "/home/trac/htdocs-$name/cgi-bin/trac.fcgi", 261 path => "/home/trac/htdocs-$name/cgi-bin/trac.fcgi",
262 match => '^# Author.*$', 262 match => '^# Author.*$',
263 line => "# Author: Jonas Borgström <jonas@edgewall.com> 263 line => "# Author\nimport trac_performance_fix",
264 import trac_performance_fix",
mathias 2016/11/17 22:08:36 Wouldn't a "\n" do it here? Or, in order to keep t
f.nicolaisen 2016/11/18 09:23:29 Puppet doesn't accept dropping it - the match also
265 require => Exec["deploy_$name"], 264 require => Exec["deploy_$name"],
266 } 265 }
267 266
268 file {"/home/trac/htdocs-$name/htdocs/common/logo.png": 267 file {"/home/trac/htdocs-$name/htdocs/common/logo.png":
269 ensure => present, 268 ensure => present,
270 source => $logo, 269 source => $logo,
271 owner => trac, 270 owner => trac,
272 require => Exec["deploy_$name"], 271 require => Exec["deploy_$name"],
273 } 272 }
274 273
(...skipping 16 matching lines...) Expand all
291 # Daily restart required for log rotation of all instances at once 290 # Daily restart required for log rotation of all instances at once
292 cron {'restart-trac-daily': 291 cron {'restart-trac-daily':
293 command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log', 292 command => 'service spawn-fcgi restart >/tmp/spawn-fcgi-restart.log',
294 environment => hiera('cron::environment', []), 293 environment => hiera('cron::environment', []),
295 hour => '1', 294 hour => '1',
296 minute => '0', 295 minute => '0',
297 user => 'root', 296 user => 'root',
298 } 297 }
299 } 298 }
300 299
LEFTRIGHT

Powered by Google App Engine
This is Rietveld