How to Install in an Azure Container Instance

Pre-requisites

Before installing an agent on an Azure Container Instance, you will need access to Azure CLI in order to run the container provisioning command. You can either make use of an Azure Cloud Shell, or install the Azure CLI on your computer. For the purposes of this installation guide we will use an locally installed Azure CLI, however the same commands can be run in an Azure Cloud Shell.

You can find documentation on how to install the Azure CLI, along with the installer here - Azure CLI Setup.

You will also need an Azure Subscription and a Resource Group to host the agent.

Installing the Agent

Follow along with the below instructions to install and configure the Loome Agent on an Azure Container Instance.

Complete the Agent configuration wizard

On the agent slide-out you will need to complete a few pieces of information to get started.

Provide an Agent Name for your Agent, this should be lowercase alpha-numeric, and can include hyphens.

Agent name

You can then provide the name of an existing Resource Group in your Azure Subscription. If you don’t yet have one, go to portal.azure.com and create a new Resource Group.

Resource group name

Then select your Resource Location. It will determine what Azure Region the container is created in.

Resource Location

Once you’ve completed these steps, use the copy button next to the Azure CLI command to put the command in to your clipboard.

You can also use the Azure RM command if you have Azure RM installed.

Copy scripts

Using Azure CLI to create the Agent

Open a command prompt from your machine. If you are not logged in to Azure CLI, you can type in az login and hit enter.

Azure CLI Login

This process will open a browser and ask you to log in to Azure with your Microsoft credentials. This will then authorize your Azure CLI session.

Once complete you can close the browser and return to the command prompt window.

Azure CLI Login Completed

Now paste the Azure CLI command that you copied earlier from the Agent slide-out in to the command prompt window. You can tab back to the window and copy the command again if need be.

Press enter to start configuration of the Agent.

You should now see a message that the configuration is in progress. This may take several minutes to complete.

Azure CLI Running Command

Once completed, you will see a JSON output of the configuration. You do not need to do anything with this output and can discard the Command Prompt window.

Completing additional configuration in the Azure Portal

Before we can use the Agent, we need to complete additional configuration on the Azure Container Instance containing the Agent.

We will configure the Agent with a Managed System Identity, and then provide it permissions to provision and manage resources within the Subscription.

Browse to portal.azure.com and locate the Resource Group where you provisioned the Container Instance and then click on it.

Azure Portal Open Container Instance

Locate the Identity menu option and click on it.

Azure Portal Agent

Under the System Assigned (preview) tab, click the On toggle for the Status.

Click the Save button above.

Azure Portal Agent Identity

When prompted, click Yes to the confirmation.

Azure Portal Agent Identity Confirm

Now click on the Azure Role Assignments button.

Azure Portal Agent Identity Confirmed

Click the Add Role Assignment (preview) button to add a new Role Assignment.

Azure Portal Agent Identity No Roles

Select Subscription for the Scope, Select your Subscription, and then select Contributor for the Role.

Click Save to add this Role Assignment.

Azure Portal Agent Identity Assign Role

Repeat this step until you have all of the Roles in the below table assigned.

Scope Subscription Role
Subscription Your Subscription Contributor
Subscription Your Subscription User Access Administrator
Subscription Your Subscription Resource Policy Contributor

Your Role Assignments should look like this once completed.

Click on the Agent name near the top left of the screen.

Azure Portal Agent Identity Assign Role Completed

Now let’s restart the Container Instance so the Agent can connect to Loome Assist.

Click on the Restart button near the top, and click Yes to the confirmation message.

Azure Portal Restart Agent

Now click on Container on the left hand menu, and confirm the status of the container is Running.

Azure Portal Check Status

You should now be able to go back to the Loome Assist Agent page and confirm that the Agent is connected.

The Agent will display a green status if everything has been configured successfully.

Loome Assist Agent Status

Additional Agent Configuration

You can optionally configure additional agent settings based on your needs.