-
Notifications
You must be signed in to change notification settings - Fork 0
Infrastructure Description
This component is the public-facing service, where people outside of the experiments can request new reprocessings. It also provides a REST API to both create and query these requests.
- perimeter institute http://recast.perimeterinstitute.ca/
- new prototype http://recast-frontend.herokuapp.com/
- https://github.com/recast-hep/recast-frontend (current site, Drupal based)
- https://github.com/lukasheinrich/recast-newfrontend (possible start for new site, Flask + Celery + Postgres + Cern SSO)
- https://github.com/recast-hep/recast-database ( Flask-SQLAlchemy object-relational mapping / models for new frontend)
- https://github.com/lukasheinrich/pseudo-cap (pseudo CAP implementation with REST-like API to get JSON data)
- https://github.com/cernanalysispreservation (main CAP GitHub project)
We're moving to a docker-based infrastructure to store actual analysis code + data resources. These Docker images should be provided by the analysis team for every major processing step.
- currently normal docker.io registry
- CERN internal registry
This is the component that actually receives the request and runs the analysis workflow to produce the new results needed to fulfill the request.
The node runs a Celery worker process which all know about a single Celery Task (recsastbackend.backendtasks:run_analysis) https://github.com/recast-hep/recast-backend/blob/master/recastbackend/backendtasks.py#L191
the celery task does three things:
- Setup
- prepares workdirectory
- downloads request zipfile from RECAST frontend, unzips
- Body
- run the python function given by the RECAST plugin with the request context
- Finish (On Success)
- collect result files
- upload back to control center / calling host
- Teardown (Always)
- copy log files to local quanrantine (for debugging)
- delete workdir
The signature for that celery task is
@shared_task
def run_analysis(setupfunc,onsuccess,teardownfunc,ctx):
...
i.e. the task receives the names of these functions in a format module:funcname
. In production these are used:
- setupfunc:
-
recastbackend.backendtasks.setup
(for input zip from RECAST frontend retrieved via recast-api, used byrecast-prodsub
CLI app and Control Center ) -
recastbackend.backendtasks.setupFromURL
(for input zip from generic URL, used byrecast-localsub
CLI app)
-
- onsuccess:
-
recastbackend.backendtasks.generic_onsuccess
(used byrecast-localsub
) -
recastbackend.backendtasks.onsuccess
(user byrecast-prodsub
and Control Center)
-
- teadownfunc:
-
recastbackend.backendtasks.cleanup
used by both CLI apps
-
The context prepared by the submission, includes a plugin entry function in the same format module:name
which must have the signature:
def pluginfunc_name(ctx):
pass
currently we have these examples:
- https://github.com/recast-hep/recast-cap-demo/blob/master/recastcap/backendtasks.py#L11
- https://github.com/recast-hep/recast-dilepton-demo/blob/master/recastdilepton/backendtasks.py#L8
- https://github.com/recast-hep/recast-rivet-recaster-demo/blob/master/recastrivet/backendtasks.py#L62
This section will include a description of the various services / components expected to run on a worker node
- supervisord
- this controls the recast worker process
- process name
recast_worker
- start script is in
/home/recast/start_worker.sh
- process name
- configuration is
/etc/supervisord.conf
- this controls the recast worker process
- diamond
- this runs periodic system inspection scripts (like Memory, Cpu etc)
- configuration is in
/etc/diamond/diamond.conf
- data is archived in
/var/log/diamond
and sent to statsd server on monitor host (currentlytesting-headnode
- statsd
- python module needed for diamond for sensind system info
- celery worker
- see detailed description above
- RECAST backend
- see detailed description above
- RECAST plugin
- see detailed description above
- Docker
- vanilla docker installation, this is called by adage to execute steps in the workflow
- extra resources
- CVMFS
- configuration in
/etc/cvmfs/default.local
- configuration in
- AFS
- comes preconfigured in CC7
- recast_auth
- on provisioning we request a host autoenrolling GRID host certificate via
cern-get-certificate
and store this in/home/recast/recast_auth
together with a script that can retrieve a MyProxy grid proxy. this can be optionally mounted on docker containers to give them access to GRID resources.
- on provisioning we request a host autoenrolling GRID host certificate via
- CVMFS
- https://github.com/recast-hep/recast-backend
- https://github.com/recast-hep/recast-cloudutils (OpenStack provisioning scripts)
- https://github.com/recast-hep/recast-cap-demo
- https://github.com/recast-hep/recast-dilepton-demo
- https://github.com/recast-hep/recast-docker-demo
- https://github.com/recast-hep/recast-rivet-recaster-demo
- https://github.com/recast-hep/recast-dmhiggs-demo
- https://github.com/recast-hep/recast-fullchain-demo
- https://github.com/recast-hep/recast-helloworld-demo
- https://github.com/recast-hep/recast-hype-demo
- https://github.com/recast-hep/recast-susyhiggs-demo
- multiple backends (multiprocessing / Celery? / IPython parallel?)
- Grafana
- currently runs on http://testing-headnode.cern.ch:80
- https://github.com/kamon-io/docker-grafana-graphite (GitHub)
- https://hub.docker.com/r/kamon/grafana_graphite/ (Docker Image)
- core control center
- result blueprints
- https://github.com/recast-hep/recast-control-center-prototype
- https://github.com/recast-hep/recast-resultblueprints
- just vanilla redis store hosted on recast-demo.cern.ch
- docker swarm/compose experiment
- docker-compose setup to run adage with celery backend
- recast cli app
- cli to interact with frontend (add requests, list requests, etc)
- https://github.com/recast-hep/recast-cli
- RECAST python API
- python wrapper for REST API of frontend
- https://github.com/recast-hep/recast-api
- RECAST requests via pull-requests and GitHub Webhooks
- Selenium testing
- Developer Kit
- help develop new recast plugins locally (i.e. celery entry points)
- https://github.com/recast-hep/recast-devkit