Repository navigation
Add phoebus_save_restore role, with Molecule tests - #106
Open
ralphlange wants to merge 1 commit into
Open
ralphlange wants to merge 1 commit into
ralphlange wants to merge 1 commit into
Conversation
Runs the Phoebus save-and-restore service - already built by the phoebus role - as a systemd service: it stores configurations and snapshots in Elasticsearch and serves the Phoebus "Save & Restore" application through its REST API. Modelled on the phoebus_services_save_restore role of ControlSystemStudio/ansible-phoebus. - pulls in the elasticsearch role; enabling it also runs the phoebus role and installs graphics - REST API on port 8080, context path /save-restore (the Phoebus client default): save_restore_url, a role default; the phoebus role uses the same name for the client's jmasar.service.url preference (replacing the hardcoded epics-services-tst URL), so one setting configures both; the role checks that the URL is http:// with an explicit port >= 1024 (the service runs unprivileged), a trailing slash is ignored - overrides of the packaged application.properties in /etc/save-and-restore/save-and-restore.properties: Elasticsearch, port, Spring logging at INFO, built-in demo users for authentication (instead of upstream's site-specific Active Directory) - EPICS access for server-side snapshots/restores as documented for the service (which does not read the client's preferences): the wrapper sets -Djca.use_env=true and -DdefaultProtocol (save_restore_default_protocol, default ca), EPICS_* environment variables go into save_restore_epics_env (default: none, i.e. the EPICS defaults) - /usr/local/bin/save-and-restore wrapper (no procServ); after starting, the role waits for the REST API to report Elasticsearch as connected and asserts the service is running - enabled in everything.yml and ci-phoebus-aa.yml (QEMU role tests) Molecule scenario on the systemd platform (x86_64 and aarch64) that builds Phoebus and tests the service end to end through its REST API: it creates a folder and a configuration with a local PV, lets the service take and save a snapshot, and reads it back, finds it by search and in Elasticsearch; it also checks that the EPICS settings reach the service process. Described in the scenario's README. Developed with the assistance of generative AI.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs the Phoebus save-and-restore service - already built by the phoebus
role - as a systemd service: it stores configurations and snapshots in
Elasticsearch and serves the Phoebus "Save & Restore" application through
its REST API. Modelled on the phoebus_services_save_restore role of
ControlSystemStudio/ansible-phoebus.
and installs graphics
default): save_restore_url, a role default; the phoebus role uses the
same name for the client's jmasar.service.url preference (replacing the
hardcoded epics-services-tst URL), so one setting configures both;
the role checks that the URL is http:// with an explicit port >= 1024
(the service runs unprivileged), a trailing slash is ignored
/etc/save-and-restore/save-and-restore.properties: Elasticsearch,
port, Spring logging at INFO, built-in demo users for authentication
(instead of upstream's site-specific Active Directory)
service (which does not read the client's preferences): the wrapper
sets -Djca.use_env=true and -DdefaultProtocol
(save_restore_default_protocol, default ca), EPICS_* environment
variables go into save_restore_epics_env (default: none, i.e. the
EPICS defaults)
the role waits for the REST API to report Elasticsearch as connected
and asserts the service is running
Molecule scenario on the systemd platform (x86_64 and aarch64) that
builds Phoebus and tests the service end to end through its REST API:
it creates a folder and a configuration with a local PV, lets the
service take and save a snapshot, and reads it back, finds it by search
and in Elasticsearch; it also checks that the EPICS settings reach the
service process. Described in the scenario's README.
Developed with the assistance of generative AI.