You can deploy Unified Access Gateway to Compute Engine by using the uagdeploygce.ps1 PowerShell command. This command takes all configuration settings from an .ini file and deploys an instance of Unified Access Gateway.
If any existing instance in the Compute Engine has the same name as specified in the General section of the .ini file, the PowerShell script removes the existing instance during deployment and creates a new Unified Access Gateway instance with the same name. This replacement helps while upgrading a Unified Access Gateway appliance or to redeploy the appliance with updated settings.
Procedure
-
From the Downloads page for Unified Access Gateway, download the following PowerShell scripts,
uagdeploygce.ps1anduagdeploy.psm1on your Windows machine. -
Start a PowerShell command window and change the directory to the folder that contains the downloaded scripts.
-
To deploy Unified Access Gateway to the Compute Engine, perform the following:
-
If you are upgrading to a later version of Unified Access Gateway, edit the
.inifile to update theimageNamesetting to the new image name which is uploaded to the Compute Engine in one of the previous tasks.All other configuration parameters in the
.inifile must remain the same. -
Run the following command depending on whether you choose the interactive or non-interactive mode:
If you run theMode Command Interactive
<ini-filename> is the name of the.\uagdeploygce.ps1 <ini-filename>.ini.inifile prepared in the earlier tasks. For example:.\uagdeploygce.ps1 uag1.iniuag1.iniis the filename used in the earlier tasks.Non-Interactive .\uagdeploygce.ps1 <ini-filename> <root-pwd> <admin-pwd> <ceip-yes-no>.\uagdeploygce.ps1 <ini-filename> secretyes - <ini-filename> is the name of the
.inifile prepared in the earlier tasks. - If passwords are specified on the command line as shown in the command, use the
Clear-HistoryPowerShell command after deploying the Unified Access Gateway.
uagdeploygce.ps1command again, the previous Unified Access Gateway instance and associated resources are deleted and replaced with a new instance having the same name. The new.inifile must have all the required configuration parameters so that the Unified Access Gateway appliance is ready for production on first boot.What to do next
After Unified Access Gateway is deployed to Compute Engine and all settings are applied, the metadata used to apply the Unified Access Gateway appliance's configuration settings in Google Cloud must be removed. To remove the metadata, use the following commands as shown in the example:
$uagName=uag1 $zone=us-central1-a $projectId=my-project gcloud compute instances remove-metadata $uagName --zone=$zone --project $projectId --keys "user-data" - <ini-filename> is the name of the
-
Was this page helpful?