Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Announcing zipdeploy integration with Run From Package #110

Closed
davidebbo opened this issue May 23, 2018 · 1 comment
Closed

Announcing zipdeploy integration with Run From Package #110

davidebbo opened this issue May 23, 2018 · 1 comment

Comments

@davidebbo
Copy link
Contributor

davidebbo commented May 23, 2018

Update 9/10/2018: this feature is now GA. You can find the official documentation here: https://docs.microsoft.com/en-us/azure/azure-functions/run-functions-from-deployment-package

Note: everything described here applies equally to Web Apps and Function Apps. It applies to App Service on Windows, but not on Linux

Also, note that Run From Package was initially called Run-From-Zip.

Two different technologies are now able to work together to support a simple deployment workflow. Let's start by summarizing each technology independently. They both have 'zip' in their name, which can lead to confusion. So it's crucial to have a good understanding of each before diving into how they work together.

Check out this short video which demonstrates what is described below.

zipdeploy: a deployment API that takes a zip file and deploys it to your App

The feature is described here and here. It's a simple API take takes in a vanilla zip file, and deploys its content to the wwwroot folder of your App. Once the files are extracted there, the zip is no longer in the picture (but this changes with Run From Package, as described later!).

The easiest way to try this feature is to go to choose Tools / Zip Push Deploy in Kudu, and simply drag and drop your zip file onto the UI.

Run From Package: a runtime feature that allows 'mounting' a zip file and running directly from it

See the earlier announcement. In particular, we are focusing here on the flavor where the zip file is uploaded to the site (as opposed to using a storage account).

The way this works is:

  • Create a d:\home\data\SitePackages folder, and drop your zip file in there (e.g. site01.zip)
  • In the same folder, create a file named packagename.txt, containing the name of your zip file.
  • In your Azure App Settings, set WEBSITE_RUN_FROM_PACKAGE to 1 (it was previously called WEBSITE_RUN_FROM_ZIP, which is still honored).

And now your App runs directly over the 'mounted' zip file, which completely takes over your wwwroot folder (which becomes read-only).

How zipdeploy and Run From Package come together

The integration between the two is very natural:

  • You have an App that is set up for Run From Package (i.e. that has WEBSITE_RUN_FROM_PACKAGE=1)
  • You use the zipdeploy API to deploy a zip
  • Instead of expanding your zip into wwwroot as it normally would, zipdeploy notices that Run From Package is enabled, and instead just takes the zip and saves in d:\home\data\SitePackages, along with the matching packagename.txt file.

The beauty here is that from a deployment standpoint, you are calling the exact same zipdeploy API, and it automatically does the right thing based on whether the App is set up for Run From Package or not. So if you have some existing deployment flow that uses zipdeploy, you can start using Run From Package by just setting WEBSITE_RUN_FROM_PACKAGE=1, and without changing anything to how you deploy.

Please give this a try and send us feedback.

@davidebbo
Copy link
Contributor Author

Please use Azure/app-service-announcements-discussions#48 for discussions on this announcement.

@Azure Azure locked and limited conversation to collaborators May 23, 2018
@davidebbo davidebbo changed the title Announcing zipdeploy integration with Run-From-Zip Announcing zipdeploy integration with Run From Package Aug 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants