View on GitHub

bacc

Batch Accelerator

Deploying Secured-Batch

Secured-Batch models a reference architecture for a secured deployment of resources for use with Azure Batch. The primary target for such a deployment is FSIs (Financial Services Institutions) that have strict security requirements. Of course, this configuration can be a starting point for any deployment that requires a secure deployment.

For this tutorial, we will use configuration files from examples/secured-batch folder. The deployment.bicep is the entry point for this deployment and config.jonc is the configuration file that contains all the resource configuration parameters for this deployment.

The deployment deploys a hub using the connectivity.bicep template from the bacc-connectivity repository. The hub is deployed in a separate resource group. The hub contains a firewall and a virtual network gateway. The firewall is used to route all traffic from the compute nodes through a single point of egress. The virtual network gateway is used to connect the hub to the spoke network. The spoke network is deployed using the deployment.bicep template from the bacc repository. The spoke network contains a virtual network and a batch account.

Design Considerations

Step 1: Prerequisites and environment setup

Follow the environment setup instructions to set up your environment. Since this tutorial uses User Subscription pool allocation mode, make sure you follow the extra requirements and steps described in that document for the same.

Step 2: Deploy hub, spoke, and other resources

For this step, you have two options. You can use Azure CLI to deploy the resources using the bicep template provided. Or you can simply click the following link to deploy using Azure Portal.

Deploy to Azure

To deploy using the CLI, use the following steps:

#!/bin/bash
cd .../bacc-connectivity

AZ_LOCATION=eastsus2
AZ_DEPLOYMENT_NAME=azfinsim-sb
AZ_RESOURCE_GROUP=azfinsim-sb
BATCH_SERVICE_OBJECT_ID= ....  # should be set to the id obtained in prerequisites step

az deployment sub create                                    \
    --location $AZ_LOCATION                                 \
    --name $AZ_DEPLOYMENT_NAME                              \
    --template-file examples/secured-batch/deployment.bicep \
    --parameters                                            \
      resourceGroupName=$AZ_RESOURCE_GROUP_NAME             \
      batchServiceObjectId=$BATCH_SERVICE_OBJECT_ID

# >> ENTER PASSWORD:
#    the deployment will prompt for a password to use for jumpboxes, enter a string that
#    containers uppercase and lowercase letters, numbers.

On success, a new resource with the specified name will be created with all the resources deployed by this deployment. Another resource group will be created with all resources that form the hub. The name of this resource group can be obtained from the output of the deployment as follows:

#!/bin/bash

az deployment sub show \
  --name $AZ_DEPLOYMENT_NAME \
  --query properties.outputs.hubResourceGroupName.value

Step 3: Connect to Windows Jumpbox

Once the deployment is complete, you can connect to the Windows jumpbox using Azure Bastion. Locate the Windows jumpbox under the resource group created in the hub deployment. Click on the Connect button and follow the instructions to connect to the jumpbox using Bastion. The username, by default, is set to localadmin and the password is the password you provided during the hub deployment.

Step 4: Connect to Linux Jumpbox

Once the deployment is complete, you can connect to the Linux jumpbox using Azure Bastion. Locate the Linux jumpbox under the resource group created in the hub deployment. Click on the Connect button and follow the instructions to connect to the jumpbox using Bastion. The username, by default, is set to localadmin and the password is the password you provided during the hub deployment.

Step 5: Setup CLI and submit jobs

Once connected to the Linux Jumpbox, you can now run the demo from there. The steps are same as the With Containers tutorial. Simply follow the steps after the deployment step i.e. Step 3: Install CLI onwards. The only differences being the following: