Creating a VM Instance of the Uploaded GCP Image Using a Script/Template

This section describes how to automatically create a virtual machine instance of the ICS Gateway image inside Google Cloud Platform using a script/template. You can also perform this process manually, see Creating a VM Instance of the Uploaded GCP Image Manually.

Ivanti provides YAML-based templates to create an instance of the ICS Gateway image in the following configurations:

Two network interfaces in an existing VPC.

Three network interfaces in an existing VPC.

Download:

https://pulsezta.blob.core.windows.net/gateway/nsa/templates/GCP/21-12-145/ivanti-ics-2-nics-existing-vpc.zip

https://pulsezta.blob.core.windows.net/gateway/nsa/templates/GCP/21-12-145/ivanti-ics-3-nics-existing-vpc.zip

Two network interfaces in a new VPC.

Three network interfaces in a new VPC.

Download:

https://pulsezta.blob.core.windows.net/gateway/nsa/templates/GCP/21-12-145/ivanti-ics-2-nics-new-vpc.zip

https://pulsezta.blob.core.windows.net/gateway/nsa/templates/GCP/21-12-145/ivanti-ics-3-nics-new-vpc.zip

To use a template:

1.Download the required template archive file to your local workstation.

2.Unpack the downloaded archive file to a location that is accessible from Google Cloud Platform. Each archive contains three files. These files should be present in one respective directory. For example, for the three-interface (existing VPC) version of the archive:

ivanti-ics-2-nics-existing-vpc.jinja

ivanti-ics-2-nics-existing-vpc.scheme

ivanti-ics-2-nics-existing-vpc.yaml

3.Edit the YAML file properties section to reflect your project and instance requirements, including the user_data property.

An example of an existing VPC YAML file is provided here:

imports:

- path: ivanti-ics-3-nics-existing-vpc.jinja

resources:

- name: my-vm

properties:

project: ics-project

email: [email protected]

machinetype: n2-standard-4

region: asia-south1

zone: asia-south1-b

image: icsgcp123

int_network: vpc-network-private-abcdef

ext_network: vpc-network-public-abcdef

mgmt_network: vpc-network-mgmt-abcdef

int_subnetwork: vpc-asia-south1-b-ics-int-port

ext_subnetwork: vpc-asia-south1-b-ics-ext-port

mgmt_subnetwork: vpc-asia-south1-b-ics-mgmt-port

user_data: <pulse-config><primary-dns>8.8.8.8<\primary-dns> ...

type: ivanti-ics-3-nics-existing-vpc.jinja

The following table lists all possible template properties and their meaning:

Property

Description

project

Name of the Project

email

Registered service account email address

region

The name of the region in which you want to deploy your VM instance

zone

The name of the zone in which you want to deploy your VM instance

image

Virtual machine image name

machine_type

N2-standard machine type

int_network

VPC network name for internal network

ext_network

VPC network name for external network

mgmt_network

VPC network name for management network

int_subnetwork

Subnet name for internal VPC

ext_subnetwork

Subnet name for external VPC

mgmt_subnetwork

Subnet name for management VPC

user_data

The Gateway config file downloaded.

In User data, <networkConnection>v4</networkConnection> parameter can be configured as follows:

v4 : IPv4 addresses are allowed to configured (Default).

v6 : IPv6 addresses are allowed to configured.

Both: IPv4 and IPv6 addresses are allowed to configured.

4. Save the YAML file.

5.On the Google Cloud Platform, start a command line session from the title bar. For example:

A command line session starts.

6.Within the project folder, change to deploymentmanager folder.

7.Create a new folder and change to the new folder and copy the three script files to this folder.

8. Select the required project:

gcloud config set project <project-name>

9.Deploy the VM using the following command:

gcloud deployment-manager deployments create <vm-name> --config <yaml_file>

For example:

gcloud deployment-manager deployments create vm-gcp-123 --config ivanti-ics-3-nics-existing-vpc.yaml

10.Wait until the command completes.

11.On the VM Instances page, click on the new VM in the list of VM instances.

The VM instance details page appears for the instance.