|
1 |
| -# ls-registration-daemon-v2 |
2 |
| - Client daemon that registers records in the lookup service |
| 1 | +# Lookup Service Client |
| 2 | + Client daemon that registers records in the lookup service |
| 3 | + |
| 4 | +# Settings and Configs |
| 5 | +**For The debian and rpm installations** |
| 6 | + |
| 7 | +systemd service is enabled upon installation and the pslookup client starts with default configurations. |
| 8 | + |
| 9 | +1. [Defaults](pslookup/perfsonar-pslookup/pslookup-config/pslookup-registration.conf) to using the localhost node exporter and perfsonar host exporter |
| 10 | +2. Client configuration - Modify the config file registration frequency and default paths for record configurations |
| 11 | +``` |
| 12 | +[/etc/perfsonar/pslookup/pslookup-registration.conf](pslookup/perfsonar-pslookup/pslookup-config/pslookup-registration.conf) |
| 13 | +``` |
| 14 | +3. Record configuration files - To provide data to overwrite or to add to the record. Replace nulls with the values to be placed in the record. |
| 15 | +``` |
| 16 | +Defaults |
| 17 | +[/etc/perfsonar/pslookup/pslookup-record-conf/interfaces.json](pslookup/perfsonar-pslookup/pslookup-config/pslookup-record-conf/interfaces.json) |
| 18 | +[/etc/perfsonar/pslookup/pslookup-record-conf/host.json](pslookup/perfsonar-pslookup/pslookup-config/pslookup-record-conf/host.json) |
| 19 | +``` |
| 20 | + |
| 21 | +# Validation Tool |
| 22 | +pslookup tool can be used to validate a record. |
| 23 | +``` |
| 24 | +pslookup validate |
| 25 | +``` |
| 26 | +***Customizing |
| 27 | +The validation tool allows to validate a record built by the pslookup service using the client config. This will utilize the service to build the record that will be registered and validate it against the schema. |
| 28 | +To validate a record built manually, use the record option to point to the json record. If this option is provided, config is ignored. |
| 29 | + |
| 30 | + | Option | Type | Description | |
| 31 | + | :----: | :--: | :---------: | |
| 32 | + | config | String | Path to the client config file. Defaults to /etc/perfsonar/pslookup/pslookup-registration.conf | |
| 33 | + | record | String | Path to the json record | |
| 34 | + |
| 35 | + |
| 36 | +# Developer Settings: |
| 37 | + |
| 38 | +1. To modify Schema for record validation |
| 39 | +``` |
| 40 | +[pslookup/perfsonar-pslookup/schema/schema.json](pslookup/perfsonar-pslookup/schema/schema.json) |
| 41 | +``` |
| 42 | +2. The python pslookup package utilizes symlink to the [schema.json](pslookup/perfsonar-pslookup/pslookup/schema/schema.json). Any modification to the schema will be reflected in both the client [package]((pslookup/perfsonar-pslookup/pslookup/schema/schema.json)) and [server](../lookup-service-server/schema/schema.json). |
| 43 | +3. Changes in the schema should be complimented with updates to the database mappings and vice versa. |
| 44 | +``` |
| 45 | +[lookup-service-server/app/mapping](../lookup-service-server/app/mapping/) |
| 46 | +``` |
| 47 | +4. Changes to the schema should also be implemented in the default [record configurations](pslookup/perfsonar-pslookup/pslookup-config/pslookup-record-conf/). |
| 48 | + |
| 49 | +**Installing the client locally on Docker** |
| 50 | +Using [unibuild](https://github.com/perfsonar/unibuild) |
| 51 | +``` |
| 52 | +git clone https://github.com/perfsonar/pslookup-service.git |
| 53 | +cd pslookup-service |
| 54 | +wget https://raw.githubusercontent.com/perfsonar/unibuild/main/docker-envs/docker-compose.yml |
| 55 | +download the [docker-envs](https://github.com/perfsonar/unibuild/tree/main/docker-envs) |
| 56 | +docker compose run el9 bash |
| 57 | +cd lookup-service-client |
| 58 | +unibuild build |
| 59 | +``` |
| 60 | +The above will install the service but will fail to start the systemd service. The installation can be tested by running the [pslookup Client Agent](pslookup/perfsonar-pslookup/bin/pslookup_client_agent). |
| 61 | +``` |
| 62 | +/usr/lib/perfsonar/pslookup/bin/pslookup_client_agent --config=/etc/perfsonar/pslookup/pslookup-registration.conf --logger=/etc/perfsonar/pslookup/pslookup-client-agent-logger.conf |
| 63 | +``` |
| 64 | + |
| 65 | +**Note:** |
| 66 | +The record generation process persists a client UUID at the following path. It appends hostnames to UUID to compare changes to the hostname. If any changes are found, the service logs the change in the log files and proceeds to register the record with the new UUID. |
| 67 | +``` |
| 68 | +/var/lib/perfsonar/pslookup/client-uuid.txt |
| 69 | +``` |
| 70 | +The validation tool does not persist the UUID. |
0 commit comments