jenkins-bot has submitted this change and it was merged. Change subject: Add role::quips ......................................................................
Add role::quips Add a role to provision the quips application used to power https://tools.wmflabs.org/bash/. Change-Id: I9d977ce6a15929dfbfc1000b74b979349319b594 --- M puppet/hieradata/common.yaml A puppet/modules/role/manifests/quips.pp A puppet/modules/role/templates/quips/apache.conf.erb 3 files changed, 67 insertions(+), 0 deletions(-) Approvals: Dduvall: Looks good to me, approved jenkins-bot: Verified diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index eec5e72..f764901 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -259,6 +259,12 @@ role::mediawiki::hostname: 127.0.0.1 +role::quips::vhost_name: "quips.local.wmftest.net%{::port_fragment}" +role::quips::dir: "%{hiera('mwv::services_dir')}/quips" +role::quips::env: + CACHE_DIR: /var/cache/quips + SLIM_MODE: development + role::raita::dir: "%{hiera('mwv::services_dir')}/raita" role::raita::vhost_name: 'raita.local.wmftest.net' diff --git a/puppet/modules/role/manifests/quips.pp b/puppet/modules/role/manifests/quips.pp new file mode 100644 index 0000000..926f281 --- /dev/null +++ b/puppet/modules/role/manifests/quips.pp @@ -0,0 +1,41 @@ +# == Class: role::quips +# Provisions the quips application +# +# === Parameters +# [*vhost_name*] +# Vhost name of quips service. Default 'quips.local.wmftest.net'. +# +# [*dir*] +# Deployment directory. +# +# [*env*] +# Hash of environment settings. +# +class role::quips( + $vhost_name, + $dir, + $env, +) { + include ::elasticsearch + + git::clone { 'quips': + directory => $dir, + remote => 'https://github.com/bd808/quips.git', + } + + php::composer::install { $dir: + require => Git::Clone['quips'], + } + + file { '/var/cache/quips': + ensure => directory, + owner => 'www-data', + group => 'www-data', + mode => '0770', + } + + apache::site { $vhost_name: + content => template('role/quips/apache.conf.erb'), + require => Git::Clone['quips'], + } +} diff --git a/puppet/modules/role/templates/quips/apache.conf.erb b/puppet/modules/role/templates/quips/apache.conf.erb new file mode 100644 index 0000000..b85ccd3 --- /dev/null +++ b/puppet/modules/role/templates/quips/apache.conf.erb @@ -0,0 +1,20 @@ +ServerName <%= @vhost_name %> + +DocumentRoot <%= @dir %>/public + +<Directory /> + Options FollowSymLinks + AllowOverride None + Require all denied +</Directory> + +<Directory <%= @dir %>/public> + Require all granted + RewriteEngine On + RewriteCond %{REQUEST_FILENAME} !-f + RewriteRule "^.*" index.php/$0 [L,PT] +</Directory> + +<% @env.each do |key, val| %> +SetEnv <%= key %> <%= val %> +<% end %> -- To view, visit https://gerrit.wikimedia.org/r/230373 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d977ce6a15929dfbfc1000b74b979349319b594 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: BryanDavis <[email protected]> Gerrit-Reviewer: Dduvall <[email protected]> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
