+ All Categories
Home > Documents > Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

Date post: 21-Dec-2015
Category:
Upload: simon-osborne
View: 215 times
Download: 2 times
Share this document with a friend
Popular Tags:
17
Update on Version Control Systems: GitLab, SVN, Git, Trac, CERNforge Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015
Transcript
Page 1: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

1

Update on Version Control Systems:GitLab, SVN, Git, Trac, CERNforge

Alexandre Lossent

IT-PES-IS

5th LHCb Computing Workshop, 22 May 2015

Page 2: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

2

Version Control Systems in use at CERN

Central SVN service− Access control, CERN accounts, e-groups

Central Git service− Access control, CERN accounts, e-groups− git.cern.ch and now GitLab (gitlab.cern.ch)

Github− Nowadays de-facto standard for Open Source projects with external

partners− Some projects mirror their repos at CERN

Other private installations− Git, SVN, Stash etc.− Smaller groups with specific needs (and system resources)− Should not be visible on the Internet

5th LHCb Computing Workshop, 22 May 2015

Page 3: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 3

Improving Central VCS offering at CERN

Looking for solutions to typical challenges− How to ensure the quality of new features/fixes?− How to decide if the code is ready for production?− How to manage concurrent work and merge conflict resolution?− How to be confident that code working on a dev’s machine will work as

expected after deployment?− How to enable contributions from outside the core dev team without

risking damage to the code repository? Making it easier to create and manage code repositories

− And streamline integration with related services: Issue Tracking, Continuous Integration, Documentation…

Page 4: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 4

Why deploy GitLab?

Complement Version Control Services with new features to help developers implement software development best practices− Provide a mean to review code and test results, discuss and take

decision whether to merge code− Associate code changes with a ticket in an Issue Tracking system–

Provide code review features to help improve code quality− Encourage collaboration by enabling project forks and merge requests− Make it easier to run tests with Continuous Integration platforms− Well-defined roles within a project or group of projects

Page 5: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 5

GitLab project page

Page 6: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 6

GitLab repository browsing

Page 7: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 7

GitLab graphs

Page 8: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 8

GitLab code review: Merge Request

Page 9: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 9

GitLab feature summary

On-premise “GitHub lookalike”− Version Control based on Git− With SSH support & SSH key authentication

Hierarchical project (= repository) organization− Groups – contain multiple projects for a given team− Personal workspace – removed when user leaves CERN, a la home directory

Code browsing− Including editing files from the web interface

Code review workflow− Important branches are protected− Changes submitted from feature branches or project forks− Merge Requests reviewed by “master” developers before being merged

Self-service− One-click project creation, repository immediately available to work with

Integration− Global CERN services: SSO, SSH keys, mapping of E-groups to roles…− Developer services: Jira, Jenkins (a Continuous Integration platform)…

Page 10: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

10

Git, GitLab and Github

GitLab is now in production and recommended− Provides additional features compared to git.cern.ch (Gitolite-based)

− collaboration and code review features − Recommended for all new version control projects hosted at CERN

− To get started: KB0003137

− Librarians can move repositories from git.cern.ch to GitLab: KB0003111

Git.cern.ch is no longer recommended for new projects− Self-service requests for new projects will be moderated from 1 Jul 2015− Longer term future of git.cern.ch will be evaluated at a later stage

Github.com may be appropriate− For open source and projects with external collaborators

− GitLab at CERN supports CERN accounts only− Advice on choosing between CERN GitLab and GitHub.com: KB0003132

5th LHCb Computing Workshop, 22 May 2015

Page 11: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

11

SVN Service

SVN will continue for established projects− Maintenance updates but no additional development is planned

New projects are encouraged to use GitLab− New SVN repository requests will be moderated from 1 Jul 2015

Migration from SVN to GitLab will be possible− Librarians will be contacted in due time to discuss potential migrations

The Trac add-on to SVN will be maintained for code browsing in projects already using it− JIRA, web services (e.g. Twiki) are recommended for tickets, wiki, etc− The recommended SVN web interface is websvn− Jira migration instructions will be provided for those who wish to do so− Issues raised in the May Trac survey are being followed up with users

5th LHCb Computing Workshop, 22 May 2015

Page 12: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

12

JIRA Service

JIRA currently hosts ~540 projects

Upgrade from JIRA 6.3.13 to 6.4.x is planned− During summer or early autumn

Fisheye/Crucible server will be stopped at end of 2015− Has problems with scalability− Less user friendly than GitLab for code review− Recommended replacement is GitLab

− Affects relatively few users

5th LHCb Computing Workshop, 22 May 2015

Page 13: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

13

CERNforge

CERNforge− http://cernforge.cern.ch− Portal for creating and managing resources related to code management− Has been updated to reflect changes to the Git, GitLab, SVN and JIRA

services outlined on the previous slides

5th LHCb Computing Workshop, 22 May 2015

Page 14: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

14

Software Development Workflow*

SVNGIT

Internal Software

Build Automatic tests

Test Results

Commit changes

Issues/requests

Users

Developers

Jenkins job

Build

GITLAB

Review & Merge

*This is a simplified example of a possible workflow with the supported tools [Thanks to Manuel Gonzalez Berges (EN-ICE) for this slide]

Software Release

Release

5th LHCb Computing Workshop, 22 May 2015

Page 15: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

5th LHCb Computing Workshop, 22 May 2015 15

GitLab: good to know

The code review workflow replaces fine-grained permissions: KB0003135 − GitLab has just a few predefined roles: Guest, Developer, Master, Owner− Branches have a ‘protected’ flag (on for master by default) to:

− Prevent force push and branch deletion− Force developers to use feature branches and the code review workflow

SSH access via nonstandard port 7999: KB0003136− Available from outside CERN. Copy URL from project page!

The Public visibility level really is public: KB0003122− Worldwide anonymous access, incl. search engines− no “CERN Public” visibility level!

Use SSH Deploy Keys for automated pull operations (build, deploy jobs etc.): KB0003129 − Don’t forget to add [gitlab.cern.ch]:7999 to known_hosts

E-groups can be used at the Group level, but not for individual projects− I.e. all projects in a group are more or less expected to share same permissions.− Workarounds possible. A future KB article will cover this.

Page 16: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

16

Summary of GitLab resources

Getting started: KB0003137 Set up SSH keys: KB0003136 Permissions in GitLab: KB0003122 Moving repositories from git.cern.ch to GitLab: KB0003111

Other KB articles: see GitLab topic in the Service Portal GitLab help: https://gitlab.cern.ch/help

Feedback & support: Git Service in the Service Portal

5th LHCb Computing Workshop, 22 May 2015

Page 17: Alexandre Lossent IT-PES-IS 1 5th LHCb Computing Workshop, 22 May 2015.

17

Questions?

5th LHCb Computing Workshop, 22 May 2015


Recommended