Presentation is loading. Please wait.

Presentation is loading. Please wait.

DECTRIS Ltd. 5405 Baden-Daettwil Switzerland www.dectris.com Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)

Similar presentations


Presentation on theme: "DECTRIS Ltd. 5405 Baden-Daettwil Switzerland www.dectris.com Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)"— Presentation transcript:

1 DECTRIS Ltd. 5405 Baden-Daettwil Switzerland www.dectris.com Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker) Vittorio BOCCONE

2 Definitions CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. At each iteration the code is then verified by an automated build system, allowing teams to detect problems early. Continuous Delivery (CD) is a design practice used in software development to automate and improve the process of software delivery

3 The Integration Eldorado CI and Automatic Testing for the Fluka release using Jenkins (and Docker)

4 Continuous Integration tools CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Continuous Integration tools (CI) are software packages which orchestrate the build process and automate the building, testing, archiving and (eventually) deploy procedures. Functions: -Automate repetitive and error prone task; -Automate builds and test for each commit; -Execute test; -Archive artifacts; -Handle and log building report. -Report failure and possible culprits.

5 CI implementation CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Reliable Builds: -Creation a new expandable builders (Docker containers); -The builder live only the time to build the code and than is purged. Avoid dependencies misalignment: -Encode the dependencies source code; -Satisfy the dependencies just before building using the packages in the YUM repository; -Dependencies will also be inherited by the produced RPM package; A positive byproduct is that we could define a “fluka-toolchain” package whose dependencies solve the installation problems for the most common distributions (RH-like and Debian-like) Monitor and Evaluate the code development: -Handle the testing of the code; -Monitor the code health status; -Log the Building, Testing and Error reports.

6 Example of CI implementation at DECTRIS CI and Automatic Testing for the Fluka release using Jenkins (and Docker) YUM RPM Repositories Fresh Builders dectris-corelib dectris-boost jaun jaun-uidectris-hdf5 eiger eiger-tools eiger-firmware Example @ DECTRIS Main Software Components notify archive fetch build RPMs fetch commit Git SCM report Test CI Tool Testing

7 Why Jenkins? Why Docker? CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Jenkins (automation tool) -Relatively OS independent as it works on everything where an SSH connection or a Java apps can be run; -Integrate with SVN/Git and bug tracking tools (Jira) -Free version extendable to an Enterprise version. Cost is based on the size of the CI infrastructure; -Easy to install, setup and maintain (no hidden cost for IT); -Fastest growing tool in CI community, yet stable. Docker (lightweight Linux container alternative to VMs) -Fresh Linux container (Ubuntu, CentOS, Fedora...) in matter of seconds; -Free version extendable with plugins; -Easy to install, setup and maintain (no hidden manpower cost); -Easy to use, new clean development environment on the fly (no it needed to request a dedicated VMs); -Fastest growing tool in VM community, yet stable.

8 Continuous Integration @Dectris CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Tools -Jenkins as Continuous Integration manager. -Docker for the Linux builder infrastructure. Requirements -Each component must be in a versioning scheme and in a SCM; -Each (meaningful) build should be tracked and defined. -The components workflow should be defined and clear; Automatic Testing -Unit, Integration and Functional testing. -Test with real simulation input files batteries -Report generation Debugging -Automatic reporting and identification of culprits. Important: Tools are just tools and we should be flexible in case we would need to replace one tool with another

9 Continuous Integration @Dectris CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Continuous integration and Science -Dectris is PSI spin-off and produces X-Ray detectors for the synchrotron, laboratory and industry market; -Application of Continuous Integration methods does not only apply strictly to software development but also to simulation and calibration projects; Scientific Software Development @Dectris -Software Core Team:6 developers (mostly physicist) + 1 (IT); -60-70 packages supported (external customers + internal user) + hundreds of scripts for detector and sensor testing and calibration; -Scientific software and simulation support to the other groups (Development, Support and Production groups); -Need reliable quality assurance methods in the production phase.

