Overview
This Knowledge Base article provides a step-by-step guide on how to perform mass, non-interactive installations of the Cloudamize Agent across your Google Compute Engine (GCE) fleet using GCP VM Manager (OS Config).
GCP VM Manager allows you to manage software configurations, enforce patch management, and apply desired-state OS policies across large Compute Engine fleets without requiring direct SSH access, external IP addresses, or custom SSH key distribution. By using OS Policy Assignments, administrators can automatically deploy and maintain the Cloudamize inventory agent across Linux and Windows VMs simultaneously.
Note: The GCP VM Manager (OS Config) steps in this article are provided as guidance for using third-party deployment tooling with the Cloudamize Agent. Cloudamize has not validated or tested these GCP deployment workflows end to end. Review and test the process in your own GCP environment before using it for production deployments.
Prerequisites
Before deploying the Cloudamize Agent across your GCP fleet, verify that all target nodes comply with the official Cloudamize Agent Installation Prerequisites and meet the following GCP-specific requirements:
-
Official Cloudamize Prerequisites: Review OS compatibility, system resource requirements, and regional proxy/endpoint settings at the Agent Installation Prerequisites KB.
-
Network & Outbound Access: Target instances must have outbound access on TCP Port 443 directly or via Cloud NAT/Proxy to your assigned Cloudamize regional endpoint:
-
US Region:
am.cloudamize.com -
EU Region:
am-de.cloudamize.com -
UAE Region:
am-ae.cloudamize.com
-
-
OS Config API: The
osconfig.googleapis.comAPI must be enabled in your GCP project. -
OS Config Agent: Target Compute Engine instances must have the
google-osconfig-agentinstalled and running (pre-installed on most standard GCP public images). -
Service Account Permissions: Target VMs must use a service account with permissions to communicate with the OS Config service (
roles/osconfig.agentorroles/editor). -
Console Access: Ensure you have access to your Cloudamize Console to copy your environment-specific installation command and Customer Key.
Step-by-Step Installation Instructions
Step 1: Enable VM Manager & OS Config API
-
Log in to the Google Cloud Console.
-
Navigate to Compute Engine > VM Manager.
-
If prompted, click Enable VM Manager (or enable the OS Config API via Cloud Shell):
#Bash gcloud services enable osconfig.googleapis.com
Step 2: Create the OS Policy Assignment Manifest
Important Note on Region Endpoints & Customer Keys:
The installer URL domain and custkey / customerkey parameters depend on the specific region where your Cloudamize assessment is provisioned (e.g., US, EU, or UAE) and your unique account credentials. Always copy the exact command and key directly from your Cloudamize Console.
Create an OS Policy manifest file (cloudamize-policy.yaml) on your local machine or Cloud Shell matching your target fleet OS:
For Linux Fleet (cloudamize-linux-policy.yaml):
#YAML
# OS Policy Assignment Manifest for Linux VMs
osPolicies:
- id: install-cloudamize-agent-linux
mode: ENFORCE
resourceGroups:
- resources:
- id: cloudamize-agent-script
exec:
validate:
interpreter: SHELL
script: "systemctl is-active --quiet cloudamize-agent"
enforce:
interpreter: SHELL
script: |
#!/bin/bash
sh <(curl 'https://am.cloudamize.com/cxf/downloadFileV3?custkey=<YOUR_CUSTOMER_KEY>&filename=installCloudamizeAgentV2.sh' -L)
instanceFilter:
# Target VMs with matching labels (e.g., env=production)
inclusionLabels:
- labels:
env: production
# Set allToTrue: true instead of inclusionLabels if you wish to target ALL VMs in the zone
# allToTrue: true
(Replace am.cloudamize.com with your regional endpoint domain if using EU or UAE, and replace YOUR_CUSTOMER_KEY with your actual Customer Key).
For Windows Fleet (cloudamize-windows-policy.yaml):
#YAM
# OS Policy Assignment Manifest for Windows VMs
osPolicies:
- id: install-cloudamize-agent-windows
mode: ENFORCE
resourceGroups:
- resources:
- id: cloudamize-agent-msi
exec:
validate:
interpreter: POWERSHELL
script: "if (Get-Service 'Cloudamize Agent Service' -ErrorAction SilentlyContinue) { exit 0 } else { exit 1 }"
enforce:
interpreter: POWERSHELL
script: |
$msiPath = "$env:TEMP\cloudamizeAgent.msi"
Invoke-WebRequest -Uri "https://am.cloudamize.com/cxf/downloadFileV3?custkey=<YOUR_CUSTOMER_KEY>&filename=cloudamizeAgent.msi" -OutFile $msiPath
Start-Process msiexec.exe -ArgumentList "/i `"$msiPath`" customerkey=<YOUR_CUSTOMER_KEY> /qn" -Wait
instanceFilter:
# Target VMs with matching labels (e.g., env=production)
inclusionLabels:
- labels:
env: production
# Set allToTrue: true instead of inclusionLabels if you wish to target ALL VMs in the zone
# allToTrue: true
(Replace am.cloudamize.com with your regional endpoint domain if using EU or UAE, and replace YOUR_CUSTOMER_KEY with your actual Customer Key).
Step 3: Deploy OS Policy Assignment Across Your Fleet
Deploy the assignment manifest using the gcloud CLI. The targeting rules defined under instanceFilter in your YAML file will automatically determine which instances receive the Cloudamize Agent:
#Bash
gcloud compute os-config os-policy-assignments create cloudamize-agent-deployment \
--location="us-central1-a" \
--file="cloudamize-linux-policy.yaml" \
--async
Verification & Monitoring
Once the OS Policy Assignment is applied, GCP automatically monitors and enforces the installation state:
-
In the GCP Console, navigate to Compute Engine > VM Manager > OS Policies.
-
Select cloudamize-agent-deployment to view compliance reporting across your instances (
Compliantvs.Non-compliant). -
You can also generate an assignment compliance report via Cloud Shell:
Bashgcloud compute os-config os-policy-assignment-reports list --location="us-central1-a" -
Verify agent services directly on target nodes:
-
Linux: Run
systemctl status cloudamize-agent -
Windows: Check services for
Cloudamize Agent Service
-
-
Log in to the Cloudamize Console and confirm that the newly registered instances appear in your node list.
If you have any queries, please get in touch with the helpdesk via our Helpdesk Portal or by email at helpdesk@cloudamize.com.