Skip to content

Instantly share code, notes, and snippets.

@leecow
Last active October 17, 2018 16:55
Show Gist options
  • Save leecow/8e76c46230c854ffef74582e5f2654c8 to your computer and use it in GitHub Desktop.
Save leecow/8e76c46230c854ffef74582e5f2654c8 to your computer and use it in GitHub Desktop.
.NET Core 3.0 Acquisition and Deployment

.NET Core 3.0 Acquisition and Deployment

This document describes .NET Core acquisition and deployment by beginning with how each area is handled in .NET Core 2.1 and identifying new scenarios for .NET Core 3.0 which expose gaps in the experiences. For the purposes of this document, acquisition and deployment are defined as follows:

  • Acquisition: Discovery and installation of .NET Core assets on a target system. This includes discovering that updates are available for the Runtime and SDK.
  • Deployment: Delivery of the .NET Runtime, applications and application updates.

Acquisition

The table below outlines all of the artifact types used to deliver .NET Core to target systems, basic action someone must take to use the artifact and whether an update notification and acquisition mechanism is available. Note that any 'update' action, is a complete installation of .NET Core. There is no concept of a delta patch.

Artifact Platform Customer action Update Notification
Visual Studio installer Windows, Mac Download and install Yes
pkg/msi/exe Windows, Mac Download and install No
deb/rpm Linux x86_64 Native package manager Some distros
zip / tar.gz All supported platforms Download and manual unpack No
snap All Linux which support Snap subsystem Native Snap management tool Yes
dotnet-install.* Powershell or Bash script Run script with parameters No
Docker images All which support Docker Manual or automated Docker execution ?

Note: Because .NET Core is an active open source project, it is expected that some communities will independently fill unique acquisition needs. Two examples we are aware of are installation packages available from chocolatey.org and the Fedora .NET SIG.

Once a customer has installed .NET Core (SDK or Runtime), there are few mechanisms for discovering that an update has been released which do not require custom work on their side.

Acquisition Gaps

Discoverability is the most significant shortcoming in the .NET Core acquisition story. Other than a few Linux exceptions, there is no system-provided or user gesture available which answers a question such as "Is there an update available for my .NET Core installation?". The dotnet-install script and release metadata file can be (and are) leveraged by some customers to enable this functionality but there is no turn-key solution or published guidance provided.

Roadmap of improvements:

  • Guidance for using, and/or samples leveraging, releases-index.json and releases.json
  • A web service which provides an abstraction layer between the above json data, returning version and other support-related answers.
  • Provide a user gesture from the host such as dotnet --check-for-update which could return appropriate data and status (ala --info) based on the json or utilize the web service. This data would provide sufficient information which could be acted on by the customer.

Update acquisition:

Outside of leveraging the Linux package managers and Snap system, there is no notion of 'automatic' update delivery for .NET Core. Further, .NET Core updates are complete, side-by-side installations rather then delta patches which complicates delivery of updates through system level services such as Microsoft Update or the Windows Stores.

Where native installers are used, installation of updates must take place using the platform appropropriate tooling. For this reason, improving update acquisition is an exercise in providing customers with notification that udpates are available as described in the section above. With the data returned from the notification channel, the customer can take appropriate actions to update applications and systems which they maintain.

New Developer Scenarios:

Targetting packs Runtime packs

Application Deployment

The application deployment story for .NET Core through version 2.1 has been intentionally simple and, other than publishing to Azure from Visual Studio, leaves the means and process entirely in the developer's hands. Deployment is, at its root, an xcopy-based model. This is the case for Self-Contained and Framework Dependent applications. Framework Dependent application developers have an additional burden of ensuring the appropriate .NET Core Runtimes are present on target systems.

Deployment Gaps

