BEC Atlas is a web-based management system for BEC (Beamline Experiment Control) deployments at scientific facilities. It provides centralized access control, deployment management, and real-time monitoring capabilities for beamline experiments.
- Deployment Management: Create and manage BEC deployments across multiple beamlines
- Access Control: Role-based access control with user, group, and admin permissions
- Real-time Monitoring: Live monitoring and control of beamline experiments
- Authentication: JWT-based authentication with LDAP integration
- REST API: Comprehensive API for programmatic access and integration
- Python >= 3.10
- Redis server
- MongoDB
- Docker
- tmux
- nginx (optional, for load balancing)
-
Install the package:
pip install -e './backend[dev]' -
Start required services:
# Start MongoDB (if using Docker) docker run --name mongodb -p 27017:27017 -d mongo:latest # Optional: Start nginx for load balancing nginx -c $(pwd)/utils/nginx.conf
-
Start BEC Atlas:
bec-atlas start
This will start two instances of the FastAPI server plus the Redis server.
-
Update the available deployments:
bec-atlas-update deployments
This will update the available deployments located in backend/bec_atlas/deployments/realms
-
Start the data ingestor:
bec-atlas-ingestor
This will start the data ingestor, needed to populate the database with new scans.
-
Access the application:
- Web interface:
http://localhost:4200 - API documentation:
http://localhost/docs - Direct API access:
http://localhost:8000/docsorhttp://localhost:8001/docs
- Web interface:
-
Connect BEC to BEC Atlas:
- Go to
http://localhost/docsand log in using the admin account.- On the local demo instance, the username and password is
admin@bec_atlas.ch/admin.
- On the local demo instance, the username and password is
- Fetch a new deployment file, save it as
.atlas.envin your root BEC directory - Restart the BEC server.
- Your server should now be connected to Atlas.
- Go to
bec-atlas start- Start all services in tmux sessionbec-atlas stop- Stop all servicesbec-atlas restart- Restart all servicesbec-atlas attach- Attach to running tmux sessionbec-atlas-get-key- Retrieve deployment environment files
The application consists of:
- Backend: FastAPI application with MongoDB and Redis
- Frontend: Angular web application
- Services: Two FastAPI instances (ports 8000/8001) with Redis (port 6379)
For development setup, see the individual README files in backend/ and frontend/ directories.