+ All Categories
Home > Technology > SDC Sweden - Organize your chickens - NuGet for the Enterprise

SDC Sweden - Organize your chickens - NuGet for the Enterprise

Date post: 13-May-2015
Category:
Upload: maarten-balliauw
View: 902 times
Download: 0 times
Share this document with a friend
Popular Tags:
39
5/25/22 | SLIDE 1
Transcript
Page 1: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 1

Page 2: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 2

Organize Your ChickensNuGet for the EnterpriseMaarten Balliauw@maartenballiauw

Page 3: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 3

NuGet for the Enterprise

Organize Your Chickens

Page 4: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 4

Who am I? Maarten Balliauw Antwerp, Belgium www.realdolmen.com Focus on web

ASP.NET MVC, Windows Azure, SignalR, ... MVP Windows Azure & ASPInsider

http://blog.maartenballiauw.be @maartenballiauw Author: Pro NuGet - http://amzn.to/pronuget

Page 5: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 5

Agenda NuGet Scenarios

Host your own NuGet repository Continuous Package Integration Abusing NuGet NuGet Inception

Conclusion

Chickens?!

Page 6: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 6

NuGet

Page 7: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 7

Welcome to Dependency Hell“A term for the frustration of software users who have installed

software packages which have dependencies on specific

versions of other software packages.” (Wikipedia)

Page 8: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 8

Cause and Effect Reinventing the wheel

We don’t need that dependency “If they can do it, we can do it, but better” What happened to reuse of components?

Marketing-Driven Versioning People are waiting for v2 to buy Let’s call it v4 Platform Update SP3 November Edition KB2348063

RTW Refresh We lost ownership of AssemblyVersion ?

Page 9: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 9

Package Management NuGet to the Rescue!

Simple concept Find Packages (Re)Use Packages Produce Packages

“NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.”

Page 10: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 10

DemoFinding & consuming a NuGet package

Page 11: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 11

DemoCreating & publishing a NuGet package

Page 12: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 12

Semantic Versioning Think about your versioning! (semver.org)

Always specify lowerbound Use a version range (lowerbound + upperbound) when

versioning of package you depend on is messed up

Major Breaking changes

Minor Backwards compatible API additions/changes

Patch Bugfixes not affecting the API

Page 13: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 13

Hosting a repository

Page 14: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 14

Hosting your own repository NuGet = public feed

Privacy Intellectual property

NuGet maintained by package authors Author removes v1.0.45 and you depend on it

Page 15: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 15

Solutions Folder / File share NuGet.Server package NuGet Gallery (or Orchard Gallery) MyGet

Page 16: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 16

DemoNuGet.Server

Page 17: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 17

NuGet.Server limitations Only 1 feed per installation No UI

up to you to build it No granular security

only 1 API-key for entire feed Conclusion: requires you to develop if you

want something more useful

Page 18: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 18

Meet MyGet www.myget.org NaaS

Register and off you go! Supports Enterprise scenarios

Granular security Package mirroring Proxying

Page 19: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 19

DemoMyGet

Page 20: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 20

Continuous Package Integration

Page 21: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 21

Typical source control... Contains /References (if you are lucky)

...and also Project/_bin_deployable_assemblies

...and also /References/old ...and also /..././../.././References

Usually references GAC-ed assemblies

Page 22: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 22

Dependencies Software has dependencies. Deal with it.

But are those YOUR intellectual property? YOUR reason to build software? YOUR product?

No. They are dependencies. And they don’t belong in source control.

Page 23: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 23

Continuous Package Integration Can I get rid of all these referenced assemblies

duplicated all-over my source control system?Yes!

Do I need to install and maintain NuGet on all my build agents?No!

Page 24: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 24

DemoPackage Restore

Page 25: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 25

3rd parties don’t belong in your VCS

Replace them with NuGet packages Do commit packages\repositories.config file

Use Enable-PackageRestore

Page 26: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 26

Problem! NuGet feed is subject to change...

PackageSource msbuild property to the rescue(NuGet.settings.targets in $(SolutionDir)\.nuget folder)

Now what... Host your own feed and mirror packages Or use MyGet for that

Page 27: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 27

Organize your chickens Feed structuring

Scoped by quality: Build, QA, Production, … Scoped by audience: public, restricted access Other:

Scoped by product version, milestone… Scoped by target platform

Page 28: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 28

Guidance Publishing a package brings great

responsibility Breaking changes in your packages should be

versioned accordingly! Consumers might choose to no longer

consume any packages you published

Page 29: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 29

Guidance Package Integration ≠ Integration Testing

CI builds reflect output of source control input Same input always produces same output

Do not auto-update packagesduring automated builds

Page 30: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 30

Abusing NuGet

Page 31: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 31

Abusing NuGet?

Change of perspective

NuGet is a package managerNuGet is a protocol for distributing packages

Page 32: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 32

NuGet as a Protocol

Page 33: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 33

Chocolatey NuGet

developer library packages Chocolatey

applications and tools packager “yum” or “apt-get” for Windows

www.chocolatey.org

Page 34: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 34

DemoChocolatey

Page 35: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 35

Automate deployments Build results in .nupkg Octopus deploys to its tentacles

Test tentacles Staging tentacles Production tentacles

www.octopusdeploy.com

Page 36: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 36

Page 37: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 37

DemoContinuous Delivery

Build

Test

Package

Push

Release / Publish

Deploy

Page 38: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 38

ConclusionDependencies & people are chickens

Deal with them! NuGet can help

Set up your own NuGet repository

Continuous package integration

NuGet is a package managerNuGet is a protocol

Page 39: SDC Sweden - Organize your chickens - NuGet for the Enterprise

APRIL 12, 2023 | SLIDE 39

THANK YOU!

http://blog.maartenballiauw.be@maartenballiauw

http://amzn.to/pronugetor Install-Package ProNuGet


Recommended