Skip to content

Add phoebus_save_restore role, with Molecule tests - #106

Open
ralphlange wants to merge 1 commit into
epics-training:mainfrom
ralphlange:save-restore
Open

ralphlange wants to merge 1 commit into
epics-training:mainfrom
ralphlange:save-restore

Conversation

@ralphlange

Copy link
Copy Markdown
Contributor

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.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant