Ori.livneh has uploaded a new change for review.
https://gerrit.wikimedia.org/r/97688
Change subject: Gdash module: remove professor-specific hacks; use canonical
locations
......................................................................
Gdash module: remove professor-specific hacks; use canonical locations
* Goodbye /opt/gdash
* Correct Ruby path at top of config.ru to add lib/
* Install dependencies (ruby-rack, ruby-sinatra, rubygems)
Change-Id: I04cf05b7e8235a30adcc68fefa944237cb55717a
---
M modules/gdash/manifests/init.pp
M modules/gdash/templates/config.ru.erb
2 files changed, 12 insertions(+), 19 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/88/97688/1
diff --git a/modules/gdash/manifests/init.pp b/modules/gdash/manifests/init.pp
index 9f8cf02..0989305 100644
--- a/modules/gdash/manifests/init.pp
+++ b/modules/gdash/manifests/init.pp
@@ -56,8 +56,18 @@
deployment::target { 'gdash': }
+ package { [ 'ruby-rack', 'ruby-sinatra', 'rubygems' ]: }
+
file { '/etc/gdash':
ensure => directory,
+ }
+
+ file { '/etc/gdash/gdash.yaml':
+ content => ordered_json($settings),
+ }
+
+ file { '/etc/gdash/config.ru':
+ content => template('gdash/config.ru.erb'),
}
file { $template_dir:
@@ -68,23 +78,6 @@
source => $template_source,
}
- file { '/etc/gdash/gdash.yaml':
- content => ordered_json($settings),
- }
-
- file { '/opt/gdash':
- ensure => directory,
- }
-
- file { '/opt/gdash/public':
- ensure => link,
- target => "${install_dir}/public",
- }
-
- file { '/opt/gdash/public/config.ru':
- content => template('gdash/config.ru.erb'),
- }
-
file { '/var/run/gdash':
ensure => directory,
owner => 'www-data',
@@ -93,7 +86,7 @@
}
uwsgi::app { 'gdash':
- require => File['/etc/gdash/gdash.yaml',
'/opt/gdash/public/config.ru', '/var/run/gdash'],
+ require => File['/etc/gdash/gdash.yaml', '/etc/gdash/config.ru',
'/var/run/gdash'],
settings => {
uwsgi => {
'socket' => '/var/run/gdash/gdash.sock',
diff --git a/modules/gdash/templates/config.ru.erb
b/modules/gdash/templates/config.ru.erb
index 30e89c6..943ba54 100644
--- a/modules/gdash/templates/config.ru.erb
+++ b/modules/gdash/templates/config.ru.erb
@@ -1,4 +1,4 @@
-$: << "<%= @install_dir %>"
+$: << "<%= @install_dir %>/lib"
require 'gdash'
set :run, false
--
To view, visit https://gerrit.wikimedia.org/r/97688
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I04cf05b7e8235a30adcc68fefa944237cb55717a
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ori.livneh <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits