Top Banner
Marcel de Vries CTO Xpirit Best Practices for Using Open Source Software in the Enterprise
41

Best practices for using open source software in the enterprise

Jul 28, 2015

Download

Technology

Marcel de Vries
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Best practices for using open source software in the enterprise

Marcel de VriesCTO Xpirit

Best Practices for Using

Open Source Software in

the Enterprise

Page 2: Best practices for using open source software in the enterprise

About me: Marcel de [email protected]

@marcelv

http://fluentbytes.comXpirit

Also regional director

Page 3: Best practices for using open source software in the enterprise

How software is built• 80% is based on components + your

code + glue code => new product

• Components dominantly are now open source

• Build on the shoulders of giants by using free software components in your products

Page 4: Best practices for using open source software in the enterprise

DEMOAwareness is key!

Page 5: Best practices for using open source software in the enterprise

Look at average ASP.NET website

• ASP.NET itself

• Entity framework

• JQuery

• Angular

• Bootstrap

• …201320122011200920082007 2010

2B1B500M 4B 6B 8B 13B

Source: Sonatype, Inc. analysis of (Maven) Central Repository component requests.

Page 6: Best practices for using open source software in the enterprise

The new Microsoft• Microsoft embraces open source in many areas

now

• Did you know Azure provides many different flavors of Linux distributions?

• Did you know Microsoft open sourced important parts of their development platform?– ASP.NET MSBuild

– SignalR .NET Core (CLR & FW)

– Roslyn compilers WCF

Page 7: Best practices for using open source software in the enterprise

The .NET Foundation .NET API for Hadoop WebClient

.NET Compiler Platform ("Roslyn").NET Map Reduce API for Hadoop

.NET Micro Framework

ASP.NET MVC

ASP.NET Web API

ASP.NET Web Pages

ASP.NET SignalR

Composition (MEF2)

Entity Framework

Linq to Hive

MEF (Managed Extensibility Framework)

OWIN Authentication Middleware

Rx (Reactive Extensions)

Web Protection Library

Windows Azure .NET SDK

Windows Phone Toolkit

WnsRecipe

Mimekit Xamarin.Auth

Xamarin.Mobile

Couchbase for .NET

Miguel de Icaza (Xamarin)

Laurent Bugnion (IdentityMine)

Niels Hartvig (Umbraco)

Anthony van der Hoorn (Glimpse)

Paul Betts (GitHub)

Nigel Sampson (Compiled Experience)

http://www.dotnetfoundation.org

Mailkit

System.Drawing

Page 8: Best practices for using open source software in the enterprise

Best practices in OSS for the enterprise

• In the Microsoft eco system we are just getting started• How do you come up with best practices already?

– Look at the eco systems that have been using OSS for a long time

• E.g. Java ecosystem

– My personal experience as Technology manager, CTO in terms of risk awareness

• Experiences based on consulting engagements where I worked in heterogeneous environment

Page 9: Best practices for using open source software in the enterprise

Challenge to the enterprise

• Developers want freedom to use open source software– It is highly encouraged by modern development tools like Visual

Studio

– NuGet, NPM (node), Bower, Maven, etc.

• How can I empower my developers, without bringing my company at risk?

• I see my .NET developer use open source now, how can I cope with this and still keep them happy?

Page 10: Best practices for using open source software in the enterprise

Open source software

• What are the implications in the enterprise?What is open source?

Publish open source software

What are common business models?

When can I publish Oss?

What do I need to accept contributions?

Consuming open source software

What are the Licenses implications?

Are there known Vulnerabilities?

How well are these sources maintained?

How can we keep that in control?

Page 11: Best practices for using open source software in the enterprise

What is open source anyway?

“Computer software with its source code made available under a license in which the copyright holder provides the rights to study, change and distribute the software to anyone and for any purpose”

St. Laurent, Andrew M. (2008). Understanding Open Source and Free Software Licensing. O'Reilly Media. p. 4. ISBN 9780596553951

Page 12: Best practices for using open source software in the enterprise

According to the Open Source Definition, the license must not:• Discriminate against persons or groups

• Discriminate against fields of endeavour

• Be specific to a product

• Restrict other software

http://opensource.org/osd

What is a license?

Page 13: Best practices for using open source software in the enterprise

COPYLEFT

GPL

LGPL

AGPL

Permissive

Restrictive

License spectrum

Page 14: Best practices for using open source software in the enterprise

Copyleft License implications• Distribution triggers obligations

– And in some cases using on a network also trigger obligations (AGPL)

• Obligations are:• Disclosing the source code of your product;

• Making your product available under that copyleft license;

• Licensing your patents that read on the software.

• Once your product is available under a copyleft license any recipient can use it and distribute it without charge.

Page 15: Best practices for using open source software in the enterprise

Copyleft and Cloud• In general, using modified Copy left sources do not need to

be published when used in cloud solution

• Cloud service is in general not considered distribution, but use of the software– So does not trigger copy left obligations

• Except for following licenses:– AGPL

– European Union Public License

– Common Public License

Page 16: Best practices for using open source software in the enterprise

CONTRIBUTING TO OPEN SOURCE

Page 17: Best practices for using open source software in the enterprise

OSS Contribution Funnel• Be able to understand what it does

• Can easily pick it up and use

• Download• Fork / Follow / FavouriteUse

• Log bugs

• Answer questions

• Write blog posts

• Fix / add documentation

• Fix typos

Contribute Time

• Actually contribute code patches that fix bugs / improve test cases

