To use Azure Managed Identities to connect to Azure Cosmos DB, Graphlytic has to be installed using the Single-container mode. The standard Multi-container installation of the Graphlytic Azure App (available in Azure Marketplace) does not support Azure Managed Identities (for more information, see the Preview limitations on this page).

Steps:

1. Create a storage account

1. Create a resource

On the Azure home, click the “Create a resource” button.

1_create_a_resource.png

Select “Storage” in Categories, then click “Create” Storage account.

2_create_a_storage_account.png

2. Fill out the form for a new storage account

  1. Create or use an existing resource group.

  2. Choose your storage account name and select the region.

  3. Click on the “Review + create” button and finish creating with the “Create” button after validation.

3_create_a_storage_account_form.png

3. Go to resource

After the deployment is finished, click on the button “Go to resource”.

2. Add a file share

  1. On the Storage account page, click on the “Storage browser” item in the left menu.

  2. Click on “File shares”.

  3. Click on “Add file share”.

  4. Fill out the name of the file share.

  5. Complete the process by pressing the “Create” button.

4_add_file_share.png

If you don’t see the new File share in the list, try to refresh it with the “Refresh” icon.

3. Create the Graphlytic Web App

1. Create a resource

Click the “Create a resource” button on the Azure home page.

1_create_a_resource.png

Click on the “Create” link in the Web App section.

5_create_web_app.png

2. Fill out the form in the “Basics“ tab

  1. Create or use an existing resource group from your subscription.

  2. Choose the name of the instance, and select the “Container” radio button.

  3. Select region.

  4. Choose your existing pricing plan or create a new one.

  5. Switch to the “Container” tab.

6_create_web_app_form_1.png

3. Fill out the form in the “Container“ tab

  1. Choose “Docker Hub or other registries” as the image source and the “Single Container” option.

  2. The registry server URL will be set to the Docker Hub URL by default. Then fill in the “Image and tag” value. A list of available options can be found here: https://hub.docker.com/r/demtec/graphlytic/tags.

  3. Click on the “Review + create” button and then finish creating the app by clicking on the “Create” button.

7_create_web_app_form_2.png

4. Go to the app resource

After the deployment is finished, click on the button “Go to resource”.

4. Create a storage mount for the Web app

Map the storage account to your web application:

  1. On the Web application page, click the “Configuration” option in the left menu.

  2. Click on the “Path mappings” tab.

  3. Click on the “New Azure Storage Mount” button.

  4. Fill out the form:

    1. Choose the name of the storage mount.

    2. Select the previously created “Storage account” and “Storage container”.

    3. Select the “Azure Filtes” Storage type.

    4. Enter “/usr/share/graphlytic/volume“ as the value of the “Mount path”.

  5. Complete the process with the “OK” button.

  6. Click the “Save” button to save the storage mount settings.

The new mount storage should appear in the list.

9_create_a_storage_mount.png

5. Test the application

Test your application using these steps:

  1. On the Web application page, click on the domain of your new web application.

  2. The application will be opened in a new tab.

  3. The default login and password is admin/admin (password can be changed in the user’s profile after logging in).

10_open_web_app.png

6. Enable the Azure Managed Identity

  1. Click the “Identity” option on the web application page in the left menu.

  2. Stay on the “System assigned” tab.

  3. Switch the “Status” to On.

  4. Save the changes with the “Save” button.

After saving, the “Object ID” will appear in the form.

11_enable_managed_identity.png

7. Create a Service connector to connect to Azure Cosmos DB

A service connector can be used to connect the web app to an Azure Cosmos DB without the need to enter the Cosmos DB keys into the app.

  1. On the Web application page, click the “Service Connector” option in the left menu.

  2. Click the “Create” button to create a new Service connector.

  3. Choose the “Cosmos DB“ Service type.

  4. Choose the “Apache Gremlin” API type.

  5. Choose your existing Cosmos DB account.

  6. Choose a Cosmos DB database.

  7. Choose a graph in the database.

  8. Choose the “Java” Client type.

  9. Switch to the “Authentication” tab, and check if “System assigned managed identity” is checked.

  10. Switch to the “Review + Create” tab, then click the “Create” button to create the connection.

After these steps, the application will be restarted.

12_use_service_connector.png

Locate and copy the “AZURE_COSMOS_LISTKEYURL” value in the Service connector value. Use this value in the Graph Connections panel in Graphlytic to create the Azure Cosmos DB connection.

image-20240408-043747.png