将帧摄取到LCO存档中
lco-ingester的Python项目详细描述
摄取器库
向天文台控制系统的科学档案中添加新的科学数据产品的图书馆。图书馆 处理将FITS文件上传到aws3,以及将记录添加到包含 所有可用的FITS文件的可搜索元数据。在
先决条件
可跳过可选先决条件以减少功能。在
- Python>;=3.6
- 跑science archive
- 对正在运行的科学存档使用的同一个S3存储桶的写访问权限
- (可选)度量集合的运行OpenTSDB
安装
强烈建议您在专用python中安装并运行python代码 virtual environment。在
将lco_ingester
包添加到python环境中:
(venv) $ pip install lco_ingester
配置
必须设置AWS和科学档案凭证才能上载数据。科学档案配置以及 AWS Bucket可以显式传递,也可以设置为环境变量。其余的配置必须是 设置为环境变量。在
环境变量
Variable | Description | Default | |
---|---|---|---|
Science Archive | ^{ | Science Archive URL | ^{ |
^{ | Science Archive Authentication Token. This token must be associated with an admin user. | empty string | |
AWS | ^{ | AWS S3 Bucket Name | ^{ |
^{ | AWS Access Key with write access to the S3 bucket | empty string | |
^{ | AWS Secret Access Key | empty string | |
^{ | AWS S3 Default Region | empty string | |
Metrics | ^{ | OpenTSDB Host to send metrics to | empty string |
^{ | Set to any value to turn off metrics collection | ^{ | |
^{ | A tag set with the collected metrics to identify where the metrics are coming from | ^{ | |
^{ | Optionally submit metrics asynchronously. This option does not apply when the command line entrypoint is used, in which case metrics are always submitted synchronously. Note that some metrics may be lost when submitted asynchronously. | ^{ | |
Postprocessing | ^{ | FITS exchange broker | ^{ |
^{ | Processed files RabbitMQ Exchange Name | ^{ | |
^{ | Optionally submit files to fits queue | ^{ |
对于开发者
运行测试
克隆此项目后,从项目根目录并在虚拟环境中执行以下操作:
^{pr2}$- 项目
标签: