Alexandros Kosiaris has submitted this change and it was merged. Change subject: ores: Scap3 deployment configurations ......................................................................
ores: Scap3 deployment configurations Change-Id: Ia133277a17a5757f81f47fed2146e406f443c135 --- M hieradata/common/scap/server.yaml M hieradata/role/eqiad/sca.yaml M modules/ores/manifests/base.pp M modules/ores/manifests/config.pp M modules/ores/manifests/web.pp 5 files changed, 42 insertions(+), 21 deletions(-) Approvals: Alexandros Kosiaris: Verified; Looks good to me, approved diff --git a/hieradata/common/scap/server.yaml b/hieradata/common/scap/server.yaml index 03826ad..f23b33b 100644 --- a/hieradata/common/scap/server.yaml +++ b/hieradata/common/scap/server.yaml @@ -57,3 +57,6 @@ # cxserver is the ContentTranslation server. cxserver/deploy: repository: cxserver/deploy + + # ores is the Objective Revision Evaluation Service + ores/deploy: {} diff --git a/hieradata/role/eqiad/sca.yaml b/hieradata/role/eqiad/sca.yaml index 6512107..c3c8730 100644 --- a/hieradata/role/eqiad/sca.yaml +++ b/hieradata/role/eqiad/sca.yaml @@ -1,4 +1,4 @@ lvs::realserver::realserver_ips: - '10.2.2.11' # apertium.svc.eqiad.wmnet - '10.2.2.16' # zotero.svc.eqiad.wmnet - +ores::scapdeploy::redis_host: oresrdb1001.eqiad.wmnet. diff --git a/modules/ores/manifests/base.pp b/modules/ores/manifests/base.pp index dac92e2..059e155 100644 --- a/modules/ores/manifests/base.pp +++ b/modules/ores/manifests/base.pp @@ -1,7 +1,6 @@ class ores::base( - $branch = 'deploy', - $config_path = '/srv/ores/config', - $venv_path = '/srv/ores/venv', + $config_path = '/srv/deployment/ores/deploy', + $venv_path = '/srv/deployment/ores/venv', ) { # Let's use a virtualenv for maximum flexibility - we can convert # this to deb packages in the future if needed. We also install build tools @@ -33,18 +32,4 @@ 'myspell-pt', 'myspell-ru', 'myspell-uk') - - file { '/srv/ores': - ensure => directory, - owner => 'www-data', - group => 'www-data', - mode => '0775', - } - - file { $config_path: - ensure => directory, - owner => 'www-data', - group => 'www-data', - require => File['/srv/ores'], - } } diff --git a/modules/ores/manifests/config.pp b/modules/ores/manifests/config.pp index a74bed8..893f7e3 100644 --- a/modules/ores/manifests/config.pp +++ b/modules/ores/manifests/config.pp @@ -1,13 +1,16 @@ define ores::config( $priority, $config, + $owner='www-data', + $group='www-data', + $mode='0660', ) { require ::ores::base file { "${::ores::base::config_path}/config/${priority}-${title}.yaml": content => ordered_yaml($config), - owner => 'www-data', - group => 'www-data', - mode => '0660', + owner => $owner, + group => $group, + mode => $mode, } } diff --git a/modules/ores/manifests/web.pp b/modules/ores/manifests/web.pp index fdf94b3..9b75d1a 100644 --- a/modules/ores/manifests/web.pp +++ b/modules/ores/manifests/web.pp @@ -2,6 +2,7 @@ # Sets up a uwsgi based web server for ORES running python3 class ores::web( $workers_per_core = 4, + $redis_host = '127.0.0.1', ) { require ores::base @@ -17,4 +18,33 @@ processes => $processes, } } + + # For now puppet ships the config until we migrate it to scap3 as well + ores::config { 'main': + # lint:ignore:arrow_alignment + config => { + 'ores' => { + 'data_paths' => { + 'nltk' => "${::ores::base::config_path}/submodules/wheels/nltk/", + } + }, + 'score_caches' => { + 'ores_redis' => { + 'host' => $redis_host, + 'port' => '6380', + } + }, + 'score_processors' => { + 'ores_celery' => { + 'BROKER_URL' => "redis://${redis_host}:6379", + 'CELERY_RESULT_BACKEND' => "redis://${redis_host}:6379", + } + }, + }, + priority => '99', + mode => '0444', + owner => 'deploy-service', + group => 'deploy-service', + # lint:endignore + } } -- To view, visit https://gerrit.wikimedia.org/r/280403 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ia133277a17a5757f81f47fed2146e406f443c135 Gerrit-PatchSet: 56 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: 20after4 <mmod...@wikimedia.org> Gerrit-Reviewer: Alexandros Kosiaris <akosia...@wikimedia.org> Gerrit-Reviewer: Giuseppe Lavagetto <glavage...@wikimedia.org> Gerrit-Reviewer: Ladsgroup <ladsgr...@gmail.com> Gerrit-Reviewer: Mobrovac <mobro...@wikimedia.org> Gerrit-Reviewer: Thcipriani <tcipri...@wikimedia.org> Gerrit-Reviewer: Yuvipanda <yuvipa...@wikimedia.org> Gerrit-Reviewer: jenkins-bot <> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits