Page MenuHomeSoftware Heritage

publisher: Publish origin_visit objects
ClosedPublic

Authored by ardumont on Jan 14 2019, 10:23 AM.

Details

Summary

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
*******************************************
+ File[/etc/softwareheritage/journal/publisher.yml] =>
   parameters =>
      "ensure": "present"
      "group": "swhstorage"
      "mode": "0640"
      "notify": "Service[swh-journal-publisher]"
      "owner": "root"
      "content": >>>
---
brokers:
- getty.internal.softwareheritage.org
temporary_prefix: swh.tmp_journal.new
final_prefix: swh.journal.objects
consumer_id: swh.journal.publisher
publisher_id: swh.journal.publisher
object_types:
- content
- revision
- release
- origin_visit
max_messages: 1000
storage:
  cls: remote
  args:
    url: http://uffizi.internal.softwareheritage.org:5002/
<<<
*******************************************
+ File[/etc/systemd/system/swh-journal-publisher.service] =>
   parameters =>
      "ensure": "file"
      "group": "root"
      "mode": "0444"
      "notify": "Class[Systemd::Systemctl::Daemon_reload]"
      "owner": "root"
      "content": >>>
# Journal Publisher unit file
# Managed by puppet class profile::swh::deploy::journal_publisher
# Changes will be overwritten

[Unit]
Description=Software Heritage Journal Publisher
Requires=network.target kafka.service
After=network.target kafka.service

[Service]
User=swhstorage
Group=swhstorage
Type=simple
ExecStart=/usr/bin/python3 -m swh.journal.publisher
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target
<<<
*******************************************
+ Service[swh-journal-publisher] =>
   parameters =>
      "enable": true
      "ensure": "running"
*******************************************
+ Systemd::Unit_file[swh-journal-publisher.service] =>
   parameters =>
      "ensure": "present"
      "notify": ["Service[swh-journal-publisher]"]
      "path": "/etc/systemd/system"
      "content": >>>
# Journal Publisher unit file
# Managed by puppet class profile::swh::deploy::journal_publisher
# Changes will be overwritten

[Unit]
Description=Software Heritage Journal Publisher
Requires=network.target kafka.service
After=network.target kafka.service

[Service]
User=swhstorage
Group=swhstorage
Type=simple
ExecStart=/usr/bin/python3 -m swh.journal.publisher
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target
<<<
*******************************************
*** End octocatalog-diff on getty.internal.softwareheritage.org

[1] for the setup: https://wiki.softwareheritage.org/wiki/Puppet_setup#Local_puppet_manifest_diffing_with_octocatalog-diff

Diff Detail

Repository
rSPSITE puppet-swh-site
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.