Skip to content

Deploy bzr loader in production

Related to T4214

Test Plan

octo-diff:

  • prod workers: new service swh-worker@loader_bzr to deploy
  • staging workers: nothing to do, moving along
$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging worker01
Found host worker01.softwareheritage.org
WARN     -> Environment "staging-add-prometheus-metrics" contained non-word characters, correcting name to staging_add_prometheus_metrics
WARN     -> Environment "staging-bullseye-rabbitmq-plugin" contained non-word characters, correcting name to staging_bullseye_rabbitmq_plugin
WARN     -> Environment "staging-check-journal-client" contained non-word characters, correcting name to staging_check_journal_client
WARN     -> Environment "staging-check-journal-client-2nd-implementation" contained non-word characters, correcting name to staging_check_journal_client_2nd_implementation
WARN     -> Environment "staging-check-journal-client-first-implem" contained non-word characters, correcting name to staging_check_journal_client_first_implem
WARN     -> Environment "staging-pin" contained non-word characters, correcting name to staging_pin
Cloning into '/tmp/swh-ocd.jNtlkZ5g/environments/production/data/private'...
done.
Cloning into '/tmp/swh-ocd.jNtlkZ5g/environments/staging/data/private'...
done.
*** Running octocatalog-diff on host worker01.softwareheritage.org
I, [2022-05-10T14:15:17.603389 #1538447]  INFO -- : Catalogs compiled for worker01.softwareheritage.org
I, [2022-05-10T14:15:17.941587 #1538447]  INFO -- : Diffs computed for worker01.softwareheritage.org
diff origin/production/worker01.softwareheritage.org current/worker01.softwareheritage.org
*******************************************
+ Concat_fragment[profile::cron::swh-worker-loader_bzr-autorestart] =>
   parameters =>
      "order": "10"
      "tag": "profile::cron::swh-worker"
      "target": "profile::cron::swh-worker"
      "content": >>>
# Cron snippet swh-worker-loader_bzr-autorestart
10-55/15 * * * * root chronic /usr/local/sbin/swh-worker-ping-restart loader_bzr@worker01.internal.softwareheritage.org loader_bzr
<<<
*******************************************
+ File[/etc/softwareheritage/loader_bzr.yml] =>
   parameters =>
      "ensure": "present"
      "group": "swhworker"
      "mode": "0640"
      "owner": "swhworker"
      "content": >>>
---
storage:
  cls: pipeline
  steps:
  - cls: buffer
    min_batch_size:
      content: 1000
      content_bytes: 52428800
      directory: 1000
      directory_entries: 12000
      revision: 1000
      revision_parents: 2000
      revision_bytes: 52428800
      release: 1000
      release_bytes: 52428800
      extid: 1000
  - cls: filter
  - cls: retry
  - cls: remote
    args:
      url: http://saam.internal.softwareheritage.org:5002/
max_content_size: 104857600
clone_timeout_seconds: 7200
celery:
  task_broker: amqp://swhconsumer:swh-deploy-worker-task_broker-password@rabbitmq:5672/%2f
  task_queues:
  - swh.loader.bzr.tasks.LoadBazaar
<<<
*******************************************
+ File[/etc/systemd/system/swh-worker@loader_bzr.service.d/parameters.conf] =>
   parameters =>
      "ensure": "file"
      "group": "root"
      "mode": "0444"
      "notify": ["Class[Systemd::Systemctl::Daemon_reload]"]
      "owner": "root"
      "selinux_ignore_defaults": false
      "show_diff": true
      "content": >>>
# Managed by puppet - modifications will be overwritten
# In defined class profile::swh::deploy::worker::instance

[Service]
Environment=CONCURRENCY=1
Environment=MAX_TASKS_PER_CHILD=5
Environment=LOGLEVEL=info
Environment=SWH_SENTRY_DSN=https://swh::deploy::loader_bzr::sentry_token@sentry.softwareheritage.org/22
Environment=SWH_SENTRY_ENVIRONMENT=production
Environment=SWH_MAIN_PACKAGE=swh.loader.bzr


PrivateTmp=true
<<<
*******************************************
+ File[/etc/systemd/system/swh-worker@loader_bzr.service.d] =>
   parameters =>
      "ensure": "directory"
      "group": "root"
      "owner": "root"
      "purge": true
      "recurse": true
      "selinux_ignore_defaults": false
*******************************************
+ Package[python3-swh.loader.bzr] =>
   parameters =>
      "ensure": "present"
*******************************************
+ Profile::Cron::D[swh-worker-loader_bzr-autorestart] =>
   parameters =>
      "command": "chronic /usr/local/sbin/swh-worker-ping-restart loader_bzr@worker01.internal.softwareheritage.org loader_bzr"
      "minute": "fqdn_rand/15"
      "target": "swh-worker"
      "unique_tag": "swh-worker-loader_bzr-autorestart"
      "user": "root"
*******************************************
+ Profile::Swh::Deploy::Worker::Instance[loader_bzr] =>
   parameters =>
      "ensure": "present"
      "extra_config": {}
      "instance_name": "loader_bzr"
      "merge_policy": "deep"
      "private_tmp": true
      "send_task_events": false
      "sentry_name": "loader_bzr"
*******************************************
+ Service[swh-worker@loader_bzr] =>
   parameters =>
      "enable": true
*******************************************
+ Systemd::Dropin_file[swh-worker@loader_bzr/parameters.conf] =>
   parameters =>
      "daemon_reload": "lazy"
      "ensure": "present"
      "filename": "parameters.conf"
      "group": "root"
      "mode": "0444"
      "owner": "root"
      "path": "/etc/systemd/system"
      "selinux_ignore_defaults": false
      "show_diff": true
      "unit": "swh-worker@loader_bzr.service"
      "content": >>>
# Managed by puppet - modifications will be overwritten
# In defined class profile::swh::deploy::worker::instance

[Service]
Environment=CONCURRENCY=1
Environment=MAX_TASKS_PER_CHILD=5
Environment=LOGLEVEL=info
Environment=SWH_SENTRY_DSN=https://swh::deploy::loader_bzr::sentry_token@sentry.softwareheritage.org/22
Environment=SWH_SENTRY_ENVIRONMENT=production
Environment=SWH_MAIN_PACKAGE=swh.loader.bzr


PrivateTmp=true
<<<
*******************************************
*** End octocatalog-diff on worker01.softwareheritage.org
$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging worker0.internal.staging.swh.network
Found host worker0.internal.staging.swh.network
WARN     -> Environment "staging-add-prometheus-metrics" contained non-word characters, correcting name to staging_add_prometheus_metrics
WARN     -> Environment "staging-bullseye-rabbitmq-plugin" contained non-word characters, correcting name to staging_bullseye_rabbitmq_plugin
WARN     -> Environment "staging-check-journal-client" contained non-word characters, correcting name to staging_check_journal_client
WARN     -> Environment "staging-check-journal-client-2nd-implementation" contained non-word characters, correcting name to staging_check_journal_client_2nd_implementation
WARN     -> Environment "staging-check-journal-client-first-implem" contained non-word characters, correcting name to staging_check_journal_client_first_implem
WARN     -> Environment "staging-pin" contained non-word characters, correcting name to staging_pin
Cloning into '/tmp/swh-ocd.ZIEzk7ph/environments/production/data/private'...
done.
Cloning into '/tmp/swh-ocd.ZIEzk7ph/environments/staging/data/private'...
done.
*** Running octocatalog-diff on host worker0.internal.staging.swh.network
I, [2022-05-10T14:15:38.651174 #1540853]  INFO -- : Catalogs compiled for worker0.internal.staging.swh.network
I, [2022-05-10T14:15:39.023626 #1540853]  INFO -- : Diffs computed for worker0.internal.staging.swh.network
I, [2022-05-10T14:15:39.023659 #1540853]  INFO -- : No differences
*** End octocatalog-diff on worker0.internal.staging.swh.network

Migrated from D7802 (view on Phabricator)

Merge request reports