# Deploying the Brain image

## Deployment Introduction

After validating that you have the information required for deployment (shown below), choose either the [Interactive Deployment](#interactive-deployment) or the [Parameter File-Based Deployment](#parameter-file-based-deployment) option.

{% hint style="warning" %}
**Please Note:**

Both the interactive and parameter file-based deployment options will utilize a `-- aux-tenants` option to specify Vectra’s tenant that houses the image you will deploy in your subscription.

**Do not change this tenant!**
{% endhint %}

The Vectra Brain for Azure is currently available in 2 sizes:

<table data-header-hidden><thead><tr><th width="233.62890625"></th><th width="115.61328125" align="center"></th><th width="91.98046875" align="center"></th><th width="307.44140625"></th></tr></thead><tbody><tr><td><strong>VM Type</strong></td><td align="center"><strong>CPU Cores</strong></td><td align="center"><strong>Memory</strong></td><td><strong>Approximate Throughput</strong></td></tr><tr><td>Standard_E32s_v3 (Default)</td><td align="center">32</td><td align="center">256</td><td>~ 15 Gbps, up to 150,000 IPs monitored, 100 sensors</td></tr><tr><td>Standard_E16s_v3</td><td align="center">16</td><td align="center">128</td><td>~ 5 Gbps, up to 50,000 IPs monitored, 25 sensors</td></tr></tbody></table>

Vectra strives to make the Brain image available in the Azure regions needed by our customers. In some situations, Azure does not have these image types available in certain regions. When requesting the image from Vectra, work with your account team to ensure the region you wish to deploy in is supported. If you encounter Azure quota restrictions in a supported region, please see the following links for information regarding quota increase requests:

* <https://docs.microsoft.com/en-us/azure/azure-portal/supportability/per-vm-quota-requests>
* <https://docs.microsoft.com/en-us/azure/azure-portal/supportability/regional-quota-requests>

The Azure CLI `az deployment group create` command will be used for deployment. Additional information about deploying via the Azure CLI and that specific command is available here:

* <https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deploy-cli>
* <https://docs.microsoft.com/en-us/cli/azure/deployment/group?view=azure-cli-latest#az_deployment_group_create>

### Information required before proceeding with Brain deployment via Azure CLI

* **Resource group** – Name of the Azure resource group to deploy the Brain virtual machine into.
  * See [Creating a Resource Group](https://docs.vectra.ai/deployment/ndr-virtual-cloud-appliances/introduction-and-requirements#creating-a-resource-group) for more detail.
* **Template URI (template-uri)** – Template URI location as provided by Vectra.
  * Example template URI (always use the current one that Vectra provided you before deployment):
    * `https://cognito-public-deployment-tools.s3.us-west-2.amazonaws.com/AzureBrain/6.16/mainTemplate.json`
* **Base Name (baseName)** – Specifies the base name used for all resources created as part of this deployment.
  * Requirements:
    * May contain only letters (a–z, A–Z), numbers (0–9), and hyphens (-).
    * Must begin and end with a letter or number.
    * Must not contain spaces or the following characters:

      `` ` ~ ! @ # $ % ^ & * ( ) = + _ [ ] { } \ | ; : ' , < > / ? . ``
    * This value is also used as the default GUI login password and should be changed immediately after deployment.
* **Brain Image (brainImage)** – Resource ID for the Vectra Brain image. This will be provided by Vectra.
  * Example Brain Image (always use the current one that Vectra provided you before deployment):
    * `/subscriptions/ac63f844-2350-4db1-9655-35817d1347a8/resourceGroups/vectra-dev-WestUS2/providers/Microsoft.Compute/galleries/Production/images/Cognito-6.16/versions/6.16.0`
* **Provisioning Token (provisionToken)** – Token that will allow the Brain to register with Vectra.
  * This will be provided by Vectra. Example shown below (non functional):
    * `9442fd6d-f582-4e6f-9509-edf85f207589`
  * Please note that provisioning tokens expire after 7 days. Vectra can provide a new one if you don’t have a chance to deploy before the initial token expires.
* **Public SSH Key (sshKey)** – Generate an RSA SSH key pair using any standard tool.
  * Enter the public key in this field.
  * See [Creating an SSH Key Pair](https://docs.vectra.ai/deployment/ndr-virtual-cloud-appliances/introduction-and-requirements#creating-an-ssh-key-pair) above for more detail.
* **Subnet ID (subnetwork)** – Azure ID of the subnet that you will deploy the Brain into.
  * See [Creating a Virtual Network (VNET) and Subnet](https://docs.vectra.ai/deployment/ndr-virtual-cloud-appliances/introduction-and-requirements#creating-a-virtual-network-vnet-and-subnet) above for more detail.

### Optional information for deployment when additional customization of options is desired

If you wish to deploy a Brain size other than the default or to provision without a public IP address, you must use the [Parameter File-Based Deployment](#parameter-file-based-deployment). You will be able to control the following in this method:

* **Creating a Public IP (createPublicAddress) –** Whether or not to assign a public IP address to the instance.
  * This defaults to true when using an interactive deployment.
* **Brain Size (instanceSize) –** Size of the Brain to deploy.
  * This defaults to `Standard_E32s_v3` when using an interactive deployment.
* **Location (location) –** Azure region where the resources are to be deployed.
  * This must be specified when using a parameter file-based deployment but defaults to the resource group location when using an interactive deployment.
* **Subscription** – All resources in an Azure subscription are billed together
  * When running `az account list` from the Azure CLI, if you have multiple subscriptions, one of them will be listed as `"isDefault": true`
  * Deployment will target this subscription unless the `–-subscription Subscription_ID` argument is used when executing the Azure CLI.
  * This can be specified using either the interactive or the parameter file-based deployment method.

## Interactive Deployment

This deployment method can be used when you will deploy the larger (default) `Standard_E16s_v3` size and desire to configure a public IP address. You can either specify the template URI or reference a local copy of the template file.

CLI command syntax using template URI:

```
az deployment group create --resource-group Your_Resource_Group --template-uri Template_URI_Given_By_Vectra --aux-tenants a6cc66bc-f419-45c2-a9c2-8ff4ab685f2d
```

CLI command syntax using locally downloaded template file:

```
az deployment group create --resource-group Your_Resource_Group --template-file Locally_Available_Brain_Template --aux-tenants a6cc66bc-f419-45c2-a9c2-8ff4ab685f2d
```

Example:

```
az deployment group create --resource-group tbilen-test_azure_brain --template-file Brain.json --aux-tenants a6cc66bc-f419-45c2-a9c2-8ff4ab685f2d
Please provide string value for 'baseName' (? for help): BrainTest
Please provide string value for 'brainImage' (? for help): /subscriptions/ac63f844-2350-4db1-9655-35817d1347a8/resourceGroups/vectra-dev-WestUS2/providers/Microsoft.Compute/galleries/Production/images/Cognito-6.10/versions/6.10.0
Please provide string value for 'provisionToken' (? for help): f6e5e488-343e-4d71-b96d-f167fcb3d6c9
Please provide string value for 'sshKey' (? for help): ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDHQMyfVlu/FUFuKMXXVvCTpTPuw/TOkgf3Myfuf/IFu9mnyDCjM9T0wrxjHMrwq3fIIY2PXSfNfHVMcJrJ+uLiaZo8vSGwVEtkOIeA20EXgUaAS7l3KVzztPmT9vs0TPZlj4iYRKA71T/e47H/dccNLM1zrf1F36iiJXBxcX09Xe1qhwCgnpoC8vjJIFSAaczqWShisHXXk2Q9ybsi3Vv3xxfa/SYp2PrBWtbej3XXwmIvAcJlXEbUxf1u14Jgd9JNcdPkdvh6cPfbrqcP6pmxgxNh92Uf8mKID3tnVd32rTl8aXxzd0FtFDN3N6R5/chPHlFF4aXkUJjmySPzCK9HOQTYoJytuJe0BuGS199qaZZ+xKzSsVAnPwiGmkHDWRozveWRU5aYKEfMUla1kHelTQvdriGJ/MtnFOUEZZS8VJYxNKoLAS2HJ8RXZosIugHqlD3D4HQWp/igu87vUJndMB0/rDDYUzN+SAmC74AmA1njaufg0TpvXLuUml2yl8E= generated-by-azure
Please provide string value for 'subnetwork' (? for help): /subscriptions/b3fe75ab-94a2-4322-84af-016eb01ff43e/resourceGroups/tbilen-test_azure_brain/providers/Microsoft.Network/virtualNetworks/tbilen_brain_test/subnets/tbilen_test
```

## Parameter File-Based Deployment

This deployment method can be used when you need to customize the VM size deployed or choose to not configure a public IP address. This method MUST use a locally available parameter file that will be passed as an argument to the CLI command.

Syntax for the parameter file (use any filename you wish):

```
{
    "baseName": {
        "value": "VALUE"
    },
    "brainImage": {
        "value": "VALUE"
    },
    "createPublicAddress": {
         "value": "true/false"
    },
    "instanceSize": {
        "value": "Standard_E16s_v3/Standard_E32s_v3"    
    },
    "location": {
        "value": "VALUE"
    },
    "provisionToken": {
        "value": "VALUE"
    },
    "sshKey": {
        "value": "VALUE"    
    },
    "sshKeyUser": {
        "value": "vectra"
    },
    "subnetwork": {
        "value": "VALUE"
    }
}
```

Example populated file:

```
{
    "baseName": {
        "value": "TMEBrain08102021"
    },
    "brainImage": {
        "value": "/subscriptions/ac63f844-2350-4db1-9655-35817d1347a8/resourceGroups/vectra-dev-WestUS2/providers/Microsoft.Compute/galleries/Production/images/Cognito-6.10/versions/6.10.0"
    },
    "createPublicAddress": {
         "value": "true"
    },
    "instanceSize": {
        "value": "Standard_E16s_v3"    
    },
    "location": {
        "value": "eastus"
    },
    "provisionToken": {
        "value": "d329fa9a-200b-41c5-8307-6eb1c99da8a1"
    },
    "sshKey": {
        "value": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDnhsku8A/HNN4S53D3QBcHcgeEvDcRVnHQjaf9FFih9ZH+k3LoB0IpuP6Gt47k/CSvJN6DpvhbQSwkm7ZfJNgNPyiDYFGwIeRI5dIr5jk+nEXJvXHd+8WqCfd/cWjwPaLjUUzUZ+lnJxcNG09BxQ+snjTlYDpmq89Vpq1xPKAEuTaUpxnbAeZr+JIRJKOsp2PH9lnCAo0Pz3VIRFexvm4JqzqjyXpYZLZp8PXCZDeK2K7DSM8gG+RQiTJX/D9eathGaQ67Z2K5oQwF0BkXwYtv5PXdGvfRwYjRdHJVL4SsvnVPcxh7t3xIag6qX4X0WILmVPO3tyxAAhLZCDQ49hO8RqFQZc0vGM4LtRJNvjlpPLJJXEh224aMm/MzqKbnVJgwMdAx9fbIbmPG5mgKn5rzLsKJZSKo8qoiUM6LwApuWbZUo7VZaCP/Rm8pvj0YqXObx9uKUsj3c5PuuthmFnQbS8NgOzlOlt9dllcBw658Iu9bbFiHrNXP2uz0vkOEciE= generated-by-azure"    
    },
    "sshKeyUser": {
        "value": "vectra"
    },
    "subnetwork": {
        "value": "/subscriptions/b3fe75ab-94a2-4322-84af-016eb01ff43e/resourceGroups/TME_Cognito_Test/providers/Microsoft.Network/virtualNetworks/Platform_Network/subnets/Platform_Subnet"
    }
}
```

CLI command syntax for parameter file-based deployment:

```
az deployment group create --resource-group RESOURCE_GROUP --template-uri Template_URI_Given_By_Vectra --aux-tenants a6cc66bc-f419-45c2-a9c2-8ff4ab685f2d --parameters File_Containing_Parameters
```

Example of a successful command string using this deployment type:

```
az deployment group create --resource-group TME_Cognito_Test --template-file Brain.json --aux-tenants a6cc66bc-f419-45c2-a9c2-8ff4ab685f2d --parameters myparameters.json --debug
```

The above example also used a `--debug` switch that instructs the Azure CLI to output much more information during execution. This may be useful in troubleshooting.

## Completing the Brain Deployment

It can take 5-10 minutes for Azure to complete the initial deployment. Both the interactive and the parameter file-based deployment will output some information at the CLI after completion that details the various resources that have been created. You may wish to save this information for later reference.

Once the deployment is complete at the CLI, you can now monitor the rest of the deployment using your web browser. Browsing to the public IP, if assigned during deployment, will be blocked initially. You can also connect to the private IP that was assigned if you have private connectivity in place. In the resource group that you deployed in, modify the inbound security group to allow HTTPS (TCP/443) and SSH (TCP/22) inbound from where you will connect to the Brain from.

Once you bypass a warning for the self-signed certificate that is created by default on the Brain, you will be presented with information relaying the status of the Brain’s progress as it continues through the deployment process. It will proceed through the following stages:

* Authenticating and verifying the file system of the virtual Brain appliance.
* Rebooting.
* Decryption of the file system.
* Connecting to the Vectra provisioning server and provisioning.

Example screenshots:

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-7e266f01600b54ee829b953aa5218992f1b51316%2Faws-brain-deployment-guide-5.png?alt=media) ![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-7b476df83f916ec012b92536bffb8ab54f912093%2Faws-brain-deployment-guide-6.png?alt=media)

If a proxy is required to access Vectra in your Azure environment, this can be configured during this time by clicking on the **Set Proxy Configuration** link on any of these status screens.

{% hint style="info" %}
**Please Note:**

* This proxy configuration screen is only used to communicate with Vectra’s provisioning server and must utilize an HTTPS proxy. HTTP only proxies are not supported for this use.
* Other proxy configuration in the main Vectra UI after deployment accepts HTTP proxies and is used by non-provisioning related services and integrations.
  * *Configuration* → COVERAGE → Data Sources > Network > Brain Setup > Proxy & Status
    {% endhint %}

{% hint style="info" %}
**Please Note:**

If you are doing a Respond UX deployment and require a proxy for non-provisioning related services and integrations (this includes linking to Vectra’s cloud for use with the Respond UX), you should configure that proxy at the CLI of your Brain AFTER you progress through this initial configuration and get to the **Success!** message at the end of this section. Please see the [Respond UX Deployment Guide](https://docs.vectra.ai/deployment/getting-started/respond-ux-deployment-guide) in the [*Deployment > Proxy Support*](https://docs.vectra.ai/getting-started/respond-ux-deployment-guide/deployment#proxy-support) section for more detail.
{% endhint %}

Once complete, you will see the following:

![](https://4227135129-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHJ1ltuWFvsArFWtevnRn%2Fuploads%2Fgit-blob-2e0831371c7116bf9dcd5fde4d73ad0623626ec2%2Faws-brain-deployment-guide-7.png?alt=media)

Clicking on the blue **Login** button will take you to the login page of the Brain (Quadrant UX). If you are doing a Respond UX deployment, you should **NOT** login to the local GUI (which is the Quadrant UX) before linking your Brain with Vectra. Once linked with Vectra per the [Respond UX Deployment Guide](https://docs.vectra.ai/deployment/getting-started/respond-ux-deployment-guide), your Brain will no longer show a Quadrant UX login screen when you browse to its IP or hostname and it will instead show a page the instructs you to login to the Respond UX in Vectra’s cloud or a status page.

{% hint style="warning" %}
**Please Note:**

The Brain may require several updates to become current with Vectra’s latest generally available version.

* Please do not power off the Brain during the initial Azure deployment prior to login or during the updating process as the Brain becomes current.
* If powered off during initial deployment the Brain may become unresponsive and require redeployment.
* During this time the UI may become unresponsive, or you may be disconnected but it is safe to configure platform settings.
* Periodically, the Brain image is updated and when deploying a new Brain, always check with Vectra for the latest base image available for your deployment.
  {% endhint %}

### Default login credentials

The default credentials to login to the Vectra Brain GUI (Quadrant UX only) over HTTPs in Azure are

* Username: `admin`
* Password: Virtual Machine Name (visible in Azure after deployment)

Logging in at the CLI can be done via SSH using the private key corresponding to the public key that was assigned to this stack and the `vectra` username. Login to the CLI is supported for both Quadrant UX and Respond UX deployment types. Please see [SSH login process for CLI](https://docs.vectra.ai/deployment/appliance-operations/ssh-login-process-for-cli) for more details.

Please ensure Security Groups are updated to allow CLI and GUI access as per earlier guidance.

### Public IP Address Options

Vectra can create a **Basic SKU** dynamically assigned public IP address during deployment if the user chooses to do so. That IP will remain consistent through any reboots but can change when a virtual machine is stopped (deallocated), then started again. If you wish to change this to a static assignment, please do the following:

* **Dissociate** the assigned public IP from the NIC of the Brain.
* **Modify** the configuration of the IP to static assignment.
* **Associate** the IP with the NIC of the Brain.
  * This will very likely be a new IP that is different from the last assignment.

You may also wish to upgrade the Basic SKU to a Standard SKU public IP address. Some links from Microsoft explain the differences and give more information about public IPs in general:

* Public IP pricing:
  * <https://azure.microsoft.com/en-us/pricing/details/ip-addresses/>
* Public IP information and difference between Basic and Standard SKUs:
  * <https://docs.microsoft.com/en-us/azure/virtual-network/public-ip-addresses>
* Dissociating a public IP:
  * <https://docs.microsoft.com/en-us/azure/virtual-network/remove-public-ip-address-vm>
* Associating a public IP:
  * <https://docs.microsoft.com/en-us/azure/virtual-network/associate-public-ip-address-vm>

### Resizing the Brain

In some environments, you may wish to start with a smaller Brain instance and then later move to a larger Brain instance to handle additional load (metadata coming from paired sensors or additional paired sensors).

* Please see: [Resizing virtual appliances](https://docs.vectra.ai/deployment/appliance-operations/resizing-virtual-appliances) for details

### Configuring Initial Brain Settings

For more details around initial settings for the Brain after successfully deploying it in Azure, see the [Vectra Respond UX Deployment Guide](https://docs.vectra.ai/deployment/getting-started/respond-ux-deployment-guide) or [Vectra Quadrant UX Deployment Guide](https://docs.vectra.ai/deployment/getting-started/quadrant-ux-deployment) that is available on the Vectra Support portal.
