BryanDavis has uploaded a new change for review. https://gerrit.wikimedia.org/r/301505
Change subject: [WIP] Provision Striker via scap3 ...................................................................... [WIP] Provision Striker via scap3 Provision the Striker Django web application using scap3. Bug: T141014 Change-Id: I855f9484f799a6847590b5d1196abf903114fa34 --- A modules/role/manifests/striker/uwsgi.pp A modules/striker/manifests/uwsgi.pp 2 files changed, 52 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/05/301505/1 diff --git a/modules/role/manifests/striker/uwsgi.pp b/modules/role/manifests/striker/uwsgi.pp new file mode 100644 index 0000000..78b9778 --- /dev/null +++ b/modules/role/manifests/striker/uwsgi.pp @@ -0,0 +1,3 @@ +class role::striker::web { + include ::striker::uwsgi +} diff --git a/modules/striker/manifests/uwsgi.pp b/modules/striker/manifests/uwsgi.pp new file mode 100644 index 0000000..1a6af35 --- /dev/null +++ b/modules/striker/manifests/uwsgi.pp @@ -0,0 +1,49 @@ +# = Class: striker::uwsgi +# +# Striker is a Django application for managing data related to Tool Labs +# tools. +# +# == Parameters: +# [*deploy_dir*] +# Directory that Striker will be deployed to via scap3. +# +# [*venv_dir*] +# Directory to create/manage Python virtualenv in. +# +# [*port*] +# Port that uWSGI demon should listen on +# +class striker::uwsgi( + $deploy_dir = '/srv/deployment/striker/deploy', + $venv_dir = '/srv/deployment/striker/venv', + $port, +){ + # Packages needed by python wheels + require_package( + 'libffi', + 'libldap2', + 'libmysqlclient', + 'libsasl2', + 'libssl', + 'python3', + 'virtualenv', + ) + + # TODO: generate Striker ini file + + service::uwsgi { 'striker': + port => $port, + config => { + 'chdir' => "${::striker::deploy_dir}/striker", + 'wsgi-file' => 'striker/wsgi.py', + 'plugins' => 'python3', + 'venv' => "${::striker::deploy_dir}/venv", + }, + healthcheck_url => '/', + repo => 'labs/striker/deploy', + sudo_rules => [ + 'ALL=(root) NOPASSWD: /usr/sbin/service uwsgi-striker *', + ], + } +} +# vim:sw=4:ts=4:sts=4:ft=puppet: -- To view, visit https://gerrit.wikimedia.org/r/301505 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I855f9484f799a6847590b5d1196abf903114fa34 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: BryanDavis <bda...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits