Page MenuHomeSoftware Heritage

staging: Deploy opam loader service
ClosedPublic

Authored by ardumont on Aug 5 2021, 4:48 PM.

Details

Summary

Related to T3438

Test Plan

bin/octocatalog-diff

Expectedly diff shows deployment of the new service for staging worker, nothing for the
production ones

bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging worker0.internal.staging.swh.network
Found host worker0.internal.staging.swh.network
...
*** Running octocatalog-diff on host worker0.internal.staging.swh.network
I, [2021-08-05T16:46:05.285641 #17822]  INFO -- : Catalogs compiled for worker0.internal.staging.swh.network
I, [2021-08-05T16:46:06.450570 #17822]  INFO -- : Diffs computed for worker0.internal.staging.swh.network
diff origin/production/worker0.internal.staging.swh.network current/worker0.internal.staging.swh.network
*******************************************
+ Concat_fragment[profile::cron::swh-worker-loader_opam-autorestart] =>
   parameters =>
      "order": "10"
      "tag": "profile::cron::swh-worker"
      "target": "profile::cron::swh-worker"
      "content": >>>
# Cron snippet swh-worker-loader_opam-autorestart
7-52/15 * * * * root chronic /usr/local/sbin/swh-worker-ping-restart loader_opam@worker0.internal.staging.swh.network loader_opam
<<<
*******************************************
+ File[/etc/softwareheritage/loader_opam.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
      revision: 1000
      release: 1000
  - cls: filter
  - cls: retry
  - cls: remote
    args:
      url: http://storage1.internal.staging.swh.network:5002/
max_content_size: 104857600
celery:
  task_broker: amqp://swhconsumer:swh-deploy-worker-task_broker-password@scheduler0.internal.staging.swh.network:5672/%2f
  task_queues:
  - swh.loader.package.opam.tasks.LoadOpam
<<<
*******************************************
+ File[/etc/systemd/system/swh-worker@loader_opam.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_core::sentry_token@sentry.softwareheritage.org/9
Environment=SWH_SENTRY_ENVIRONMENT=staging
Environment=SWH_MAIN_PACKAGE=swh.loader.core


PrivateTmp=true
<<<
*******************************************
+ File[/etc/systemd/system/swh-worker@loader_opam.service.d] =>
   parameters =>
      "ensure": "directory"
      "group": "root"
      "owner": "root"
      "purge": true
      "recurse": true
      "selinux_ignore_defaults": false
*******************************************
+ Package[opam] =>
   parameters =>
      "ensure": "present"
*******************************************
+ Profile::Cron::D[swh-worker-loader_opam-autorestart] =>
   parameters =>
      "command": "chronic /usr/local/sbin/swh-worker-ping-restart loader_opam@worker0.internal.staging.swh.network loader_opam"
      "minute": "fqdn_rand/15"
      "target": "swh-worker"
      "unique_tag": "swh-worker-loader_opam-autorestart"
      "user": "root"
*******************************************
+ Profile::Swh::Deploy::Worker::Instance[loader_opam] =>
   parameters =>
      "ensure": "present"
      "instance_name": "loader_opam"
      "merge_policy": "deep"
      "private_tmp": true
      "sentry_name": "loader_core"
*******************************************
+ Service[swh-worker@loader_opam] =>
   parameters =>
      "enable": true
*******************************************
+ Systemd::Dropin_file[swh-worker@loader_opam/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_opam.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_core::sentry_token@sentry.softwareheritage.org/9
Environment=SWH_SENTRY_ENVIRONMENT=staging
Environment=SWH_MAIN_PACKAGE=swh.loader.core


PrivateTmp=true
<<<
*******************************************
*** End octocatalog-diff on worker0.internal.staging.swh.network
$ bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging worker01
...
*** Running octocatalog-diff on host worker01.softwareheritage.org
I, [2021-08-05T16:46:41.062177 #22845]  INFO -- : Catalogs compiled for worker01.softwareheritage.org
I, [2021-08-05T16:46:42.187604 #22845]  INFO -- : Diffs computed for worker01.softwareheritage.org
I, [2021-08-05T16:46:42.187647 #22845]  INFO -- : No differences
*** End octocatalog-diff on worker01.softwareheritage.org

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
staging
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 22903
Build 35715: arc lint + arc unit