Thcipriani has uploaded a new change for review. https://gerrit.wikimedia.org/r/213198
Change subject: Initial phragile puppet role ...................................................................... Initial phragile puppet role Change-Id: I60cf0a60cfefbdc4b63b33660ef0029b354fd376 --- M puppet/hieradata/common.yaml A puppet/modules/role/manifests/phragile.pp A puppet/modules/role/templates/phragile.env.erb 3 files changed, 65 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/vagrant refs/changes/98/213198/1 diff --git a/puppet/hieradata/common.yaml b/puppet/hieradata/common.yaml index d8263e1..d961523 100644 --- a/puppet/hieradata/common.yaml +++ b/puppet/hieradata/common.yaml @@ -183,6 +183,9 @@ phabricator::deploy_dir: "%{hiera('mwv::services_dir')}" phabricator::vhost_name: phabricator.local.wmftest.net +phragile::install_dir: /vagrant/phragile +phragile::debug: true + # We are masterless and have no need to run an agent. puppet::agent::ensure: stopped puppet::agent::enable: false diff --git a/puppet/modules/role/manifests/phragile.pp b/puppet/modules/role/manifests/phragile.pp new file mode 100644 index 0000000..affad38 --- /dev/null +++ b/puppet/modules/role/manifests/phragile.pp @@ -0,0 +1,31 @@ +# == Class: role::phragile +# Class to setup phragile install +class role::phragile( + $install_dir, + $debug, +) { + include ::role::phabricator + + phabricator::config { 'phabricator.show-prototypes': + value => true, + } + + git::clone { 'https://github.com/wmde/phragile.git': + directory => $install_dir, + remote => 'https://github.com/wmde/phragile.git', + } + + file { "${install_dir}/.env": + source => template('role/phragile.env.erb'), + require => Git::Clone['https://github.com/wmde/phragile.git'], + } + + exec { 'update_phalicity_app_key': + command => "(printf 'APP_KEY=' && php artisan key:generate) >> ${install_dir}/.env", + cwd => $install_dir, + unless => "grep -q ^APP_KEY ${install_dir}/.env", + require => File["${install_dir}/.env"], + } + + php::composer::install { $install_dir: } +} diff --git a/puppet/modules/role/templates/phragile.env.erb b/puppet/modules/role/templates/phragile.env.erb new file mode 100644 index 0000000..edbe1cb --- /dev/null +++ b/puppet/modules/role/templates/phragile.env.erb @@ -0,0 +1,31 @@ +# This file is managed by puppet +APP_ENV=local +APP_DEBUG=<%= @debug %> + +DB_HOST=localhost +DB_DATABASE=phragile +DB_USERNAME=root +DB_PASSWORD=<%= scope['mysql::root_password'] %> + +CACHE_DRIVER=file +SESSION_DRIVER=file + +# Phragile client ID from your Phabricator OAuth server +OAUTH_CLIENT_ID= +# Phragile client secret from your Phabricator OAuth server +OAUTH_CLIENT_SECRET= + +PHABRICATOR_URL=http://<%= scope['phabricator::vhost_name'] %><%= scope['::port_fragment'] %>/ + +# Name of your Phragile Bot user in your Phabricator instance +PHRAGILE_BOT_NAME=Phragile +# Conduit certificate of the Phragile Bot user +PHRAGILE_BOT_CERTIFICATE= + +# Name of your custom field for story points in Maniphest +MANIPHEST_STORY_POINTS_FIELD=std:maniphest:WMDE:story_points + +# The tag PHID that indicates whether a task is in review +REVIEW_TAG_PHID= +# Comma separated names of Phabricator user names that are allowed to create projects on Phragile +PHRAGILE_ADMINS= -- To view, visit https://gerrit.wikimedia.org/r/213198 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I60cf0a60cfefbdc4b63b33660ef0029b354fd376 Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/vagrant Gerrit-Branch: master Gerrit-Owner: Thcipriani <tcipri...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits