Update requirements after they are implemented
This commit is contained in:
1 parent
eedf2a941b
commit
4562497541
3 files changed
+533
No files matched your search
@@ -0,0 +1,142 @@
|
||||
# US-16 – Install and Deploy Services Independently
|
||||
|
||||
## User Story
|
||||
|
||||
As a system administrator,
|
||||
I want to install one or more HealthApp services on a Linux system,
|
||||
so that each service can be deployed independently or multiple services can be colocated on the same machine without losing their independent service boundaries.
|
||||
|
||||
## Description
|
||||
|
||||
The HealthApp consists of independently deployable services.
|
||||
|
||||
The installation mechanism must support both:
|
||||
|
||||
1. installing an individual service on a machine; and
|
||||
2. installing multiple or all HealthApp services on the same machine.
|
||||
|
||||
When multiple services are installed on the same machine, each service must remain an independent operating-system process with its own configuration and service registration.
|
||||
|
||||
Installing services together must not combine them into a single process or otherwise remove the architectural separation between services.
|
||||
|
||||
The installation mechanism must support the services defined by the current architecture, including the API Gateway and application microservices.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
### AC-16-A – Install a Single Service
|
||||
|
||||
**Given** a supported Linux system
|
||||
**When** the administrator selects one HealthApp service for installation
|
||||
**Then** only the selected service is installed
|
||||
**And** it can be started and stopped independently
|
||||
**And** installation does not require the other HealthApp services to be installed on the same machine.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-B – Install Multiple Services on One Machine
|
||||
|
||||
**Given** a supported Linux system
|
||||
**When** the administrator selects multiple HealthApp services for installation
|
||||
**Then** all selected services are installed
|
||||
**And** each service runs as an independent operating-system process
|
||||
**And** each service can be started, stopped and restarted independently.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-C – Install the Complete System on One Machine
|
||||
|
||||
**Given** a supported Linux system
|
||||
**When** the administrator chooses to install the complete HealthApp system
|
||||
**Then** all required HealthApp services are installed
|
||||
**And** every service remains an independently managed service/process
|
||||
**And** the services can communicate using the same network interfaces used when deployed on separate machines.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-D – Independent Configuration
|
||||
|
||||
**Given** an installed HealthApp service
|
||||
**When** its deployment configuration is provided
|
||||
**Then** service-specific configuration can be supplied independently of the configuration of other services.
|
||||
|
||||
This includes configuration required by that service, such as:
|
||||
|
||||
- network address and port;
|
||||
- dependent service endpoints;
|
||||
- database connection information where applicable;
|
||||
- service credentials and other deployment-specific settings.
|
||||
|
||||
No service may require hard-coded knowledge that another service is installed on the same machine.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-E – Separate-Machine Deployment
|
||||
|
||||
**Given** HealthApp services installed on different machines
|
||||
**When** their service endpoints and required credentials are configured correctly
|
||||
**Then** the services can communicate according to the documented architecture
|
||||
**Without** requiring shared process memory, shared local files, or localhost-specific assumptions.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-F – Service Management
|
||||
|
||||
**Given** an installed service
|
||||
**When** the operating system starts, stops or restarts that service
|
||||
**Then** the service can be managed independently from the other HealthApp services.
|
||||
|
||||
Stopping or restarting one service must not directly stop or restart another service.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-G – Persistence Independence
|
||||
|
||||
**Given** a service that owns persistent data
|
||||
**When** that service is installed
|
||||
**Then** its persistence configuration is independent of the persistence configuration of other services.
|
||||
|
||||
Installing multiple services on one machine must not cause services to share persistence that the documented architecture defines as separately owned.
|
||||
|
||||
Services without persistence must not gain persistence merely because they are installed together with persistent services.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-H – Installation Does Not Change Architecture
|
||||
|
||||
**Given** any supported installation arrangement
|
||||
**When** services are installed individually or together
|
||||
**Then** the logical service boundaries, communication paths, persistence ownership and responsibilities defined by the architecture remain unchanged.
|
||||
|
||||
Deployment location must not change the behaviour or responsibility of a service.
|
||||
|
||||
---
|
||||
|
||||
### AC-16-I – Installation Verification
|
||||
|
||||
**Given** a completed installation
|
||||
**When** installation verification is performed
|
||||
**Then** each installed service can be shown to:
|
||||
|
||||
- start successfully;
|
||||
- run as its own process;
|
||||
- accept its configured network traffic where applicable;
|
||||
- use its configured dependencies;
|
||||
- stop and restart independently.
|
||||
|
||||
For a complete-system installation, representative application operations must successfully pass through the deployed services.
|
||||
|
||||
---
|
||||
|
||||
## Notes
|
||||
|
||||
This user story concerns deployment and installation only.
|
||||
|
||||
It does not authorize:
|
||||
|
||||
- merging microservices;
|
||||
- changing service responsibilities;
|
||||
- introducing shared persistence;
|
||||
- changing the documented communication architecture;
|
||||
- changing existing functional user stories.
|
||||
|
||||
The same application executables should support both colocated and distributed deployment through configuration rather than separate implementations.
|
||||
@@ -0,0 +1,135 @@
|
||||
## Required installer behaviour
|
||||
|
||||
The installer must support installing:
|
||||
|
||||
- one selected HealthApp service;
|
||||
- multiple selected services;
|
||||
- all HealthApp services on the same machine.
|
||||
|
||||
Each application service must still run as an independent systemd service/process.
|
||||
|
||||
### PostgreSQL
|
||||
|
||||
Where an installed service requires PostgreSQL persistence, the installer must:
|
||||
|
||||
- detect whether PostgreSQL is already available;
|
||||
- install PostgreSQL when necessary on supported Linux distributions;
|
||||
- create the required database(s);
|
||||
- create dedicated database user credentials;
|
||||
- generate suitable passwords rather than using hard-coded credentials;
|
||||
- assign only the permissions required by the owning service;
|
||||
- configure the application service to use its database;
|
||||
- run any required database migrations.
|
||||
|
||||
Patient Profile and Observation persistence must remain separately owned.
|
||||
|
||||
Installing both services on the same PostgreSQL server is allowed, but they must use separate databases and service credentials.
|
||||
|
||||
Services without persistence must not receive databases.
|
||||
|
||||
### Application/service credentials
|
||||
|
||||
The installer must generate the credentials needed for communication between the deployed HealthApp services.
|
||||
|
||||
Credentials must:
|
||||
|
||||
- not be hard-coded in the repository;
|
||||
- be generated during installation;
|
||||
- be stored in files or configuration readable only by the appropriate service account/root where practical;
|
||||
- be configured automatically into the relevant services.
|
||||
|
||||
The administrator should not have to manually invent and distribute inter-service credentials for a normal installation.
|
||||
|
||||
### HTTPS certificates
|
||||
|
||||
The installer must configure HTTPS for the installed services.
|
||||
|
||||
For the prototype, certificates do not need to be publicly trusted.
|
||||
|
||||
The installer may generate a local/self-signed certificate or a small local certificate authority and issue certificates from it.
|
||||
|
||||
The goal is encrypted HTTPS communication, not public PKI validation.
|
||||
|
||||
The installer must:
|
||||
|
||||
- generate the required certificate/key material if none is supplied;
|
||||
- configure each installed service to use HTTPS;
|
||||
- configure the relevant local trust relationships required for HealthApp services to communicate successfully;
|
||||
- protect private key material using appropriate filesystem permissions.
|
||||
|
||||
It should remain possible to replace the generated prototype certificates with externally supplied trusted certificates later.
|
||||
|
||||
### Service configuration
|
||||
|
||||
The installer must generate the configuration necessary for the selected deployment, including as applicable:
|
||||
|
||||
- listening address;
|
||||
- HTTPS port;
|
||||
- URLs of dependent HealthApp services;
|
||||
- database connection strings;
|
||||
- database credentials;
|
||||
- inter-service credentials;
|
||||
- certificate paths;
|
||||
- environment-specific configuration.
|
||||
|
||||
A normal installation must not require manually editing application configuration files after installation.
|
||||
|
||||
### Linux service installation
|
||||
|
||||
For each selected HealthApp service, the installer must:
|
||||
|
||||
- install/publish the application;
|
||||
- create the necessary service account where appropriate;
|
||||
- create its systemd unit;
|
||||
- enable the service;
|
||||
- start the service;
|
||||
- verify that it starts successfully.
|
||||
|
||||
### Verification
|
||||
|
||||
At the end of installation, perform an installation verification that checks at minimum:
|
||||
|
||||
- each selected systemd service is running;
|
||||
- each selected service is listening on its configured HTTPS endpoint;
|
||||
- required PostgreSQL databases are reachable;
|
||||
- service-to-service communication works for the installed topology;
|
||||
- representative application functionality works when the complete system is installed.
|
||||
|
||||
If installation or verification fails, report clearly which step failed.
|
||||
|
||||
## Deployment principle
|
||||
|
||||
The installer should make the selected topology work.
|
||||
|
||||
For example:
|
||||
|
||||
Machine A:
|
||||
- API Gateway
|
||||
- Patient Profile
|
||||
- Observation
|
||||
- Insights
|
||||
- Health Overview
|
||||
- PostgreSQL
|
||||
|
||||
or:
|
||||
|
||||
Machine A:
|
||||
- API Gateway
|
||||
|
||||
Machine B:
|
||||
- Patient Profile
|
||||
- PostgreSQL
|
||||
|
||||
Machine C:
|
||||
- Observation
|
||||
- PostgreSQL
|
||||
|
||||
Machine D:
|
||||
- Insights
|
||||
|
||||
Machine E:
|
||||
- Health Overview
|
||||
|
||||
The application binaries and architectural boundaries must remain the same in either case.
|
||||
|
||||
Do not require the administrator to manually create PostgreSQL databases, application credentials, or prototype HTTPS certificates as a prerequisite for installation.
|
||||
Reference in new issue
Block a user