{"id":52692,"date":"2018-10-05T04:04:52","date_gmt":"2018-10-05T11:04:52","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/devops\/?p=52692"},"modified":"2019-02-14T15:48:31","modified_gmt":"2019-02-14T23:48:31","slug":"getting-started-with-universal-packages","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/devops\/getting-started-with-universal-packages\/","title":{"rendered":"Getting started with Universal Packages"},"content":{"rendered":"<p>At the end of <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/release-notes\/2018\/sprint-140-update\">last sprint<\/a> we flipped the switch on a new feature for <a href=\"https:\/\/azure.microsoft.com\/en-us\/services\/devops\/artifacts\/\">Azure Artifacts<\/a> called <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/artifacts\/quickstarts\/universal-packages?view=vsts&amp;tabs=azuredevops\">Universal Packages<\/a>.<\/p>\n<p>With Universal Packages teams can store artifacts that don\u2019t neatly fit into the other kinds of package types that we support. A Universal Package is just a collection of files that you\u2019ve uploaded to our service and labelled with a name and version.<\/p>\n<p>Universal Packages can be huge (we&#8217;ve tested up to 4TB), and our deduplication and compression technology can dramatically improve efficiency. We routinely see 10:1 size savings which results in improved network and storage efficiency.<\/p>\n<p>You can store anything you like in a Universal Package but here are some of the things that we\u2019ve seen them used for so far:<\/p>\n<ul>\n<li>Configuration scripts and templates (e.g. ARM templates)<\/li>\n<li>Database snapshots for integration testing<\/li>\n<li>Machine learning training data and models<\/li>\n<li>Developer tools and SDKs<\/li>\n<li>3D models and textures<\/li>\n<\/ul>\n<p>To get started with Universal Packages you just need to <a href=\"https:\/\/docs.microsoft.com\/en-us\/cli\/vsts\/install?view=vsts-cli-latest\">download and install the VSTS CLI<\/a> and once you\u2019ve authenticated you can issue the following command.<\/p>\n<pre>$ vsts package universal publish `\n    --feed SDKs `\n    --name windows-sdk `\n    --version 10.0.17134 `\n    --path . `\n    --instance https:\/\/dev.azure.com\/mseng<\/pre>\n<p>Downloading a package is just as easy, all you need to do is replace the <strong>publish<\/strong> command with the <strong>download<\/strong> command and you can pull down the files that you just published.<\/p>\n<pre>$ vsts package universal download `\n    --feed SDKs `\n    --name windows-sdk `\n    --version 10.0.17134 `\n    --path . `\n    --instance https:\/\/dev.azure.com\/mseng<\/pre>\n<p>For those of you not familiar with the Windows SDK \u2013 the default installation on Windows takes up about 2.2GB of space on disk. That is a lot of content to put into a package but Universal Packages copes with it because of the way that we process and transmit content to the service &#8211; <em>in fact we have some customers publishing packages today which exceed hundreds of gigabytes.<\/em><\/p>\n<h2>Optimizing upload &amp; download<\/h2>\n<p>For Universal Packages we&#8217;ve focused a lot on optimizing the amount of data that is transferred over the network. Before uploading any file we first check to see whether we are already storing the file in the service and if we are we don&#8217;t bother transferring it. This also works at the sub-file level so if you have a large file (potentially many GB in size) we will only upload a subset of that files&#8217; contents.<\/p>\n<p>Both uploads and download transmit the content of files in parallel to maximize the use of the available network connection and reduce the time it takes to transfer the package. We are also working on a cache that can reduce the amount of content you download by reusing the bytes that were transferred previously.<\/p>\n<h2>Next Steps<\/h2>\n<p>This is just the start for Universal Packages. We have a bunch of new features and improvements lined up which will make them even more powerful. In the meantime I would encourage you to take a look at <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/artifacts\/quickstarts\/universal-packages?view=vsts&amp;tabs=azuredevops\">our getting started documentation<\/a> and try it out for yourself! You can also <a href=\"https:\/\/docs.microsoft.com\/en-us\/azure\/devops\/pipelines\/targets\/universal-packages?view=vsts&amp;tabs=yaml\">use Universal Packages with Azure Pipelines<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>At the end of last sprint we flipped the switch on a new feature for Azure Artifacts called Universal Packages. With Universal Packages teams can store artifacts that don\u2019t neatly fit into the other kinds of package types that we support. A Universal Package is just a collection of files that you\u2019ve uploaded to our service and labelled with a name and version.<\/p>\n","protected":false},"author":656,"featured_media":52703,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1,223],"tags":[],"class_list":["post-52692","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-devops","category-package-management"],"acf":[],"blog_post_summary":"<p>At the end of last sprint we flipped the switch on a new feature for Azure Artifacts called Universal Packages. With Universal Packages teams can store artifacts that don\u2019t neatly fit into the other kinds of package types that we support. A Universal Package is just a collection of files that you\u2019ve uploaded to our service and labelled with a name and version.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/52692","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/users\/656"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/comments?post=52692"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/posts\/52692\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media\/52703"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/media?parent=52692"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/categories?post=52692"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/devops\/wp-json\/wp\/v2\/tags?post=52692"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}