For the complete documentation index, see llms.txt. This page is also available as Markdown.

GCP Stream deployment

Deploy Stream in GCP using `gcloud infra-manager` with aVectra-provided template and image shared to you from Vectra.

GCP Stream Deployment

Deployment of Stream in GCP utilizes the gcloud command line tool with a template provided by Vectra. The template references a Stream image that is shared by Vectra with the Compute Image User referenced by the project number.

Requirements

  • User with sufficient permissions in GCP who is available to deploy using the template.

    • User will need to be able to create a project or have access to a project they can use.

    • User will need to be able to create VPCs, subnets, firewall rules, and VMs.

  • Access to gcloud command line tool either via GCP SDK or cloud shell.

  • Vectra will provide the following information:

    • Access to Stream image from Vectra (requires GCP project number).

    • Access to the deployment template from Vectra.

SSH Key Pair

An RSA SSH key pair will need to be created, or reuse an existing pair, for Stream to allow an administrator to login to the CLI as the vectra user. These can be generated using any standard tool. Google has some options documented:

The public key will need to be copied for later use during deployment so that it can be assigned to Stream. After Stream is deployed and registered with Vectra, you can login to the Stream CLI via SSH:

  • You may need to make the key readable to you using a command such as:

    • chmod 400 vectra.pem

  • Example login command:

    • ssh -i <private key path> vectra@BrainHostnameOrIP

Later in the deployment process, you will need to provide selfLink for the management network. Instructions for retrieving a selfLink are below.

  • The selfLink can be retrieved from the GCP Console GUI by selecting your VPC network, clicking on EQUIVALENT REST and then copying the selflink:

    • Copy the projects/… portion from the highlighted area (do not include the quote marks).

    • In our example below the selfLink would be:

      • projects/vectra-tme-dev/regions/us-east4/subnetworks/mgt

  • The selfLink can also be retrieved via the GCP CLI using the gcloud compute networks describe command:

  • In our example below the selfLink would be:

    • projects/vectra-tme-dev/global/networks/tme-sensor-mgt

Information to gather before proceeding with Stream deployment via gcloud command line:

  • Infrastructure Manager Service Account – Used by the GCP Infrastructure Manager to create your resources during initial deployment.

    • This service account needs the Cloud Infrastructure Manager Agent and Compute Admin roles.

    • Instructions to create this service account are included in Creating GCP service accounts.

  • Brain IP or Hostname – IP address or hostname of the Brain for Stream to register and pair with.

    • Vectra Stream can pair by IP or hostname. Hostname based pairing may be desirable in some failover scenarios.

  • Registration Token - This token must be copied from the Vectra UI.

    • The token is valid for 24 hours and can be regenerated on-demand.

    • A valid registration token must be presented by Stream in order to pair with the Brain.

    • Instructions to generate a Sensor registration token are shown in Sensor Registration Token.

      • Stream pairs and communicates like a Sensor so “Sensor” language is sometimes used when referring to Stream.

  • Public SSH Key – The public key you created in the above section.

    • You may reuse an existing key if you prefer.

  • Project – The GCP Project ID (not the project name or project number).

    • This can be seen in the GCP console dashboard for your project.

  • Region – The GCP region in which to deploy.

    • e.g. – us-east4

  • Zone – The GCP zone is which to deploy.

    • e.g. – us-east4-a

  • Size – Size of Stream VM to deploy.

    • Options are e2-standard-4 , e2-standard-8 , or e2-standard-16

  • Stream Image – GCP identifier for the Stream image to be used to build the VM.

    • This will be provided by Vectra.

  • Management Subnetwork – selfLink of GCP subnet to provision the management (MGT) interface into.

    • Example: projects/vectra-tme-dev/global/networks/tme-sensor-mgt

Creating Infrastructure Manager Service Account

A service account is required for one part of the Stream deployment process:

  • Infrastructure Manager Service Account – Used by the GCP Infrastructure Manager to create your resources during the initial Stream image deployment.

Resources

Basic Steps

  • After signing into the GCP console, navigate to IAM and Admin → Service Accounts and click + CREATE SERVICE ACCOUNT.

  • Give the account a name and optionally a description and then click CREATE AND CONTINUE.

  • The Infrastructure Manager service account requires the following roles.

    • Cloud Infrastructure Manager Agent

    • Compute Admin

  • Under the Principals with Access tab, grant your user the Service Account User role on the service.

  • Save and make note of the account to use in the deployment CLI command below.

Deploying the Stream Image

  • You will receive a template file from Vectra. Save both to a locally accessible directory from where you will run the gcloud infra-manager deployment command.

  • <VERSION>_example.tf - Save a new copy of this and edit it to customize the deployment for your needs.

  • This template contains instructions and syntax for the deployment command.

  • Below is a sample edited <VERSION>_example.tf file.

    • In this case, the file was called 9.7_example.tf .

  • After editing the <VERSION>_example.tf file you are now ready to deploy the Stream.

  • Perform the deployment using the gcloud infra-manager deployments apply command. Be sure to specify the service account created for Infrastructure Manager.

  • If the deployment fails, you can view the logs by going to Infrastructure Manager in the Google Cloud console, and clicking on the deployment that failed.

The example shown is for a Brain, but this screen looks the same for a Stream deployment
  • For example, this deployment failed because the image was not yet shared with the example customer:

The example shown is for a Brain, but this screen looks the same for a Stream deployment
  • If you have failed deployments for any reason, you can simply delete them by name as in this example:

  • You can list deployments as follows:

    • gcloud infra-manager deployments list -–project <PROJECT> --location <REGION>

  • To see resources created with a deployment, you can click on the Resources tab on the deployment page in the GCP console.

Last updated

Was this helpful?