diff --git a/README.md b/README.md index fc4ac999..8aadcc23 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,7 @@ PyHSS uses a queued microservices model. Each service performs a specific set of The following services make up PyHSS: - diameterService.py: Handles receiving and sending of diameter messages, and diameter client connection state. + - gsupService.py: Handles receiving and sending of GSUP messages to interact with 2G/3G Osmocom components. - hssService.py: Provides decoding and encoding of diameter requests and responses, as well as logic to perform as a HSS. - apiService.py: Provides the API, to allow management of PyHSS. - georedService.py: Sends georaphic redundancy messages to geored peers when defined. Also handles webhook messages. diff --git a/debian/pyhss.install b/debian/pyhss.install index 7c7b805c..d5b990e5 100644 --- a/debian/pyhss.install +++ b/debian/pyhss.install @@ -3,6 +3,7 @@ # * pyhss_geored.service: disabled in the default config # * pyhss_log.service: using systemd's journal instead # * pyhss.service: meta-service making assumptions about what services are used +/systemd/pyhss_api.service /lib/systemd/system/ /systemd/pyhss_diameter.service /lib/systemd/system/ /systemd/pyhss_gsup.service /lib/systemd/system/ /systemd/pyhss_hss.service /lib/systemd/system/ diff --git a/systemd/pyhss.service b/systemd/pyhss.service index 1b6d02a8..98542ff1 100644 --- a/systemd/pyhss.service +++ b/systemd/pyhss.service @@ -1,3 +1,7 @@ +# Legacy meta-service with possibly outdated assumptions on which database +# (mysql, default is now sqlite and postgres is also supported) and services +# (log and geored are typically not needed) are being used. Consider running +# individual services that you actually want to have in your setup instead. [Unit] Description=PyHSS After=network-online.target mysql.service diff --git a/systemd/pyhss_api.service b/systemd/pyhss_api.service index ab930466..fac8be2c 100644 --- a/systemd/pyhss_api.service +++ b/systemd/pyhss_api.service @@ -1,6 +1,9 @@ +# Optional HTTP server providing an API for managing PyHSS. [Unit] Description=PyHSS API Service After=network.target +Requires=pyhss_hss.service +After=pyhss_hss.service [Service] Environment="PYTHONUNBUFFERED=1" diff --git a/systemd/pyhss_database.service b/systemd/pyhss_database.service index 32eb2960..2e5a8cc1 100644 --- a/systemd/pyhss_database.service +++ b/systemd/pyhss_database.service @@ -1,3 +1,5 @@ +# Optional legacy service that may get removed in the future: +# https://github.com/nickvsnetworking/pyhss/issues/264 [Unit] Description=PyHSS Database Service PartOf=pyhss.service diff --git a/systemd/pyhss_diameter.service b/systemd/pyhss_diameter.service index c01c73d4..895c5c07 100644 --- a/systemd/pyhss_diameter.service +++ b/systemd/pyhss_diameter.service @@ -1,6 +1,10 @@ +# Handling of receiving and sending of diameter messages, and diameter client +# connection state. [Unit] Description=PyHSS Diameter Service PartOf=pyhss.service +Requires=pyhss_hss.service +After=pyhss_hss.service [Service] Environment="PYTHONUNBUFFERED=1" diff --git a/systemd/pyhss_geored.service b/systemd/pyhss_geored.service index 9bd9994f..10b683a7 100644 --- a/systemd/pyhss_geored.service +++ b/systemd/pyhss_geored.service @@ -1,3 +1,5 @@ +# Optional geographic redundancy service that may get removed in the future: +# https://github.com/nickvsnetworking/pyhss/issues/334 [Unit] Description=PyHSS Geored Service PartOf=pyhss.service diff --git a/systemd/pyhss_gsup.service b/systemd/pyhss_gsup.service index d1b76ea1..7ba9e4c8 100644 --- a/systemd/pyhss_gsup.service +++ b/systemd/pyhss_gsup.service @@ -1,6 +1,9 @@ +# Optional GSUP message handler for interacting with 2G/3G Osmocom components. [Unit] Description=PyHSS GSUP Service PartOf=pyhss.service +Requires=pyhss_hss.service +After=pyhss_hss.service [Service] Environment="PYTHONUNBUFFERED=1" diff --git a/systemd/pyhss_hss.service b/systemd/pyhss_hss.service index b6285b19..c5f252fa 100644 --- a/systemd/pyhss_hss.service +++ b/systemd/pyhss_hss.service @@ -1,6 +1,11 @@ +# The main PyHSS service: Initializes the database, provides decoding and +# encoding of diameter requests and responses, as well as logic to perform as a +# HSS. [Unit] Description=PyHSS HSS Service PartOf=pyhss.service +Requires=redis-server.service +After=redis-server.service [Service] Environment="PYTHONUNBUFFERED=1" diff --git a/systemd/pyhss_log.service b/systemd/pyhss_log.service index 263f2a69..49d87aad 100644 --- a/systemd/pyhss_log.service +++ b/systemd/pyhss_log.service @@ -1,3 +1,5 @@ +# Optional service for writing to log files. Consider reading logs through +# journalctl instead. [Unit] Description=PyHSS Log Service PartOf=pyhss.service diff --git a/systemd/pyhss_metric.service b/systemd/pyhss_metric.service index ca89e968..c9583f96 100644 --- a/systemd/pyhss_metric.service +++ b/systemd/pyhss_metric.service @@ -1,6 +1,9 @@ +# Optional service for exposing prometheus metrics. [Unit] Description=PyHSS Metric Service PartOf=pyhss.service +Requires=pyhss_hss.service +After=pyhss_hss.service [Service] Environment="PYTHONUNBUFFERED=1"