19
14th Oct 2005 CERN AB Controls velopment Process of Accelerato velopment Process of Accelerato Controls Software Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application Section developers

14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

Embed Size (px)

Citation preview

Page 1: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

14th Oct 2005 CERN AB Controls

Development Process of Accelerator Development Process of Accelerator Controls SoftwareControls Software

G.Kruk

L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux

and Application Section developers

Page 2: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

2CERN – AB Department G. Kruk – 14.10.2005

Agenda

• Development process

• Issues

• How we addressed them?

• Conclusions

Page 3: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

3CERN – AB Department G. Kruk – 14.10.2005

Development Process

Operational Consoles

All activities from the moment a developer starts a new project to the moment the resulting

application is running on operational consoles in the control room

Page 4: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

4CERN – AB Department G. Kruk – 14.10.2005

Context in CERN Controls 2002

• Support for C developments (under control of Make)• No Java development process in place

Java based on small interdependent products• ~ 130 products which use about ~140 external libraries• Dependencies tree very complicated – up to 10 levels• ~ 30 developers

Need for supporting tools No mature solution on the market Work started on custom solution

Page 5: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

5CERN – AB Department G. Kruk – 14.10.2005

Development Process Issues Projects and code organization

Source versioning management Build services (automation of common tasks)

• Compilation, JAR• Documentation generation

Dependencies management Release management

• Releasing new versions of software in a dedicated repository

Applications deployment Issues & bugs tracking

(guidelines, naming conventions, directory structure)

(CVS)

(JIRA)

Page 6: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

6CERN – AB Department G. Kruk – 14.10.2005

Build services : Common-Build Based on Apache Ant

• Java based open source build tool (like Make)• XML based build file defining targets

Functionality of Common-Build• Provides predefined targets for everything needed• Compilation, packaging (JAR)• Source code & specific descriptors generation• Documentation generation• Code quality• Unit testing

Prevents Copy/Paste syndrome Integration with the infrastructure in place Minimal effort to start

Page 7: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

7CERN – AB Department G. Kruk – 14.10.2005

Target examples

Compiling sources• ant compile

Building distribution of the product• ant dist

Releasing new version of the product• ant release

Page 8: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

8CERN – AB Department G. Kruk – 14.10.2005

Common-Build constraints(Directory structure)

equipstate/build.xmlproduct.propertiesproduct.xmlpeoplesrc/ java/ test/

Page 9: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

9CERN – AB Department G. Kruk – 14.10.2005

Common-Build constraints(Build file)

equipstate/build.xmlproduct.propertiesproduct.xmlpeoplesrc/ java/ test/

Regular Ant’s build file that imports targets from Common-Build (always the same)

Page 10: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

10CERN – AB Department G. Kruk – 14.10.2005

Common-Build constraints (Services file)

equipstate/build.xmlproduct.propertiesproduct.xmlpeoplesrc/ java/ test/

Specifies the services to activate in Common-Build during the build process

e.g. JavaDoc generation, unit tests, specific descriptors generation

Page 11: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

11CERN – AB Department G. Kruk – 14.10.2005

Common-Build constraints (Product’s descriptor)

Descriptor of the product and its direct dependencies

equipstate/build.xmlproduct.propertiesproduct.xmlpeoplesrc/ java/ test/

Page 12: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

12CERN – AB Department G. Kruk – 14.10.2005

Common-Build constraints (Release check list)

equipstate/build.xmlproduct.propertiesproduct.xmlpeoplesrc/ java/ test/

Specifies who has the right to release this product

Page 13: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

13CERN – AB Department G. Kruk – 14.10.2005

Dependencies management

equipstate

Product A Lib ALib B

Production repository 3rd party repository

<product name=“equipstate” …> <!-- … --> <dependencies> <dep product=“LibA” version=“1.2.8” /> <dep product=“ProductA” /> </dependencies></product>

product.xml

Page 14: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

14CERN – AB Department G. Kruk – 14.10.2005

Dependencies management

equipstate/build.xmlproduct.propertiesproduct.xmlpeople

lib/ LibA.jar ProductA.jar LibB.jar

src/ java/ test/

equipstate/build.xmlproduct.propertiesproduct.xmlpeoplesrc/ java/ test/

ant getjars

equipstate

Product A Lib ALib B

Production repository 3rd party repository

Page 15: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

15CERN – AB Department G. Kruk – 14.10.2005

Release Management

Release Tool Also based on Ant Both for Java and C/C++ products Can be used without Common-Build

Page 16: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

16CERN – AB Department G. Kruk – 14.10.2005

What Release does

Extracts the product from the CVS to the dedicated production repository

Builds the product (calling Common-Build)

Installs it in a multi-versioned repository• New version is added without modifying the old ones• We can always use old versions

Updates product aliases (symbolic links)

Page 17: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

17CERN – AB Department G. Kruk – 14.10.2005

Release management(Production repository)

domainclient

dist

accsoft macsy leir

equipstate

0.5.1 0.5.2 0.6.0 0.6.1 PRO PREV NEXT

Aliases: PRO - production version PREV - previous versions (version which was replaced by PRO) NEXT - next version to be tested before becoming PRO

Page 18: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

18CERN – AB Department G. Kruk – 14.10.2005

GUI Applications deployment

We use Java Web Start deployment technology [TH3A.2-50] • uses a special XML descriptor (JNLP file) to deploy and run

applications• ensures that all required libraries (cached locally) are up to date

JNLP file specifies• how to run the application• where required libraries are found

Repository contains all libraries and JNLP file

We added a Web server to enable deployment via Java Web Start

http://<path_to_the_dist>/macsy/equipstate/PRO/equipstate.jnlp

Page 19: 14th Oct 2005CERN AB Controls Development Process of Accelerator Controls Software G.Kruk L.Mestre, V.Paris, S.Oglaza, V. Baggiolini, E.Roux and Application

19CERN – AB Department G. Kruk – 14.10.2005

Conclusions

We put in place a very solid development process

The whole process is automated now

We have a suite of integrated tools supporting the process

We succeeded to make the deployment path short and simple

This has been validated operationally