The provided docker-compose.yml
files define all stasis
services and their configuration, for testing and development
purposes.
The following deployments are available:
docker-compose.yml
- default deployment of all servicesdocker-compose-metrics.yml
- deployment of prometheus and grafana only, for collecting client metricsdocker-compose-no-auth-has.yml
- default deployment of all services, with disabled hashing of user authentication passwords
- Generate artifacts and certificates with
./scripts/prepare_deployment.sh <country> <location> <organization>
- Generate device secret with
./scripts/generate_device_secret.py --user-id <user-id-on-server> --user-salt <user-salt-on-server> --output-path ../secrets/client.secret
- Start services with
docker-compose up
(ordocker compose -f <compose file name> up
)
./scripts/run_smoke_test.sh
Contains configuration files used by stasis
services.
Contains Dockerfiles for services that need some extra customization to make them easier to test.
For example, a single image with client
and client-cli
is built to test both components and their integration.
Contains secrets used by stasis
services; files in this directory must be generated locally and should not be part
of any commits.
Contains scripts that run tests and help with setting up the test environment.
Generate docker images or executables for all runnable components.
./generate_artifacts.py # generates artifacts for all projects/submodules
./generate_artifacts.py -p client # generates artifact for "client" submodule
By default, Docker images for identity
, identity-ui
, server
, server-ui
, client
and client-cli
will be
generated; they are necessary for running the services in the provided docker-compose.yml
files.
Generate encrypted device secrets.
./generate_device_secret.py --user-id <user-id-on-server> --user-salt <user-salt-on-server>
To run the client
background service, a client/device secret needs to be created. The password of the user needs to be
provided as it is used for encrypting the secret.
Generate new self-signed x509 certificates and private keys.
./generate_self_signed_cert.py <country> <location> <organization>
The communication between all services is based on HTTPS and certificates are needed to properly set up the relevant endpoints.
Generate hashed user authentication passwords.
./generate_user_password.py --user-salt <user-salt-on-server>
For testing purposes, a hashed user authentication passwords may need to be generated from the raw user password
(for example, the run_smoke_test.sh
uses the hashed authentication password for retrieving user tokens).
Generate artifacts and certificates for deployed services (dev)
./prepare_deployment.sh <country> <location> <organization>
Combines generating certificates for identity
, server
and client
services via generate_self_signed_cert.py
and
generating all artifacts via generate_artifacts.py
.
Run basic tests against deployed services
./run_smoke_test.sh
Runs a sequence of commands against the stasis
services, ranging from simple token retrievals to full backup and
recovery operations, and performs basic sanity checks on the output of those commands.
This script is meant to provide both a limited integration test, and an example of how all services should be configured and used together.
Requires all services defined in docker-compose.yml
to be up and running; all certificates and secrets need to exist
and be available to the services that need them.