Azure Deployment

Microsoft Azure 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.

DEPRECATED: Announced February 24, 2022 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.

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. 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. 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

Azure App Service 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 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.

  1. After you click on the + Create button,

  2. Create a name to your Resource Group

  3. Select a Region for it to be located in.

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 Cosmos DB.

Deploy Azure Cosmos DB for Mongo DB

Please Note In Cosmos DB version 3.6: In order to do a sort on a property, there must be an index set. This is different from how MongoDB works as MongoDB allows sorting on any property regardless of an index being set. To resolve this, a wildcard index can be added to the following collections:

db.submissions.createIndex( {"$**": 1 } );
db.forms.createIndex( {"$**": 1 } );
db.projects.createIndex( {"$**": 1 } );
db.actions.createIndex( {"$**": 1 } );
db.roles.createIndex( {"$**": 1 } );

Form.io requires a MongoDB compatible database to run its platform. While you could setup a stand alone MongoDB or even use MongoDB Atlas, for Azure, it is also perfectly reasonable to use Cosmos DB for the database. Follow these instructions to setup a new database.

  1. In the left-hand column, click on the menu item that says Azure Cosmos DB.

  2. Click on the + Create button

  3. When asked "Which API best suits your workload?" select Azure Cosmos DB for MongoDB

  1. On the Basics enter these settings.

    • Under Project Details choose a Subscription

    • Under Project Details choose a Resource Group

    • Under Instance Details enter an Account Name.

    • Under Instance Details select a Region of you choice.

    • Under Instance Details select the Capacity Mode.

    • Under Instance Details uncheck Limit total account throughput.

  1. You can then press Review + create button, you will then wait few moments for the database to create.

  2. After the database has finished settings up on the left column you will select the Connection Strings tab.

  1. Form.io does require that you use a standard connection string, so you will need to make a small change to what Azure provides you by adding your database name to the connection string.

    • This is placed right after the formio.documents.azure.com:10255/ and before the text ?ssl=true. It should look like the following.

mongodb://formio-developer-cosmos-db:[PASSWORD]@formio-developer-cosmos-db.mongo.cosmos.azure.com:10255/formio?ssl=true&replicaSet=globaldb&retrywrites=false&maxIdleTimeMS=120000&appName=@formio-developer-cosmos-db@

Azure Blob Storage Setup

DEPRECATED: Announced February 24, 2022 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.

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. 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. 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

In order to get 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.

    • When it has finished open the side drawer and under Data Storage section

    • Select Containers.

  6. Once on the Containers page press + Container

    • Create a name for this container (will be used for environment variable FORMIO_AZURE_CONTAINER) ,

    • Select the Public Access Level for Blob Storage.

    • 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

    • Click on Access Keys option.

  9. Copy the Connection String (will be used for environment variable FORMIO_AZURE_CONNECTION_STRING) from Access Keys section,

    • Will be used when configuring a projects File Storage settings and the PDF Server.

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

  1. 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.

    • Allowed origins and Allow headers are set to *

    • Allowed methods are set to GET, HEAD, OPTIONS, and PUT

Last updated