Version:

Version:


Table of Contents

GCP Administration Guide

Download PDF
Copy Link

Using the Google Cloud SDK to deploy FortiGate-VM

The following example assumes that the Google Cloud SDK is installed on a Linux machine.

To use the Google Cloud SDK to deploy FortiGate-VM:
  1. Log into your GCP environment: $sudo gcloud auth login
  2. Select your Google Cloud account and enter your credentials. Then, the default project is specified.
  3. In Compute Engine, go to Disks and create a blank disk for the FortiGate-VM log disk. You attach this disk to the FortiGate at the time of deployment.

    You can also create a disk using Google Cloud. To create a disk, run the following command:

    gcloud compute --project="project name" disks create "your disk name" --zone="your zone" --type="your disk type" --size="your disk size"

    For example, if used with the example in the screenshot, the command looks as follows:

    sudo gcloud compute --project="project name" disks create cloudinit1 --zone=us-west1-a --type=pd-ssd --size=30GB

  4. The command to deploy a FortiGate-VM requires the following values. Check the following for your GCP environment:
    1. VM name: desired VM name.
    2. network name1: name for the public-facing network.
    3. subnet name1: subnet name for the public-facing network.
    4. network name2: name for the internal protected network.
    5. subnet name2: Internet network subnet name.
    6. no-address does not allocate an ephemeral/external IP address on the interface.
    7. project name: project where you deploy the VM instance. You must have access to the project.
    8. image name: FortiGate image where you deploy the VM from. For details on how to obtain this image, see Obtaining the deployment image.
    9. --can-ip-forward: specify for IP Forwarding=ON.
    10. machine type: enter the machine type, such as n1-highcpu-2.
    11. zone name: enter the zone name, such as us-west-1a. This is a zone within a region.
    12. disk name: blank disk name for the second disk. FortiGate-VM requires an additional disk for logging.
    13. device name: device name.
  5. The command to deploy a FortiGate-VM is as follows. This example creates a VM with two network interfaces:

    $gcloud compute instances create <VM name> --network-interface network=<network name1>,subnet=<subnet name1> --network-interface network=<network name2>,subnet=<subnet name2>,no-address --project <project name> --image <image name> --can-ip-forward --machine-type

    This example runs the following command to create the FortiGate-VM instance with name fgt603cloudinit:

    $sudo gcloud compute instances create fgt603cloudinit --network-interface network=001,subnet=publicfacing1 --network-interface network=002,subnet=privfacing4 --project “project name” --image -fgt-603-10162018-001 --can-ip-forward --machine-type n1-highcpu-2” --zone us-west1-a --disk=name=cloudinit1,device-name=devicecloudinit1,mode=rw,boot=no

  6. Go to the Google Cloud Compute Engine and find the new VM instance.

  7. Connect to the FortiGate-VM instance. See Connecting to the FortiGate-VM.

Using the Google Cloud SDK to deploy FortiGate-VM

The following example assumes that the Google Cloud SDK is installed on a Linux machine.

To use the Google Cloud SDK to deploy FortiGate-VM:
  1. Log into your GCP environment: $sudo gcloud auth login
  2. Select your Google Cloud account and enter your credentials. Then, the default project is specified.
  3. In Compute Engine, go to Disks and create a blank disk for the FortiGate-VM log disk. You attach this disk to the FortiGate at the time of deployment.

    You can also create a disk using Google Cloud. To create a disk, run the following command:

    gcloud compute --project="project name" disks create "your disk name" --zone="your zone" --type="your disk type" --size="your disk size"

    For example, if used with the example in the screenshot, the command looks as follows:

    sudo gcloud compute --project="project name" disks create cloudinit1 --zone=us-west1-a --type=pd-ssd --size=30GB

  4. The command to deploy a FortiGate-VM requires the following values. Check the following for your GCP environment:
    1. VM name: desired VM name.
    2. network name1: name for the public-facing network.
    3. subnet name1: subnet name for the public-facing network.
    4. network name2: name for the internal protected network.
    5. subnet name2: Internet network subnet name.
    6. no-address does not allocate an ephemeral/external IP address on the interface.
    7. project name: project where you deploy the VM instance. You must have access to the project.
    8. image name: FortiGate image where you deploy the VM from. For details on how to obtain this image, see Obtaining the deployment image.
    9. --can-ip-forward: specify for IP Forwarding=ON.
    10. machine type: enter the machine type, such as n1-highcpu-2.
    11. zone name: enter the zone name, such as us-west-1a. This is a zone within a region.
    12. disk name: blank disk name for the second disk. FortiGate-VM requires an additional disk for logging.
    13. device name: device name.
  5. The command to deploy a FortiGate-VM is as follows. This example creates a VM with two network interfaces:

    $gcloud compute instances create <VM name> --network-interface network=<network name1>,subnet=<subnet name1> --network-interface network=<network name2>,subnet=<subnet name2>,no-address --project <project name> --image <image name> --can-ip-forward --machine-type

    This example runs the following command to create the FortiGate-VM instance with name fgt603cloudinit:

    $sudo gcloud compute instances create fgt603cloudinit --network-interface network=001,subnet=publicfacing1 --network-interface network=002,subnet=privfacing4 --project “project name” --image -fgt-603-10162018-001 --can-ip-forward --machine-type n1-highcpu-2” --zone us-west1-a --disk=name=cloudinit1,device-name=devicecloudinit1,mode=rw,boot=no

  6. Go to the Google Cloud Compute Engine and find the new VM instance.

  7. Connect to the FortiGate-VM instance. See Connecting to the FortiGate-VM.