How to Achieve more through Collaboration

30
How to Achieve more through Collaboratio n Damien Garros | Technical Marketing Engineer

Transcript of How to Achieve more through Collaboration

Page 1: How to Achieve more through Collaboration

How to Achieve more through CollaborationDamien Garros | Technical Marketing Engineer

Page 2: How to Achieve more through Collaboration

2 © 2016 Juniper Networks, Inc. All rights reserved.

AGENDA

1. Collaboration in the new era2. Continuous Integration the Safety Net3. How to get Started with Git4. The triangular Workflow

Page 3: How to Achieve more through Collaboration

3 © 2016 Juniper Networks, Inc. All rights reserved.

Goals and Target of this presentation

• Everyone• Non developer

People

SE, PS, PLM, TME, SM, RE, VP, SVP,

Systest, DevCustomers, partner

• Explain why Github and CI are not just for developers

• Introduce fundamental concepts

• Help getting started

• Explain how Git works

Target Goals Non Goals

Page 4: How to Achieve more through Collaboration

Collaboration in the new era

Page 5: How to Achieve more through Collaboration

5 © 2016 Juniper Networks, Inc. All rights reserved.

ScriptsCode

Device configuration

Documentation

Bug tracker

Collaboration is not just Code

Ansible Demo

JSNAPyTest files

Q & A

Page 6: How to Achieve more through Collaboration

6 © 2016 Juniper Networks, Inc. All rights reserved.

ScriptsCode

Device configuration

Documentation

Bug tracker

Everything is moving to Github or Gitlab

Page 7: How to Achieve more through Collaboration

7 © 2016 Juniper Networks, Inc. All rights reserved.

Github and Gitlab (@ Juniper)

Gitlab / InternalGithub / Public

• Cloud service, used by most open source project

• Not integrated with Juniper

• Hosted internally, accessible only within Juniper

• Integrated with Juniper Login

• Open Source project to provide Github-like feature

https://git.juniper.net/https://github.com/

Page 8: How to Achieve more through Collaboration

8 © 2016 Juniper Networks, Inc. All rights reserved.

Why is Git so popular ?

GIT Subversion CVS

Page 9: How to Achieve more through Collaboration

9 © 2016 Juniper Networks, Inc. All rights reserved.JUNIPER NETWORKS CONFIDENTIAL

Why is Git so popular ?

Enable CollaborationAcross Team

Without losing ownership

Page 10: How to Achieve more through Collaboration

10 © 2016 Juniper Networks, Inc. All rights reserved.

Collaboration Platforms

Git

Issue Tracker

DocsWiki

Release mgmt

DockerThird party Doc

Code Coverage Ansible

CI/CD

Pull Request

Stats

Build-In Ecosystem

Page 11: How to Achieve more through Collaboration

11 © 2016 Juniper Networks, Inc. All rights reserved.

More than just Git servers

Page 12: How to Achieve more through Collaboration

12 © 2016 Juniper Networks, Inc. All rights reserved.

Design for collaboration fork & pull request 1- Fork

2- Change3- Pull Request

4- Discuss

Awesome projectgithub.com/ME/awesome

Awesome projectgithub.com/YOU/awesomeupstream

I propose to add a green file

Approved5- Merge

Page 13: How to Achieve more through Collaboration

13 © 2016 Juniper Networks, Inc. All rights reserved.

2 names, same things

Pull Request == Merge Request

Page 14: How to Achieve more through Collaboration

Continuous Integration - The Safety Net -

Page 15: How to Achieve more through Collaboration

15 © 2016 Juniper Networks, Inc. All rights reserved.

Continuous Integration, the safety net

Travis-CI External tools that will execute some tests for EACH change/commit:

1. Download the project2. Setup Environment3. Run tests4. Report results in Github/GitlabGitlab-CI

Page 16: How to Achieve more through Collaboration

16 © 2016 Juniper Networks, Inc. All rights reserved.

Travis CI, Free Cloud Based Solution

Travis-CI

Cloud Based solution – Nothing to installFree for open-source / public projectVery easy to setup

Page 17: How to Achieve more through Collaboration

17 © 2016 Juniper Networks, Inc. All rights reserved.

Travis CI – setuplanguage: python python: - 2.7

env: - ANSIBLE_VERSION=1.9.6 - ANSIBLE_VERSION=2.1.0.0

install: - pip install -r requirements.txt - pip install -q ansible==$ANSIBLE_VERSION

script: - ansible-playbook pb.generate.variables.yaml - ansible-playbook pb.conf.all.yaml

.travis-ci.yaml

Page 18: How to Achieve more through Collaboration

18 © 2016 Juniper Networks, Inc. All rights reserved.

Awesome Python Project

Travis CI process

Awesome Python Projectgithub.com/ME/awesome

Awesome Python Project1.9.6

Awesome Python ProjectAwesome Python Project

Notify

Download

Report

2.1.0

1.9.62.1.0

NotifyDownloadReport

Page 19: How to Achieve more through Collaboration

19 © 2016 Juniper Networks, Inc. All rights reserved.

Travis CI – Ansible project

Page 20: How to Achieve more through Collaboration

20 © 2016 Juniper Networks, Inc. All rights reserved.

Travis CI - Pyez

Page 21: How to Achieve more through Collaboration

21 © 2016 Juniper Networks, Inc. All rights reserved.

A Pull request is the beginning of a discussion

• Create Pull request early to discuss the proposal

• Changes can be made once the pull request is open

• Tests will be executed for each change.

Page 22: How to Achieve more through Collaboration

How to get started with Git

Page 23: How to Achieve more through Collaboration

23 © 2016 Juniper Networks, Inc. All rights reserved.

Git require training, patience … and practice

• Use new concept• Not easy for beginners but

totally worth the effort• Lots of resources available

Practice, practice, practice

Page 24: How to Achieve more through Collaboration

24 © 2016 Juniper Networks, Inc. All rights reserved.

So many learned it already

GIT Subversion CVS

Page 25: How to Achieve more through Collaboration

25 © 2016 Juniper Networks, Inc. All rights reserved.

LOTS of resources to learn Git Online

try.github.io/

Per Topic illustrated Guides to understand

main concepts

Summary of most important commands with short examples

Interactive tools

Illustrated Guides

Cheatsheet

Learn Git in 15 min with Step by Step hands on guide

guides.github.com services.github.com/kit/downloads/github-git-cheat-sheet.pdf

Page 26: How to Achieve more through Collaboration

The Triangular Workflow

Page 27: How to Achieve more through Collaboration

27 © 2016 Juniper Networks, Inc. All rights reserved.

The Triangular Workflow - Setup

Server

My Laptop

THEM/project ME/project

ME/project

Fork (GUI)

Clone

origin github/ME/projectupstream github/THEM/project

git clone github/ME/project

R/O R/W

R/W

Page 28: How to Achieve more through Collaboration

28 © 2016 Juniper Networks, Inc. All rights reserved.

The Triangular Workflow Contribute

Server

My Laptop

THEM/project ME/project

ME/project

origin github/ME/projectupstream github/THEM/project

R/O R/W

R/W

CommitChange

Push origin

Pull Request (GUI)

Page 29: How to Achieve more through Collaboration

29 © 2016 Juniper Networks, Inc. All rights reserved.

The Triangular Workflow – update/merge

Server

My Laptop

THEM/project ME/project

ME/project

origin github/ME/projectupstream github/THEM/project

R/O R/W

R/W

Merge changes

Push originFetch upstream

Page 30: How to Achieve more through Collaboration

30 © 2016 Juniper Networks, Inc. All rights reserved.

Thank You