Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fboucher/azunzipeverything
A simple Azure Function to Unzip files from a blob storage to another one
https://github.com/fboucher/azunzipeverything
arm azure azure-functions blob-storage hacktoberfest hacktoberfest2020 logic-app serverless unzip-files
Last synced: 3 months ago
JSON representation
A simple Azure Function to Unzip files from a blob storage to another one
- Host: GitHub
- URL: https://github.com/fboucher/azunzipeverything
- Owner: FBoucher
- License: mit
- Created: 2019-02-20T20:34:07.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2023-02-24T20:17:51.000Z (almost 2 years ago)
- Last Synced: 2024-05-02T02:36:02.523Z (9 months ago)
- Topics: arm, azure, azure-functions, blob-storage, hacktoberfest, hacktoberfest2020, logic-app, serverless, unzip-files
- Language: C#
- Homepage:
- Size: 1.22 MB
- Stars: 29
- Watchers: 6
- Forks: 55
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[![Build Status](https://dev.azure.com/cloud5mins/AzUnzipEverything/_apis/build/status/FBoucher.AzUnzipEverything?branchName=main)](https://dev.azure.com/cloud5mins/AzUnzipEverything/_build/latest?definitionId=23&branchName=main) [![Serverless Library](https://img.shields.io/badge/Serverless%20Library-%E2%9C%94%EF%B8%8Fyes-blue?style=flat&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABkAAAAZCAMAAADzN3VRAAACx1BMVEUAAAAAAAAAAP8Af38AVaoAf78AVaoAbbYAXLkAc7kAZqoAWqUAY7gAZrIAZa4AYKwAY7QAZ7YAZ7MAZ7UAZLMAY7MAZLUAZrIAZLcAY7QAZrIAZLMAZLYAZ7YAZLYAZrcAZbgAZLMAZ7YAZbIAZLQAYrMAY7UAZLUAZLYAZbQAZrcAZbMAZbgAZbQAZrQAZrgAZrcAZbgAaLkAZbUAZbYAZ7YAZbUAZrUAZ7YAZ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kWS/nAi0ymFILWJEY0fuuSv6hd8H21wuA0qa0hrXvVzJHqb/6egiwKWERNBfJBxtM4IBSKfpJTEzM8b7rExbTOadUZNunCOj3UH3+6fF49NuZsC5xOT7SaOv3VcBCZSXpPRir3y2rIk1vx4YBS/ZHRh5SynMuBCP0wbE64jfl8clQrC3q39MJGGFno4dXlcqEPzqRmi4kp6yx4XT0UIpJAZgWe3QgMPbjn4M2nLk6hB65RdrDpHtRJu34dn8YMOj85cHgLyJ1gTF3jvTnxod5Trh0xQTKmZIjABh1MXzil30Y86Oc0CazGCWDcOy+OQBXp0JiNcZxbTpe1SVVRr9gmLoZV1df8SoRwOxebuhQRNLIXq8dVnCrGlklnfyVGjZpUD6vuP4DQn3cxeG842QAAAAASUVORK5CYII=)](https://serverlesslibrary.net/sample/9a3f2929-4e4b-4386-ae22-93154e5d2f4c) [![Deploy to Azure](https://img.shields.io/badge/Deploy%20To-Azure-blue?logo=microsoft-azure)](https://portal.azure.com/?WT.mc_id=dotnet-0000-frbouche#create/Microsoft.Template/uri/https%3A%2F%2Fraw.githubusercontent.com%2FFBoucher%2FAzUnzipEverything%2Fmain%2Fdeployment%2FdeployAzure.json?WT.mc_id=cloud5mins-github-frbouche) [![GLO Board](https://img.shields.io/badge/with-GLO_Board-orange/?color=05887F&logoWidth=15&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAFgAAABMCAMAAADeDICLAAAABlBMVEX///8A/+Bm7Mx0AAAAAXRSTlMAQObYZgAAAXlJREFUeNrV2NGOwjAMRNH4/396X5Cm26twww5IrF9CXfvUSlskWPuYOUh4kJ25HzN3RsOBi+SrMolLINu7hFx2t5dROgicLVyRC1fkwgWssru9zJZzuXFd7l2/gT3MXndL+ZEw12VO+lg6OA5gcV3OkitNBxMiDNdk7oXsRLkXzcDswfJJeHVwkIgfhOfL4ZDXzzV8nRIwZHUdNtldhym7SzgZkdWNhokpu8uJvxRep7DLPvC/hte7YfnahOzu3Zr4m0KYXs+FdZCTRD3EbeGzn2MGr/fBkXCdAia034t5GY6HBGXePLgcUEfehw8cWGRxoWDXSQtLxEZ2WAxkHTaX6UEHHzeBJR94s5z0z/aMw3jZKGd1WFzZZofpAoasMN3kVXZ4bgObPGfwYJ69nE8Os8VlUlw2rsvzBJ6h63JoiDjn7v3GOcwel22rWaTy78ItjHIPlBKu/kCe2cKs+xNN2FmnBzCft5fpBN+MsB0dGGxt47AOwsvjB19NCt1bbfikAAAAAElFTkSuQmCC)](https://app.gitkraken.com/glo/board/XRYx_9FgZwAVbri7)
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors-)
# AzUnzipEverything
A simple Azure Function to Unzip files from a blob storage container to another one
The following features are supported in this current version:
1. Supported Archive Types: .zip, .rar
*Archive support is currently implemented using the sharpcompress library*
2. Password protetected zip files*The current solution provisions an Azure KeyVault instance for storing the zip archive(s) password used during the unzipping process. If password protected zip files are uploaded to the blob storage container, this would be the password used when attempting to un-zip the files into the destination storage container.**
## How to deploy
To deploy all the resources in your Azure subscription, just click on the **Deploy to Azure** button
Fill-up the form and voila! It will be automatically deployed in your Azure subscription. If you don't own an Azure subscription already, you can create your **free** account today. It comes with 200$ credit, so you can experience almost everything without spending a dime.
[Create your free Azure account today](https://azure.microsoft.com/free?WT.mc_id=dotnet-0000-frbouche)Learn more on [how to deploy you Azure Function automatically or using the Azure Resource Manager (ARM) template](https://docs.microsoft.com/azure/azure-functions/functions-infrastructure-as-code?WT.mc_id=dotnet-0000-frbouche)
![CreationForm][CreationForm]
## How to use it.
You can upload files to an Azure Blob storage using many different tools and code, but for this quick introduction let's use the Azure Portal.
Once [deployed](https://github.com/FBoucher/AzUnzipEverything#how-to-deploy), open the Azure portal [portal.azure.com](https://portal.azure.com/?WT.mc_id=dotnet-0000-frbouche)
1. navigate to the resource Group you just deployed (ex: demoAzUnzipEverything).
![resourceGroup][resourceGroup]
1. Select the **Storage Account** whose name starts with "dropzone".
1. Click on **Blobs**, in the middle of the screen.
1. Click on the **input-files** container.
1. Click on the Upload button, and you can now upload a zip file.![uploadFile][uploadFile]
1. After a few second the files you uploaded will be Unzipped into the blob storage container **output-files**.
## Run Locally & DevContainer
You can run the Azure Function locally or in a dev Container (files provided in folder .devcontainer).
You will need:
- a `local.settings.json` file at the root. You can renamed and update local.settings.example.json or use it as template.
- a storage account in Azure or using the emulator
- a KeyVault with a secret `ZipPassword`.## Continuous Integration (CI)
As you can see by the status badge [![Build Status](https://dev.azure.com/cloud5mins/AzUnzipEverything/_apis/build/status/FBoucher.AzUnzipEverything?branchName=main)](https://dev.azure.com/cloud5mins/AzUnzipEverything/_build/latest?definitionId=23&branchName=main) at the top of the page this project is automatically build at every push.
Have a look, the [Azure DevOps](https://dev.azure.com/cloud5mins/AzUnzipEverything/) project is **public**!
### Create a Continuous Integration, Continuous Deployment (CI-CD) for your Azure Function
In this video, I show you how to write an Azure Resource Manager (#ARM) template to deploy automatically your serverless Azure Function to Azure. It can be then used with a "Deploy to Azure" button from GitHub or any website, or in an Azure Pipeline to complete a Continuous Integration, Continuous Deployment (CI-CD) solution.
[![FunctionCICD][FunctionCICD]](https://www.youtube.com/watch?v=GRztpy337kU)
There is also a **written version** if you prefer reading: http://www.frankysnotes.com/2019/07/four-ways-to-deploy-your-azure-function.html
## More details
I have a [blog post](https://www.frankysnotes.com/2019/02/how-to-unzip-automatically-your-files.html) about this Azure Function.
I also have a video where I build and test the function.
[![Auto-UnzipFunction_YT][Auto-UnzipFunction_YT]](https://www.youtube.com/watch?v=GRztpy337kU)
I also have an extended version where I introduce more the Visual Studio Extension to work with Azure Function. And explain more details about the Azure Function V2.
[![AzureFunctionWithVSCode_YT][AzureFunctionWithVSCode_YT]](https://www.youtube.com/watch?v=t9PvXWEzU-o)
## Contributing ✨
Want to contribute? Check out our [Code of Conduct](CODE_OF_CONDUCT.md) and [Contributing](CONTRIBUTING.md) docs. This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
[CreationForm]: /medias/CreationForm.png "Creation Form"
[resourceGroup]: /medias/resourceGroup.png "Select the ResourceGroup"
[uploadFile]: /medias/uploadFile.png "Upload Zip file"
[FunctionCICD]: /medias/AzureFunctionCICD_YT.png "YouTube thumbnail"
[Auto-UnzipFunction_YT]: /medias/Auto-UnzipFunction_YT.png "YouTube thumbnail"
[AzureFunctionWithVSCode_YT]: /medias/AzureFunctionWithVSCode_YT.png "YouTube thumbnail"