O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Organize your Chickens - NuGet for the Enterprise (UGIALTNET)

2.923 visualizações

Publicada em

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.

Publicada em: Tecnologia
  • I think you need a perfect and 100% unique academic essays papers have a look once this site i hope you will get valuable papers, ⇒ www.HelpWriting.net ⇐
    Tem certeza que deseja  Sim  Não
    Insira sua mensagem aqui

Organize your Chickens - NuGet for the Enterprise (UGIALTNET)

  1. 1. www.ugialt.net
  2. 2. Organize Your Chickens NuGet for the Enterprise
  3. 3. Who am I?› Xavier Decoster› Antwerp, Belgium› Focus on  What matters› www.xavierdecoster.com› @xavierdecoster
  4. 4. Agenda› NuGet› Scenarios  Host your own NuGet repository Chickens?!  Continuous {Package} Integration  {Ab}using NuGet  NuGet Inception› Conclusion
  5. 5. Welcome to Dependency Hell“A term for the frustration of software users who have installedsoftware packages which have dependencies on specificversions of other software packages.” (Wikipedia)
  6. 6. Cause and Effect› Reinventing the wheel  We don’t need that dependency  “If they can do it, we can do it, but better”› Marketing-Driven Versioning  People are waiting for v2 to buy  Let’s call it v4 Platform Update SP3 November Edition KB2348063 RTW Refresh
  7. 7. Package Management› NuGet to the Rescue! “NuGet is a Visual Studio extension that makes it easy to install and update open source libraries and tools in Visual Studio.”› Simple concept  Find Packages  {Re}Use Packages  Produce Packages
  8. 8. Semantic Versioning› Think about your versioning! {semver.org} Major Breaking changes Minor Backwards compatible API additions/changes Patch Bugfixes not affecting the API  Always specify lowerbound  Use a version range {lowerbound + upperbound} when versioning of package you depend on is messed up
  9. 9. Advanced usage scenarios› Host your own NuGet repository› Continuous {Package} Integration› {Ab}using NuGet
  10. 10. Hosting your own repository
  11. 11. 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
  12. 12. Solutions› Folder / File share› NuGet.Server package› NuGet Gallery {or Orchard Gallery}› MyGet
  13. 13. // Install-Package NuGet.ServerNuGet.Server Demo
  14. 14. 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
  15. 15. Meet MyGet› www.myget.org› NaaS  Register and off you go!› Supports Enterprise scenarios  Granular security  Package mirroring
  16. 16. // Sign in to myget.org and get startedMyGet Demo
  17. 17. // To chicken, or not to check-inContinuous {Package} Integration
  18. 18. 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
  19. 19. 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.
  20. 20. Continuous {Package} Integration› Can I get rid of all these referenced assemblies duplicated all-over my source control system?› Do I need to install and maintain NuGet on all my build agents?
  21. 21. // Organize your build chickens!Enable-PackageRestore Demo
  22. 22. 3rd parties don’t belong in your VCS› Replace them with NuGet packages› Do commit packagesrepositories.config file› Use Enable-PackageRestore› Set package-source location(s) (NuGet.settings.targets in $(SolutionDir).nuget folder)
  23. 23. Problem!› NuGet feed is subject to change...  PackageSource msbuild property to the rescue› Now what...  Host your own feed and mirror packages  Or use MyGet for that 
  24. 24. 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
  25. 25. // Not chickens…{Ab}using NuGet
  26. 26. 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
  27. 27. Guidance› Package Integration ≠ Integration Testing  CI builds reflect output of source control input  Same input always produces same output
  28. 28. The Male Optical IllusionStare at this picture. After about 30 seconds you shouldbegin to see a Boat appear in the background. Amazing!*** Some men report it takes them several minutes to see the boat, so be patient and really focus!!! ***
  29. 29. {Ab}using NuGet?› Change of perspective NuGet is a package manager NuGet is a protocol for distributing packages
  30. 30. // Automate anything: more time for a NaaP!NuGet as a Protocol
  31. 31. Automate deployments› Build results in .nupkg› Octopus deploys to its tentacles  Test tentacles  Staging tentacles  Production tentacles› www.octopusdeploy.com
  32. 32. Chocolatey› NuGet  developer library packages› Chocolatey  applications and tools packager  “yum” or “apt-get” for Windows› www.chocolatey.org
  33. 33. // Nom-nom NuGet dessertChocolatey Demo
  34. 34. NuGet Inception Build DEMO Test › Continuous Delivery of the MyGet Package website using: Push  TeamCity  NuGet Release / Publish  MyGet Deploy  Octopus
  35. 35. ConclusionDependencies & people are chickens Deal with them! NuGet can help Set up your own NuGet repository Continuous package integration NuGet is a package manager NuGet is a protocol
  36. 36. http://www.xavierdecoster.com @xavierdecoster Stay for the price draw for a chance to win a copy// No chickens were hurt// in the making of this presentationThank you!