# Azure Deployment

[**Microsoft Azure**](https://azure.microsoft.com/) is perfect for Enterprise customers who wish to have a very robust platform with high availability. It is used and trusted by some of the largest companies in the world to serve as their Cloud infrastructure.

{% hint style="info" %}
**DEPRECATED:** Announced [February 24, 2022](https://blog.min.io/deprecation-of-the-minio-gateway/) Azure Blob Storage Minio gateway would be deprecated within 6 months. This means that the Minio gateway is no longer supported by Azure, and users are encouraged to migrate to [alternative solutions](https://blog.min.io/gateway-deprecation-implications-for-azure-customers/).

The Minio gateway was a feature of Azure Blob Storage that allowed users to access their Azure storage using the Minio API. It was designed to provide compatibility with Minio client libraries and tools, making it easier for users to interact with their Azure storage from Minio-based applications.\
\
\&#xNAN;***What does this mean for Form.io customers?***\
Azure Blob Storage integration is **only available in version 4.0.0 and greater**. If you are using an older version of the product, you will need to upgrade to access this feature.\
\
\&#xNAN;***What if I am unable to upgrade to version 4.0.0?***\
Use a Minio image to the last version that supported Azure Gateway **(minio/minio:RELEASE.2022-04-29T01-27-09Z)** so you can still use S3 environment settings w/ PDF server 3.4.0\
\
[**Click here for more information on installing a MinIO File Server** ](https://help.form.io/deployments/deployment-guide#installing-a-file-server)
{% endhint %}

[**Azure App Service**](https://azure.microsoft.com/en-us/products/app-service/#overview) is a fully managed platform-as-a-service (PaaS) that allows developers to build, deploy, and scale web, mobile, and API applications.

## Table of Contents

* [Azure Resource Groups](#resource-groups)
* [DB setup](https://help.form.io/deployments/deployment-guide/cloud-deployment/azure/set-up-the-db)
* [Azure Blob setup](#azure-blob-storage-setup)
* [Azure App Service](https://help.form.io/deployments/deployment-guide/cloud-deployment/azure/azure-app-service)
  * [Azure MSSQL Connector](https://help.form.io/deployments/deployment-guide/cloud-deployment/azure/azure-app-service/azure-mssql-connector-deprecated)
* [Azure VM](https://help.form.io/deployments/deployment-guide/cloud-deployment/azure/azure-virtual-machine)

## Azure Resource Group Setup

A **Resource Group** is a logical container that holds related resources for an Azure solution. When you create a resource, you need to specify a resource group to host it.

Once you create a new Azure account, the first thing you will want to do is to create a **Resource Group** that will contain all of the deployments from this walkthrough. \
\
You can do this by clicking on the **Resource Groups** menu item on the left side of the screen, and then from the **Resource Group Dashboard** click the **+ Create** button.

#### Here are a few things to consider when selecting a Resource Group region:

* Latency: Choose a region that is closest to your users to minimize latency.
* Compliance: Some regions may be required for compliance with certain regulations or standards.
* Pricing: Prices for resources can vary by region. You may want to consider the cost of resources in different regions to help determine the best fit for your needs.
* Geography: Some regions may be more suitable for your needs based on geography.

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2FfUkZSglQZdxcoxmXeSSb%2Fimage.png?alt=media&#x26;token=6ad30a26-bf82-4990-a6ed-3fb9d155e335" alt=""><figcaption></figcaption></figure>

1. After you click on the **+ Create** button,&#x20;
2. Create a name to your **Resource Group**&#x20;
3. &#x20;Select a **Region** for it to be located in.&#x20;

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2Fl6WJy2BXeDiLYvd87a6T%2Fimage.png?alt=media&#x26;token=b0e55415-96ab-4db6-9be7-f2da56b7f5e8" alt=""><figcaption></figcaption></figure>

This information is important because it helps to identify and organize your resources, and determines where they will be hosted. Please make sure to choose a name and region that best suits your needs.

Now that you have a resource group, you can now add all your other resources within this group, starting with a [**DB**](https://help.form.io/deployments/deployment-guide/cloud-deployment/azure/set-up-the-db).&#x20;

## Azure Blob Storage Setup

{% hint style="info" %}
**DEPRECATED:** Announced [February 24, 2022](https://blog.min.io/deprecation-of-the-minio-gateway/) Azure Blob Storage Minio gateway would be deprecated within 6 months. This means that the Minio gateway is no longer supported by Azure, and users are encouraged to migrate to [alternative solutions](https://blog.min.io/gateway-deprecation-implications-for-azure-customers/).

The Minio gateway was a feature of Azure Blob Storage that allowed users to access their Azure storage using the Minio API. It was designed to provide compatibility with Minio client libraries and tools, making it easier for users to interact with their Azure storage from Minio-based applications.\
\
\&#xNAN;***What does this mean for Form.io customers?***\
Azure Blob Storage integration is **only available in version 4.0.0 and greater**. If you are using an older version of the product, you will need to upgrade to access this feature.\
\
\&#xNAN;***What if I am unable to upgrade to version 4.0.0?***\
Use a Minio image to the last version that supported Azure Gateway **(minio/minio:RELEASE.2022-04-29T01-27-09Z)** so you can still use S3 environment settings w/ PDF server 3.4.0\
\
[**Click here for more information on installing a MinIO File Server** ](https://help.form.io/deployments/deployment-guide#installing-a-file-server)
{% endhint %}

In order to get [PDF server](https://help.form.io/deployments/deployment-guide/pdf-server) working, you will need to create an **Azure Blob** to store all of the pdf files that are uploaded.

To setup this, please perform the following.

1. Click on **Storage Accounts** in the left navigation bar, then click **+ Create**
2. Select your existing **Resource Group**
3. Add a **Storage Account Name**, and select your preferred replication method
4. In the **Advanced** tab enable **Enable hierarchical namespace**
   * Enable the checkbox for **Enable SFTP**
5. Click **Create**, this will take a few moments to create the Storage Account.&#x20;
   * When it has finished open the side drawer and under **Data Storage** section&#x20;
   * Select **Containers.**
6. Once on the Containers page press **+ Container**&#x20;
   * Create a name for this container (will be used for environment variable **FORMIO\_AZURE\_CONTAINER**) ,&#x20;
   * Select the Public Access Level for Blob Storage.&#x20;
   * When finished press **Create**.
7. This will now create a new **Blob Storage** for your Azure Account
8. Once the instance is created in the side bar menu underneath **Security + networking**&#x20;
   * Click on **Access Keys** option.
9. Copy the **Connection String** (will be used for environment variable **FORMIO\_AZURE\_CONNECTION\_STRING**) from Access Keys section,&#x20;
   * Will be used when configuring a projects File Storage settings and the PDF Server.

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2FUNAANhAH53M9eF0XxhHo%2Fimage.png?alt=media&#x26;token=037f21de-96df-4e0e-83ab-ecf34999a42a" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
**NOTE:** You can also use the following to provide settings for the File Upload component. The documentation for this is provided in our [Azure File Upload Documentation](https://help.form.io/integrations/filestorage/#azure)
{% endhint %}

10. Next will want to configure the **Resource Sharing (CORS)** options for the Blob Service. Please choose settings most suitable for your requirements. We used the following settings for this guide.&#x20;
    * Allowed origins and Allow headers are **set to \***
    * Allowed methods are **set to GET, HEAD, OPTIONS, and PUT**

<figure><img src="https://3305536326-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MPHoF2HwOA0s5HV_AIB%2Fuploads%2FlvyY0i4YELADR4HXgArt%2Fimage.png?alt=media&#x26;token=1a192de6-7dbd-46d3-895d-1cc88004ec46" alt=""><figcaption></figcaption></figure>
