This demo uses Docker Compose to setup containers for FirecREST microservices, a template client, Keycloak, Kong, Redis, Minio and a dummy cluster with Slurm. It should also work with Podman and Podman Compose for a rootless setup.
First, build components:
docker-compose build
The "cluster" container first time build may take some minutes because it compiles Slurm from source.
SSH private keys (ca-key
and user-key
) must be readable only by its owner on host machine. These keys are shared with the test setup. Please make sure private keys permissions are '400' before starting containers:
chmod 400 ../test-build/environment/keys/ca-key ../test-build/environment/keys/user-key
To start containers:
docker-compose up
The web client is available at http://localhost:7000
User is test1
and password is test11
The API is at http://localhost:8000
and the specification is at http://localhost:8000/docs
To stop all containers:
docker-compose down
-
To test with another cluster/server, change on
common/common.env
the list of systems (SYSTEMS_) and STATUS_SYSTEMS; and ondemo_client/config.py
change MACHINES. Also add a volume on Certificator's service insidedocker-compose.yml
pointing to your server's SSH CA private key. -
FirecREST source is read from
src/
with Dockerfiles fromdeploy/docker
. Client source is onsrc/tests/template_client/
and has a Dockerfile, configuration for this demo is read fromdeploy/demo/demo_client/
. Most of the configuration is ondeploy/demo/common/common.env
and additional variables are set insidedeploy/demo/docker-compose.yml
-
Keycloak configuration is loaded from
keycloak/config.json
. Useadmin
:admin2
to access administration console onhttp://localhost:8080
-
Kong configuration is loaded from
kong/kong.yml
. If you change a FirecREST's service URL, you need to updatecommon/common.env
and that file, or rundeploy/demo/source/kong/update_kong_config.sh
-
Minio configuration is set on
docker-compose.yml
for Storage and Minio services. -
Redis configuration is loaded from
taskpersistence/resdis.conf
and must match Tasks service configuration. -
To add or change a component, it's possible to disable it from "docker-compose.yml" and create a new file which uses the same network. This way, only that component needs to be rebuild and restarted.
-
To remove logs (avoid conflicts when rebuilding images):
sudo bash clean_logs.sh
-
To rebuild and restart only containers that haver changed:
docker-compose up -d --build
docker-compose restart <service>
Logs are stored on logs/
for microservices and most services, Minio staging area on minio/
, and Task persistence data (Redis) on taskpersistence-data/
. Please note that staging area data is deleted after a successful upload to the cluster, but downloaded files aren't deleted soon.