Deploy using Google Compute Engines

The deployment options vary depending on what are the number of instances where MetaDefender ICAP Server will be installed.

Options:

  1. Single Instance deployment of MetaDefender Core and MetaDefender ICAP Server

  2. Multi-Instances with Autoscaling for MetaDefender Core and MetaDefender ICAP Server.

OPSWAT provides a terraform project as example to deploy MetaDefender ICAP Server and MetaDefender Core in different instances using Google services.

Prerequisites and Requirements

Google knowledge: This guide assumes familiarity with Google Services

Google project: needs permission to create Google Services represented in diagrams in Architecture Examples in CSPs for Google

Tools installation: Terraform

Single Instance Deployment

For a single deployment of MetaDefender Core in Google you can use this example to test this deployment type, besides the MetaDefender VM instance, additional resources are being generated and set up.

Deploy using Terraform

OPSWAT provides a terraform project to create the infrastructure needed to deploy

  • Locally clone the metadefender-csp repository and go to GCP/single-vm-deployment

git clone git@github.com:OPSWAT/metadefender-csp.git
cd GCP/single-instance

Modify terraform.tfvars with the desired options

  • LICENSE__KEY_CORE_ required if wanted to have the MetaDefender Core instance activated automatically

  • APIKEY_GENERATION=true to have the apikey generated by terraform

  • There is one general section and one section for each product that is supported using this Terraform project

# General variables

MD_ENV_NAME = "metadefender-test-csp" # Prefix to add to all the resources
MD_REGION = "us-central1" # REGION for all the resources
PROJECT_ID = "metadefender-k8s" # GCP Project ID
#GOOGLE_APPLICATION_CREDENTIALS = "" # To give access to terraform (Optional, can use other ways to authenticate)
MD_VPC_CIDR = "192.168.0.0/16" # VPC CIDR where to create the MetaDefender products
PUBLIC_ENVIRONMENT = true # true for public deployment, false for private deployment

# MetaDefender Core variables

DEPLOY_CORE = true
CORE_IMAGE_PROJECT = "mpi-opswat-public" # GCP Project ID containing the MDSS image
CORE_IMAGE_NAME = "metadefender-core-debian-5-16-0-20251001-054226" # Specific image name for MetaDefender Core. Windows image is "metadefender-core-windows-5-16-0-20251001-054247"
  • Run terraform init and apply. Check the resource to be created, after that enter "y"

terraform init
terraform apply

Managed Instance Group Deployment

Deploy using Terraform

OPSWAT provides a terraform project to create the infrastructure needed to deploy

  • Locally clone the metadefender-csp repository and go to GCP/single-vm-deployment

git clone git@github.com:OPSWAT/metadefender-csp.git
cd GCP/managed-instance-group-deployment

Modify terraform.tfvars with the desired options

  • LICENSE__KEY_CORE_ required if wanted to have the MetaDefender Core instance activated automatically

  • APIKEY_GENERATION=true to have the apikey generated by terraform

  • There is one general section and one section for each product that is supported using this Terraform project

# General variables

MD_ENV_NAME = "metadefender-test-csp" # Prefix to add to all the resources
MD_REGION = "us-central1" # REGION for all the resources
PROJECT_ID = "metadefender-k8s" # GCP Project ID
#GOOGLE_APPLICATION_CREDENTIALS = "" # To give access to terraform (Optional, can use other ways to authenticate)
MD_VPC_CIDR = "192.168.0.0/16" # VPC CIDR where to create the MetaDefender products
PUBLIC_ENVIRONMENT = true # true for public deployment, false for private deployment

# MetaDefender Core variables

DEPLOY_CORE = true
CORE_IMAGE_PROJECT = "mpi-opswat-public" # GCP Project ID containing the MDSS image
CORE_IMAGE_NAME = "metadefender-core-debian-5-16-0-20251001-054226" # Specific image name for MetaDefender Core. Windows image is "metadefender-core-windows-5-16-0-20251001-054247"
  • Run terraform init and apply. Check the resource to be created, after that enter "y"

terraform init
terraform apply