Skip to content

staging: Deploy maven loader

Related to T3746

Test Plan

octo-diff: Install new service on staging workers:

$ $SWH_PUPPET_ENVIRONMENT_HOME/bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging worker0.internal.staging.swh.network
...
*** Running octocatalog-diff on host worker0.internal.staging.swh.network
I, [2022-04-08T15:18:29.586207 #3125668]  INFO -- : Catalogs compiled for worker0.internal.staging.swh.network
I, [2022-04-08T15:18:29.976387 #3125668]  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_maven-autorestart] =>
   parameters =>
      "order": "10"
      "tag": "profile::cron::swh-worker"
      "target": "profile::cron::swh-worker"
      "content": >>>
# Cron snippet swh-worker-loader_maven-autorestart
9-54/15 * * * * root chronic /usr/local/sbin/swh-worker-ping-restart loader_maven@worker0.internal.staging.swh.network loader_maven
<<<
*******************************************
  File[/etc/softwareheritage/lister.yml] =>
   parameters =>
     content =>
      @@ -35,4 +35,6 @@
         - swh.lister.sourceforge.tasks.FullSourceForgeLister
         - swh.lister.sourceforge.tasks.IncrementalSourceForgeLister
      +  - swh.lister.maven.tasks.FullMavenLister
      +  - swh.lister.maven.tasks.IncrementalMavenLister
       credentials:
         github:
*******************************************
+ File[/etc/softwareheritage/loader_maven.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://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.maven.tasks.LoadMaven
<<<
*******************************************
+ File[/etc/systemd/system/swh-worker@loader_maven.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
<<<
*******************************************
+ File[/etc/systemd/system/swh-worker@loader_maven.service.d] =>
   parameters =>
      "ensure": "directory"
      "group": "root"
      "owner": "root"
      "purge": true
      "recurse": true
      "selinux_ignore_defaults": false
*******************************************
+ Profile::Cron::D[swh-worker-loader_maven-autorestart] =>
   parameters =>
      "command": "chronic /usr/local/sbin/swh-worker-ping-restart loader_maven@worker0.internal.staging.swh.network loader_maven"
      "minute": "fqdn_rand/15"
      "target": "swh-worker"
      "unique_tag": "swh-worker-loader_maven-autorestart"
      "user": "root"
*******************************************
+ Profile::Swh::Deploy::Worker::Instance[loader_maven] =>
   parameters =>
      "ensure": "present"
      "instance_name": "loader_maven"
      "merge_policy": "deep"
      "private_tmp": false
      "send_task_events": false
      "sentry_name": "loader_core"
*******************************************
+ Service[swh-worker@loader_maven] =>
   parameters =>
      "enable": true
*******************************************
+ Systemd::Dropin_file[swh-worker@loader_maven/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_maven.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
<<<
*******************************************
*** End octocatalog-diff on worker0.internal.staging.swh.network

Migrated from D7540 (view on Phabricator)

Merge request reports

Loading