XCopy deployment has been adequate for server-based targets but is not an sufficient for client desktop deployment scenarios which come into play with Winforms and WPF applications in .NET Core 3.0. We have customer input which shows that shops of varying sizes deploy and maintain large numbers of internal .NET Framework applications to large numbers of desktops. Formal deployment mechanisms (eg ClickOnce) are used to manage the deployment and update processes in most cases.

.NET Core 3.0 will use existing technologies to enable deployment of .NET Core 3.0 applications. Initially, only Self-Contained applications will be supported. A Store solution is out of scope for 3.0 though may make sense for a later release.

ClickOnce

Bootstrapper could also be used to deploy the .NET Core Runtime MSI (This implies Framed Dependent could be in play for ClickOnce?)

[from Olia's notes] Here is the scope for ClickOnce design side:

  1. Enable ‘Publish’ for .NET Core Visual Studio projects
  2. Publishing process should generate another project for the activation bootstrapper, if it does not already exist. This needs to be a desktop .NET application for ClickOnce runtime to work correctly.
  3. Publishing process should add all Core project outputs as payload files (not references) to the activation bootstrapper project
  4. Publishing process would then create a deployment

MSIX

MSIX is not yet a ubiquitous technology which is guaranteed to exist on supported .NET Core platforms (Win7+). We cannot take a dependency on MSIX as a primary deployment mechanism until this gaurantee is a reality. That said, there is an opportunity to begin supporting the technology as a packaging format with broader deployment capabilities coming into scope as MSIX adoption matures.

For .NET Core 3.0:

  • Runtime and SDK will continue to be packages as MSIs.
  • MSIX support will be limited to .NET Core self-contained applications.
  • MSIX as a deployment type will be exposed through Visual Studio Package and .NET Core projects.

Containers

Container Registry New architectures

Windows Store

What would it mean to have Shared Frameworks available on the Store? Would this enable a Framework Dependent application to automatically acquire the appropriate Framework?

Servicing

From the beginning, the servicing model for .NET Core has been 'pull' rather than 'push'. This means that the customers need to discover that an update is avaible, download it through some channel and update applications and/or install the updated runtimes as appropriate. A key weakness in this model is the discoverability of updates as highlighted in the acquisition section above and the solutions are the same.

Developers would have the ability to leverage either the release metadata directly or utilize the web service for update detection. With .NET Core update availability accessible via code, developers could easily automate the update acquistion pipeline from discover to rebuild, CI/CD, testing and into their deployment channels.

Enterprise admins would likewise have the means to easily script Runtime update detection using the same metadata or web service. Guidance could be written to cover strategies for deploying Runtime updates at scale within enterprises.

Installation clean-up

Need to explore what it would look like to remove previous on successful install. Only needed for Mac and Windows as this is already a feature of our Linux native installers.

@dleeapho
Copy link

I think this is a good start. Some initial comments around structure and scope:

  1. One aspect that I think needs to be called out is that acquisition in the realm of development scenarios. I think that expansion of the dev scenarios would then bring in targeting packs (new to NC3) and then runtime packs (also new to NC3) stand mentioning in this doc since they expand the installers, and packages we need to deliver. More info on targeting and runtime packs are described in: https://gist.github.com/nguerrera/a2326cd08785e68a0ce0fa05af0ea5f8
  2. The Acquisition table should list out the target architectures since we'll be adding significant support across ARM architectures for 2.2 and 3.0
  3. Servicing could benefit from a brief description of the automation flow we have in mind vis-à-vis releases-index.json, eg. enterprise app dev machine queries it to discover there is a new version of the runtime is available; they acquire it and rebuild and retest via their CI/CD system, do acceptance testing, then push a new app (with updated runtime) to their client machines. I don't think we need a complete and air-tight description but something more of a hypothesis.

@leecow
Copy link
Author

leecow commented Oct 17, 2018

Thanks Dan - expanded the servicing section to cover a bit more detail and reference back to the 'update acquisition' section.

What is the list of new ARM support? I might be missing something but isn't it just ARM64 and to begin producing debs for both ARM32 and 64?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment