The Jiangmen Underground Neutrino Observatory (JUNO), under construction in South China, primarily aims to determine the neutrino mass hierarchy and to precise measure the neutrino oscillation parameters. The data-taking is expected to start in 2024 and the detector plans to run for more than 20 years. The development of the JUNO offline software (JUNOSW) started in 2012, and it is quite challenging to maintain the JUNOSW for such a long time. In the last ten years, tools such as Subversion, Trac, and CMT had been adopted for software development. However, new stringent requirements came out, such as how to reduce the building time for the whole project, how to deploy offline algorithms to an online environment, and how to improve the code quality with code review and continuous integration. To meet the further requirements of software development, modern development tools are evaluated for JUNOSW, such as Git, GitLab, CMake, Docker, and Kubernetes. This contribution will present the software development system based on these modern tools for JUNOSW and the functionalities achieved: CMake macros are developed to simplify the build instructions for users; CMake generator expressions are used to control the build flags for the online and offline environments; a tool named git-junoenv is developed to help users partially checkout and build the software; a script is used to build and deploy the software on the CVMFS server; a Docker image with CVMFS client installed is created for continuous integration; a GitLab agent is set up to manage GitLab runners in Kubernetes with all the configurations in a GitLab repository.
翻译:正在中国南方建设的江门地下中微子观测站(JUNO)旨在确定中微子质量等级并精确测量中微子振荡参数。实验预计于2024年开始采集数据,探测器的运行设计寿命超过20年。JUNO离线软件(JUNOSW)自2012年启动开发,在如此漫长的周期内维持其可靠性极具挑战性。过去十年中,软件开发采用了Subversion、Trac和CMT等工具,但随着新需求的提出——包括如何缩短整个项目的编译时间、如何将离线算法部署至在线环境、以及如何通过代码审查和持续集成提升代码质量——需要引入现代化开发工具来满足进一步需求。为此,我们评估了Git、GitLab、CMake、Docker和Kubernetes等工具,并基于这些现代工具构建了JUNOSW软件开发系统。该系统实现了以下功能:开发CMake宏以简化用户的编译指令,利用CMake生成器表达式控制在线与离线环境的编译标志,开发git-junoenv工具支持用户部分检出和编译软件,通过脚本在CVMFS服务器上完成软件构建与部署,创建集成CVMFS客户端的Docker镜像用于持续集成,以及配置GitLab代理在Kubernetes集群中管理GitLab运行器,并将所有配置统一存储于GitLab仓库。