At ESRF the daiquiri related projects should be cloned into:
~local/daiquiri
# ie
~local/daiquiri/daiquiri
~local/daiquiri/daiquiri-ui
~local/daiquiri/daiquiri_idxx
Clone the server and client repositories:
git clone https://gitlab.esrf.fr/ui/daiquiri-ui.git
git clone https://gitlab.esrf.fr/ui/daiquiri.git
Build the production ready daiquiri-ui bundle:
conda create -n npm
conda activate npm
conda install nodejs=16
cd daiquiri-ui
npm install
npm run build
Install daiquiri and its requirements:
conda activate daiquiri
cd daiquiri
pip install -e .
Cookiecutter the local repository and install it into the daiquiri environment (with feature/sensible-defaults if required):
conda activate daiquiri
pip install cookiecutter
cookiecutter https://gitlab.esrf.fr/ui/daiquiri-local --checkout feature/sensible-defaults
cd daiquiri_idxx
pip install -e .
Configuration
There are now two configuration cases to consider: beamline deployment and local development.
Beamline Deployment
For beamline deployment, set the meta database password in secrets.yml. Add any relevant hardware devices to hardware.yml, see here for more information on configuring hardware devices.
Local Development
A database is required for local development, this can be provided via mimosa-database, pull the image and start the container:
docker run --name mariadb -p 3306:3306 esrfbcu/mimosa-database:main
The docker container provides a database called test with a session for a beamline called bl. There is no latest tag, so either pull main or a specific version whichever is newer, tags can be found here
Modify the database credentials to connect to the test database, in app.yml:
meta_beamline: bl
meta_staff: bl_staff
meta_user: test
meta_url: localhost:3306/test
and set the password in secrets.yml:
meta_pass: test
The feature/sensible-defaults pre-configures some tango devices, these need to be updated to point to real devices, or removed for local development.
In hardware.yml:
# Hardware objects
objects:
- name: Front End
...
and remove from the groups:
groups:
- name: Beam
...
Starting the server
Start the server:
conda activate daiquiri
daiquiri-server-idxx --static-folder=~/local/daiquiri/daiquiri-ui/build
Browse to https://yourhost:8080
Documentation
Documentation is available for both the python server and the javascript client:
Repositories
Helper Packages
-
Generate schematic synoptic images: svg-synoptic
-
Stream video in low latency mpeg format over websockets: video-streamer-mpeg
-
Replicate User Office information: replicator