Page MenuHomeSoftware Heritage

Install graph services as-is
ClosedPublic

Authored by ardumont on Sep 7 2021, 12:18 PM.

Details

Summary

As-is as in what's actually deployed in granet.

Related to T3564

Test Plan

octo-diff on granet:

bin/octocatalog-diff --octocatalog-diff-args --no-truncate-details --to staging granet
Found host granet.internal.softwareheritage.org
...
+ File[/etc/systemd/system/swhgraphdev.service] =>
   parameters =>
      "ensure": "file"
      "group": "root"
      "mode": "0644"
      "notify": "Class[Systemd::Systemctl::Daemon_reload]"
      "owner": "root"
      "show_diff": true
      "content": >>>
# Managed by puppet class profile::swh::deploy::graph
# Changes will be overwritten

[Unit]
Description=swh graph
After=swhgraphshm.service
Requires=swhgraphshm.service

[Service]
Type=simple
User=swhworker
Group=swhworker
ExecStart=/opt/swhgraph_venv/bin/swh graph rpc-serve -g /dev/shm/swh-graph/default/graph

[Install]
WantedBy=multi-user.target
<<<
*******************************************
+ File[/etc/systemd/system/swhgraphshm.service] =>
   parameters =>
      "ensure": "file"
      "group": "root"
      "mode": "0644"
      "notify": "Class[Systemd::Systemctl::Daemon_reload]"
      "owner": "root"
      "show_diff": true
      "content": >>>
# Managed by puppet class profile::swh::deploy::graph
# Changes will be overwritten

[Unit]
Description=swh graph shm mapper

[Service]
Type=oneshot
User=swhworker
Group=swhworker
RemainAfterExit=yes
# ExecStart=/opt/swhgraph_venv/bin/swh graph cachemount --graph /srv/softwareheritage/ssd/graph/2020-05-20/compressed/graph --cache /dev/shm/swh-graph/default
ExecStart=mkdir -p /dev/shm/swh-graph/default
ExecStart=sh -c "ln -s /srv/softwareheritage/ssd/graph/2020-12-15/compressed/* /dev/shm/swh-graph/default"
ExecStart=sh -c "cp --remove-destination /srv/softwareheritage/ssd/graph/2020-12-15/compressed/graph.graph /dev/shm/swh-graph/default"
ExecStart=sh -c "cp --remove-destination /srv/softwareheritage/ssd/graph/2020-12-15/compressed/graph-transposed.graph /dev/shm/swh-graph/default"
ExecStop=rm -rf /dev/shm/swh-graph/default

[Install]
WantedBy=multi-user.target
<<<
*******************************************
+ Package[python3-venv] =>
   parameters =>
      "ensure": "present"
*******************************************
+ Service[swhgraphdev] =>
   parameters =>
      "enable": true
      "ensure": "running"
*******************************************
+ Service[swhgraphshm] =>
   parameters =>
      "enable": false
      "ensure": "present"
*******************************************
+ Systemd::Unit_file[swhgraphdev.service] =>
   parameters =>
      "ensure": "present"
      "group": "root"
      "mode": "0644"
      "notify": ["Service[swhgraphdev]"]
      "owner": "root"
      "path": "/etc/systemd/system"
      "show_diff": true
      "content": >>>
# Managed by puppet class profile::swh::deploy::graph
# Changes will be overwritten

[Unit]
Description=swh graph
After=swhgraphshm.service
Requires=swhgraphshm.service

[Service]
Type=simple
User=swhworker
Group=swhworker
ExecStart=/opt/swhgraph_venv/bin/swh graph rpc-serve -g /dev/shm/swh-graph/default/graph

[Install]
WantedBy=multi-user.target
<<<
*******************************************
+ Systemd::Unit_file[swhgraphshm.service] =>
   parameters =>
      "ensure": "present"
      "group": "root"
      "mode": "0644"
      "notify": ["Service[swhgraphshm]"]
      "owner": "root"
      "path": "/etc/systemd/system"
      "show_diff": true
      "content": >>>
# Managed by puppet class profile::swh::deploy::graph
# Changes will be overwritten

[Unit]
Description=swh graph shm mapper

[Service]
Type=oneshot
User=swhworker
Group=swhworker
RemainAfterExit=yes
# ExecStart=/opt/swhgraph_venv/bin/swh graph cachemount --graph /srv/softwareheritage/ssd/graph/2020-05-20/compressed/graph --cache /dev/shm/swh-graph/default
ExecStart=mkdir -p /dev/shm/swh-graph/default
ExecStart=sh -c "ln -s /srv/softwareheritage/ssd/graph/2020-12-15/compressed/* /dev/shm/swh-graph/default"
ExecStart=sh -c "cp --remove-destination /srv/softwareheritage/ssd/graph/2020-12-15/compressed/graph.graph /dev/shm/swh-graph/default"
ExecStart=sh -c "cp --remove-destination /srv/softwareheritage/ssd/graph/2020-12-15/compressed/graph-transposed.graph /dev/shm/swh-graph/default"
ExecStop=rm -rf /dev/shm/swh-graph/default

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

Diff Detail

Repository
rSPSITE puppet-swh-site
Branch
staging
Lint
Lint Skipped
Unit
Unit Tests Skipped
Build Status
Buildable 23396
Build 36509: arc lint + arc unit

Event Timeline

ardumont created this revision.

Drop the icinga checks part, moved it in D6200

ardumont retitled this revision from Install graph services as-is and add icinga checks to Install graph services as-is.
ardumont edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Sep 8 2021, 2:22 PM
This revision was automatically updated to reflect the committed changes.