10 ` Minimal CI workflow CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Commit to SCM Trigger Build Notify Build Failure Build U/F Test Notify Test Failure Fail Pass Archive Artifact (RPM) Trigger Code Test Pass Test #N Test #1 Test [...] Report Generation Automated Procedure YUM RPM Repository

11 Extended CI workflow CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Commit to SCM Trigger Build Notify Build Failure Build U/F Test Notify Test Failure Fail Pass Trigger Code Test Pass Test #N Test #1 Test [...] Report Generation Result Archive Artifact (RPM) Notify Integration Failure Release ? Pass Fail Automated Procedure YUM RPM Repository

12 Example: FLUKA deployment test CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Process -Take the generated artifacts (RPMS and tarballs) -Apply the installation procedure:  rpm: yum install  tarball: tar -zxvf export FLUPRO=/path/to/fluka export FLUFOR=g77/gfortran make RPM Jenkins’s job -Matrix job with two axis OS (centos6, centos7) and the artifact ARCHITECTURE (32 and 64bit) -Use Docker to provide clean OS containers mkdir fluka mv "ARCHITECTURE="${ARCHITECTURE}/*.rpm fluka/ docker run --rm -v $(pwd)/fluka:/fluka -t centos:$OS bash -c 'yum \ install -y /fluka/*.rpm'

13 CI and Automatic Testing for the Fluka release using Jenkins (and Docker) Example: FLUKA RPM deployment test Results Each job execution is nicely logged in its own console log accessible in the job’s menu -CentOS6 (64bit): -FLUKA g77 (32bit) works out of the box -FLUKA gfortran (64bit) requires new gfortran which is not provided by the standard repositories -CentOS7 (64bit) -FLUKA gfortran (64bit) works out of the box -FLUKA g77 (32bit) requires cross compilation packages which are not included in the dependencies (and discontinued) --> Finished Dependency Resolution Error: Package: fluka-2011.2c-3.x86_64 (/fluka-2011.2c-3.x86_64) Requires: libgfortran.so.3(GFORTRAN_1.4)(64bit) Error: Package: fluka-2011.2c-3.x86_64 (/fluka-2011.2c-3.x86_64) Requires: libquadmath.so.0()(64bit) Error: Package: fluka-2011.2c-3.x86_64 (/fluka-2011.2c-3.x86_64) Requires: libc.so.6(GLIBC_2.14)(64bit) --> Finished Dependency Resolution Error: Package: fluka-2011.2c-3.i686 (/fluka-2011.2c-3.i686) Requires: compat-gcc-34

14 Other FLUKA-related applications CI and Automatic Testing for the Fluka release using Jenkins (and Docker) FLUKA Benchmarking/Testing -Run predefined test simulation for each version and monitor execution and result; -Trigger the analysis of the output data and provide a reliable logging of the operation. Large Projects/Simulations: -Monitor a release branch of a large scale simulation project and trigger (and analyse) test simulation (short runs) as soon a commit appears. -Identify implementation errors (i.e. geometry, settings) Flair/Geoviewer FLUPIX automatic ISO file generation Handle FLUKA development version -FLUKA collaboration members could pick them up directly from the Jenkins server. My 2cents https://github.com/drbokko/docked-fluka-builders

15 Testing Examples CI and Automatic Testing for the Fluka release using Jenkins (and Docker)

16 Monitoring Jobs

17 Testing Example CI and Automatic Testing for the Fluka release using Jenkins (and Docker)

18 Testing Examples CI and Automatic Testing for the Fluka release using Jenkins (and Docker)

19 DECTRIS Ltd. 5405 Baden-Daettwil Switzerland www.dectris.com Thank you for your attention! www.dectris.com


Download ppt "DECTRIS Ltd. 5405 Baden-Daettwil Switzerland www.dectris.com Continuous Integration and Automatic Testing for the FLUKA release using Jenkins (and Docker)"

Similar presentations


Ads by Google