• Contribute entirely new features

• Translate• Maintain platforms

Contribute Code

• Become a core committer (get write access)

• Accept / validate code contributions

• Nurture new people• Stick around

• Influence the direction of the project

Own

Page 18: Best practices for using open source software in the enterprise

Publishing open source• What do you need when you want to publish open source

software?

• You need to know who worked on the software– Each individual is a copyright holder!– If you don’t know, you are at risk going forward, you need to chase

them down

• How about I publish software on my blog?– You are still the copyright holder and need to set license terms for

others to be able to use it!

Page 19: Best practices for using open source software in the enterprise

A Contributor License Agreement (CLA) defines the terms under which intellectual property has been

contributed to a company/project, typically software under an open source

license.From Wikipedia, the free encyclopedia

Page 20: Best practices for using open source software in the enterprise

Why would I publish my product as OSS?

• Open source is a proven viable business model

• Company builds and contributes to the open source software

• Company builds premium components they sell• Company provides premium services

– e.g. SaaS versions of the product, or consulting services

Page 21: Best practices for using open source software in the enterprise

CONSUMING OPEN SOURCE

Page 22: Best practices for using open source software in the enterprise

Consuming open source software

Use of components creates a

SOFTWARE SUPPLY CHAIN

DEVELOPMENTBUILD AND DEPLOY

PRODUCTIONCOMPONENT

SELECTION

Page 23: Best practices for using open source software in the enterprise

Licenses are one part of the story, but what about…

HEARTBLEEDEverything was secure until, suddenly it wasn’t

Introduced December 2011 Discovered April 2014 Lot of instances fixed, but still not all!

Page 24: Best practices for using open source software in the enterprise

Consuming open source softwareIf you’re not using secure

COMPONENTSyou’re not building secure

APPLICATIONS

DEVELOPMENTBUILD AND DEPLOY

PRODUCTIONCOMPONENT

SELECTION

Page 25: Best practices for using open source software in the enterprise

You need to know what is used in your enterprise!

How can we empower developers in using open source but be risk aware?

Page 26: Best practices for using open source software in the enterprise

What can we learn from the Java space?

• They use artifact repositories to pull their packages from and push their packages to– Provides a single point where you can ask questions about the

software

• In the Microsoft ALM tools, we are used to– Use Version control repositories for our sources

– Use network drop locations for our build products

– Use the web to pull our packages

Page 27: Best practices for using open source software in the enterprise

Consuming open source software

DEVELOPMENTBUILD AND PUBLISH

PRODUCTIONCOMPONENT

SELECTION

Page 28: Best practices for using open source software in the enterprise

When you have a repo in place, you can….

• Scan for licenses in use

• Scan for known vulnerabilities

• Scan for popularity

Page 29: Best practices for using open source software in the enterprise

Meet the artifact repository• There are different flavors out there

– Alternatives are archiva, Artifactory, Nexus

– You can look at a comparison at: http://docs.codehaus.org/display/MAVENUSER/Maven+Repository+Manager+Feature+Matrix

• For my demos I am using Sonatype Nexus– The one I most commonly encountered in my engagements with

customers

– Supports the Microsoft Eco system with NuGet!

Page 30: Best practices for using open source software in the enterprise

DEMOShow nexus PRO

Page 31: Best practices for using open source software in the enterprise

Great but not all OSS comes from NuGet

How can you know what is in your enterprise, because just using a proxy does not cut it?

Page 32: Best practices for using open source software in the enterprise

How to publish to repo after build

By publishing your product back to the artifact repository, you can now scan your software on use of OSS

Page 33: Best practices for using open source software in the enterprise

Consuming open source software

DEVELOPMENTBUILD AND PUBLISH PRODUCTION

COMPONENT SELECTION

Page 34: Best practices for using open source software in the enterprise

DEMOPublish to artefact repo

Page 35: Best practices for using open source software in the enterprise

Great!Now I have an artifact

repository, how does that solve my needs?

Page 36: Best practices for using open source software in the enterprise

We need a way to scan my repository and answer my

important questions

Page 37: Best practices for using open source software in the enterprise

DEMOHealth reports

Page 38: Best practices for using open source software in the enterprise

Part of the puzzle• Artifact repositories can help you

– Empower your developers to build on shoulders of giants

– Analyze what is in use• Source code or binaries

– Give insights in your exposure to known vulnerabilities in OSS components

• There are things you need to figure out yourself

– What OSS do we pick for certain parts of the system

– How do you select the right component with an abundance of choice?

– How do you engage with communities?

– How to manage contributions to OSS?

Page 39: Best practices for using open source software in the enterprise

What we not covered• Integrating license and vulnerability scans as part of your continuous

delivery pipeline

• Defining policies for what you allow

– Component Lifecycle Management tooling

– Can plug into your build system or your delivery pipelines

• People and Perception

– Developer bias

– Developer satisfaction

– Not looking at the other side of the fence

Page 40: Best practices for using open source software in the enterprise

Summary

• There is more to open source than sources• Understand licensing• Understanding the OSS ecosystem• OSS usage impacts your business• Set up a strategy to know what you are using• Artifact repository can help you solve parts of the

puzzle– Make them part of your Continuous Delivery Pipeline

Page 41: Best practices for using open source software in the enterprise

Questions?

• Xpirit Magazine in your TechDays bag with cool articles on e.g:– Hololens programming– Azure Service Fabric– Application Insights

http://fluentbytes.com@[email protected] help? Contact us