Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Organize your chickens - NuGet for the Enterprise

2,551 views

Published on

Managing software dependencies, whether those created in-house or from third parties can be a pain in the behind. Whether dependencies feel like wild chickens or people run around like chickens dealing with dependencies, the NuGet package manager can be a cure. Let me guide you to creating enterprise (chicken) NuGets and dealing with them in a structured, easy-to-maintain manner. From developer workstation to build server, NuGet tastes great! This session will provide you the dip sauce.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Organize your chickens - NuGet for the Enterprise

  1. 1. www.realdolmen.com ORGANIZE YOUR CHICKENS: NUGET FOR THE ENTERPRISEJANUARY 16, 2013 | SLIDE 1
  2. 2. WHO AM I? Xavier Decoster Antwerp, Belgium Technical Consultant, RealDolmen Co-founder of MyGet.org Microsoft Extended Experts Team Author of Apress Pro NuGet http://www.xavierdecoster.com @xavierdecosterJANUARY 16, 2013 | SLIDE 2
  3. 3. IN THIS SESSION Chickens?!JANUARY 16, 2013 | SLIDE 3
  4. 4. We all have dependencies: deal with them! DEPENDENCY MANAGEMENTJANUARY 16, 2013 | SLIDE 4
  5. 5. SYMPTOMS YOU GOT A PROBLEM… No Versioning Strategy “Not Invented Here” Binaries Duplicated Syndrome all over VCS Release Bottlenecks Time Consuming Builds No License Management Monolithic Frameworks Conflicting References OSS InventoryJANUARY 16, 2013 | SLIDE 5
  6. 6. 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)JANUARY 16, 2013 | SLIDE 6
  7. 7. IMPACT OF DEPENDENCY HELL Version Control Delays Branching Strategy Increased Time-to-market Requirements Management Frustration, both for Architecture developers and users Coding & Testing Decreased ROI Continuous Integration VCS storage size ++ Time spent waiting/idle ++ Build Management Value revenue -- Deployment Release Management Bite me! I’m outta here..JANUARY 16, 2013 | SLIDE 7
  8. 8. A thin red line connecting many ALM processes… PACKAGE MANAGEMENTJANUARY 16, 2013 | SLIDE 8
  9. 9. FIRST THINGS FIRST  From dependency hell to package hell?  Broken process/architecture cannot be fixed by a tool!  Hell is hell, whether it’s the home of  Assemblies  Packages  Gems  What. Ever.  Escape route  Separating Concerns  Improves Cohesion  Increasing Cohesion  Improves maintainability  Improving maintainability  escaped from hell JANUARY 16, 2013 | SLIDE 9
  10. 10. NUGET: THE WAY OUT?  NuGet is a tool for package management  Facilitates searching & automates installing, upgrading, uninstalling, creating & publishing packages  Encourages good practices: e.g. versioning & reuse of components  Tools should  Just work  Reduce friction  Empower us & guide us to do the right thing  NuGet is such a tool  Not the answer to everything  But excellent at guiding you to find a way outJANUARY 16, 2013 | SLIDE 10
  11. 11. HOW ABOUT FRICTION?!  NuGet covers ~80% of typical needs  Not only OSS needs!  Scenarios  Automation  Automation  Automation  Most friction is caused by  Not adhering to good ALM practices  Not adhering to good technical design  Lack of extensibility in / integration with other toolsJANUARY 16, 2013 | SLIDE 11
  12. 12. VERSIONING  Think about your versioning!  Semantic versioning (semver.org) Major Breaking changes Minor Backwards compatible API additions/changes Patch Bugfixes not affecting the API  NuGet is smarter when using SemVer  Safe upgrades  You can be smarter when using SemVer  Anticipate breaking changesJANUARY 16, 2013 | SLIDE 12
  13. 13. VERSIONING “Zookeepers must become Rangers” (Mark Seemann) Non-negotiable deadline “Big Bang Release” Product Component A Component B Component C TimeJANUARY 16, 2013 | SLIDE 13
  14. 14. A STORY OF CONSUMERS AND CONSUMABLES… Consume packages Can consume packages Typically do not produce packages Consumer Consumables Produce packages Usually require installation / deploymentJANUARY 16, 2013 | SLIDE 14
  15. 15. THE –FORCE IS STRONG IN THIS ONE… “As software creators we don’t get to decide what version of our tools / libraries that people use. If we try to force them, our users will go somewhere else.” (Rob Reynolds)  As a package publisher  Do NOT expect/force your consumers to always update to the latest version  You can only hope they upgrade.  As a result, dear package consumers:  Do NOT auto-update packages! Consuming any package update must be a well-considered and human-made decision.JANUARY 16, 2013 | SLIDE 15
  16. 16. VERSIONING TAKE-AWAYS  Be explicit!  Breaking change?  Clients decide when to upgrade!  Introduce new version side-by-side & deprecate the old one  Monitor & measure usage  If you don’t know if it’s used, you can’t remove itJANUARY 16, 2013 | SLIDE 16
  17. 17. YOUR OWN NUGET REPOSITORY  NuGet.org = public feed  Privacy  Intellectual property  Solutions  Local Folder / Network share  NuGet.Server package  NuGet Gallery  MyGet.orgJANUARY 16, 2013 | SLIDE 17
  18. 18. INSTALL-PACKAGE NUGET.SERVERJANUARY 16, 2013 | SLIDE 18
  19. 19. NUGET.SERVER LIMITATIONS  Simple Implementation  Only 1 feed per web application  No granular security: 1 API key for all  Minimal UI  Conclusion:  Something more useful requires developmentJANUARY 16, 2013 | SLIDE 19
  20. 20. NUGET-AS-A-SERVICE  www.myget.org  NaaS  No installation: Register and off you go!  Freemium  Key Features for enterprise scenarios  Granular security  Private feeds (ADFS supported)  Fine-grained permissions & an API key per user  Integration with (private) SymbolSource repositories  User & Quota management  Repository management  Package Retention Rules  Package Promotion & MirroringJANUARY 16, 2013 | SLIDE 20
  21. 21. CHANGE OF PERSPECTIVE NuGet as a package manager NuGet as a protocol for distributing packagesJANUARY 16, 2013 | SLIDE 21
  22. 22. NUGET AS A PROTOCOL  Distributing tools & software  www.Chocolatey.org  “Apt-Get” for Windows  WebPI support  Distributing Web sites  www.OctopusDeploy.com  Build results in .nupkg  Octopus deploys to its tentacles  Test/Staging/Production tentaclesJANUARY 16, 2013 | SLIDE 22
  23. 23. A GLIMPSE AT THE NUGET ECO-SYSTEM Develop Build Package Share Network Share Collaborate DeployJANUARY 16, 2013 | SLIDE 23
  24. 24. CAUTION  With great power comes great responsibility  Package creators: behave!  Componentize  Version  Minimal friction  Package publishers: control!  User permissions  Repository contents  Package consumers: validate!  No auto-updatesJANUARY 16, 2013 | SLIDE 24
  25. 25. OR IN CHICKEN TERMS…JANUARY 16, 2013 | SLIDE 25
  26. 26. LAST BUT NOT LEAST  NuGet is OSS (Outercurve Foundation)  Microsoft’s involvement  Sponsors development  Results in:  Improved Visual Studio integration  Increased adoption of NuGet  Community involvement  Contribute ideas, code, documentation!  Share experiences, give feedback, submit issues  Discuss: http://jabbr.net/#/rooms/nuget  Package!JANUARY 16, 2013 | SLIDE 26
  27. 27. CONCLUSION Dependencies & people are chickens Deal with them! NuGet can help NuGet is a tool Improve your process! NuGet can help Consumables vs Consumers Improve your process! NuGet can help NuGet as a package manager NuGet as a protocolJANUARY 16, 2013 | SLIDE 27
  28. 28. http://www.xavierdecoster.com @xavierdecoster THANK YOU! Questions? Come get your MyGet stickers, you might get lucky! Disclaimer: no chickens were hurt during the making of this presentationJANUARY 16, 2013 | SLIDE 28

×