Skip to content

publisher: Publish origin_visit objects

This:

  • update the current publisher configuration (add origin visits)
  • deploys the publisher on the swh_eventlog role (getty's)

Related T1466

Test Plan

$ cd puppet-environment
$ cd swh-site
$ git checkout -b deploy_publisher
# dev this diff's content
$ git checkout production
# get back to puppet-environment
$ cd ..
# check the diff applies correctly [1]
$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to deploy_publisher getty
Found host getty.internal.softwareheritage.org
*** Running octocatalog-diff on host getty.internal.softwareheritage.org
diff origin/production/getty.internal.softwareheritage.org current/getty.internal.softwareheritage.org
*******************************************
[0;32;49m+ File[/etc/softwareheritage/journal/publisher.yml] =>[0m
[0;32;49m   parameters =>[0m
[0;32;49m[0;32;49m      "ensure": "present"[0m[0m
[0;32;49m[0;32;49m      "group": "swhstorage"[0m[0m
[0;32;49m[0;32;49m      "mode": "0640"[0m[0m
[0;32;49m[0;32;49m      "notify": "Service[swh-journal-publisher]"[0m[0m
[0;32;49m[0;32;49m      "owner": "root"[0m[0m
[0;32;49m[0;32;49m      "content": >>>[0m[0m
[0;32;49m[0;32;49m---[0m[0m
[0;32;49m[0;32;49mbrokers:[0m[0m
[0;32;49m[0;32;49m- getty.internal.softwareheritage.org[0m[0m
[0;32;49m[0;32;49mtemporary_prefix: swh.tmp_journal.new[0m[0m
[0;32;49m[0;32;49mfinal_prefix: swh.journal.objects[0m[0m
[0;32;49m[0;32;49mconsumer_id: swh.journal.publisher[0m[0m
[0;32;49m[0;32;49mpublisher_id: swh.journal.publisher[0m[0m
[0;32;49m[0;32;49mobject_types:[0m[0m
[0;32;49m[0;32;49m- content[0m[0m
[0;32;49m[0;32;49m- revision[0m[0m
[0;32;49m[0;32;49m- release[0m[0m
[0;32;49m[0;32;49m- origin_visit[0m[0m
[0;32;49m[0;32;49mmax_messages: 1000[0m[0m
[0;32;49m[0;32;49mstorage:[0m[0m
[0;32;49m[0;32;49m  cls: remote[0m[0m
[0;32;49m[0;32;49m  args:[0m[0m
[0;32;49m[0;32;49m    url: http://uffizi.internal.softwareheritage.org:5002/[0m[0m
[0;32;49m[0;32;49m<<<[0m[0m
*******************************************
[0;32;49m+ File[/etc/systemd/system/swh-journal-publisher.service] =>[0m
[0;32;49m   parameters =>[0m
[0;32;49m[0;32;49m      "ensure": "file"[0m[0m
[0;32;49m[0;32;49m      "group": "root"[0m[0m
[0;32;49m[0;32;49m      "mode": "0444"[0m[0m
[0;32;49m[0;32;49m      "notify": "Class[Systemd::Systemctl::Daemon_reload]"[0m[0m
[0;32;49m[0;32;49m      "owner": "root"[0m[0m
[0;32;49m[0;32;49m      "content": >>>[0m[0m
[0;32;49m[0;32;49m# Journal Publisher unit file[0m[0m
[0;32;49m[0;32;49m# Managed by puppet class profile::swh::deploy::journal_publisher[0m[0m
[0;32;49m[0;32;49m# Changes will be overwritten[0m[0m
[0;32;49m[0;32;49m[0m[0m
[0;32;49m[0;32;49m[Unit][0m[0m
[0;32;49m[0;32;49mDescription=Software Heritage Journal Publisher[0m[0m
[0;32;49m[0;32;49mRequires=network.target kafka.service[0m[0m
[0;32;49m[0;32;49mAfter=network.target kafka.service[0m[0m
[0;32;49m[0;32;49m[0m[0m
[0;32;49m[0;32;49m[Service][0m[0m
[0;32;49m[0;32;49mUser=swhstorage[0m[0m
[0;32;49m[0;32;49mGroup=swhstorage[0m[0m
[0;32;49m[0;32;49mType=simple[0m[0m
[0;32;49m[0;32;49mExecStart=/usr/bin/python3 -m swh.journal.publisher[0m[0m
[0;32;49m[0;32;49mRestart=always[0m[0m
[0;32;49m[0;32;49mRestartSec=5s[0m[0m
[0;32;49m[0;32;49m[0m[0m
[0;32;49m[0;32;49m[Install][0m[0m
[0;32;49m[0;32;49mWantedBy=multi-user.target[0m[0m
[0;32;49m[0;32;49m<<<[0m[0m
*******************************************
[0;32;49m+ Service[swh-journal-publisher] =>[0m
[0;32;49m   parameters =>[0m
[0;32;49m[0;32;49m      "enable": true[0m[0m
[0;32;49m[0;32;49m      "ensure": "running"[0m[0m
*******************************************
[0;32;49m+ Systemd::Unit_file[swh-journal-publisher.service] =>[0m
[0;32;49m   parameters =>[0m
[0;32;49m[0;32;49m      "ensure": "present"[0m[0m
[0;32;49m[0;32;49m      "notify": ["Service[swh-journal-publisher]"][0m[0m
[0;32;49m[0;32;49m      "path": "/etc/systemd/system"[0m[0m
[0;32;49m[0;32;49m      "content": >>>[0m[0m
[0;32;49m[0;32;49m# Journal Publisher unit file[0m[0m
[0;32;49m[0;32;49m# Managed by puppet class profile::swh::deploy::journal_publisher[0m[0m
[0;32;49m[0;32;49m# Changes will be overwritten[0m[0m
[0;32;49m[0;32;49m[0m[0m
[0;32;49m[0;32;49m[Unit][0m[0m
[0;32;49m[0;32;49mDescription=Software Heritage Journal Publisher[0m[0m
[0;32;49m[0;32;49mRequires=network.target kafka.service[0m[0m
[0;32;49m[0;32;49mAfter=network.target kafka.service[0m[0m
[0;32;49m[0;32;49m[0m[0m
[0;32;49m[0;32;49m[Service][0m[0m
[0;32;49m[0;32;49mUser=swhstorage[0m[0m
[0;32;49m[0;32;49mGroup=swhstorage[0m[0m
[0;32;49m[0;32;49mType=simple[0m[0m
[0;32;49m[0;32;49mExecStart=/usr/bin/python3 -m swh.journal.publisher[0m[0m
[0;32;49m[0;32;49mRestart=always[0m[0m
[0;32;49m[0;32;49mRestartSec=5s[0m[0m
[0;32;49m[0;32;49m[0m[0m
[0;32;49m[0;32;49m[Install][0m[0m
[0;32;49m[0;32;49mWantedBy=multi-user.target[0m[0m
[0;32;49m[0;32;49m<<<[0m[0m
*******************************************
*** End octocatalog-diff on getty.internal.softwareheritage.org

Migrated from D929 (view on Phabricator)

Merge request reports