Mobrovac has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/376707 )
Change subject: Add the cp-jobqueue profile ...................................................................... Add the cp-jobqueue profile Bug: T175281 Change-Id: I78a09d0d99ae20a38d397da8f8a1faf9dd015fe3 --- M hieradata/role/common/deployment_server.yaml M hieradata/role/common/scb.yaml A modules/profile/manifests/cpjobqueue.pp 3 files changed, 62 insertions(+), 0 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/07/376707/1 diff --git a/hieradata/role/common/deployment_server.yaml b/hieradata/role/common/deployment_server.yaml index ba38195..f82f4d5 100644 --- a/hieradata/role/common/deployment_server.yaml +++ b/hieradata/role/common/deployment_server.yaml @@ -91,6 +91,7 @@ # lvs_service: changeprop citoid/deploy: {} # lvs_service: citoid + cp-jobqueue: {} cxserver/deploy: {} # lvs_service: cxserver dumps/dumps: diff --git a/hieradata/role/common/scb.yaml b/hieradata/role/common/scb.yaml index 6f12fb2..f2e4eec 100644 --- a/hieradata/role/common/scb.yaml +++ b/hieradata/role/common/scb.yaml @@ -91,3 +91,7 @@ # Recommendation API profile::recommendation_api::wdqs_uri: "http://wdqs.discovery.wmnet" + +# ChangePropagation for JobQueue +profile::cpjobqueue::redis_path: "/var/run/nutcracker/redis_%{::site}.sock" +profile::cpjobqueue::jobrunner_host: https://jobrunner.discovery.wmnet diff --git a/modules/profile/manifests/cpjobqueue.pp b/modules/profile/manifests/cpjobqueue.pp new file mode 100644 index 0000000..0592319 --- /dev/null +++ b/modules/profile/manifests/cpjobqueue.pp @@ -0,0 +1,57 @@ +# == Class: profile::cpjobqueue +# +# profile::cpjobqueue is the profile class for ChangeProp for JobQueue, a +# special instance of ChangePropagation that is used to pick up job definitions +# from the main Kafka cluster (EventBus) and sends them for execution on the +# jobrunners. +# +# === Parameters +# +# [*redis_path*] +# The path to Redis' UNIX socket. Note that the password is taken directly +# from the private repository with secrets. +# +# [*jobrunner_host*] +# The address of the LVS end point for jobrunners. +# +# [*kafka_msg_max_bytes*] +# The maximum allowed message size in Kafka. This value *must* match the +# brokers' configuration of the same name. +# +class profile::cpjobqueue( + $redis_path = hiera('profile::cpjobqueue::redis_path'), + $jobrunner_host = hiera('profile::cpjobqueue::jobrunner_host'), + $kafka_msg_max_bytes = hiera('kafka_message_max_bytes'), +) { + + include ::passwords::redis + require ::changeprop::packages + + $kafka_config = kafka_config('main') + + system::role { 'cp-jobqueue': + description => 'ChangePropagation instance for JobQueue jobs', + } + + service::node { 'cp-jobqueue': + repo => 'cp-jobqueue', + port => 7200, + healthcheck_url => '', + has_spec => true, + deployment => 'scap3', + deployment_config => true, + deployment_vars => { + broker_list => $kafka_config['brokers']['string'], + site => $::site, + redis_path => $redis_path, + redis_pass => $::passwords::redis::main_password, + jobrunner_uri => "${jobrunner_host}/rpc/RunSingleJob.php", + kafka_max_bytes => $kafka_msg_max_bytes, + }, + auto_refresh => false, + init_restart => false, + environment => { + 'UV_THREADPOOL_SIZE' => 128, + }, + } +} -- To view, visit https://gerrit.wikimedia.org/r/376707 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I78a09d0d99ae20a38d397da8f8a1faf9dd015fe3 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mobrovac <mobro...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits