Deploy Qualys Cloud Agent via Other Tool Sets
Qualys Cloud Agent can be deployed via automation, orchestration or configuration management tools in your environment, such as Ansible, Chef, and Puppet. Qualys provides a template for deploying Qualys Cloud Agent via Ansible. Customers can use this to deploy and configure Qualys Cloud Agent in their Azure environment.
Ansible
This section helps you to deploy Qualys Cloud Agent using Ansible Playbook.
The playbook InstallQCA.yml can be used to deploy Qualys Cloud Agent across the assets included in your host file. Additionally, you can use the tags to deploy Qualys Cloud Agent on your virtual machines. Refer Cloud Agent Ansible for github example.
The required input parameters are:
- private-key = private-key to access the virtual machines (Ansible works via SSH)
- ssh_user = username to login into the instance
- URL = the URL where the file is hosted For example: Webserver, S3, Blob Storage, Cloud Storage
- ActivationID = An ID that provides a way to group agents and bind them to your account
- CustomerID = An ID to identify your account
Azure Automation Cloud Agent
This section helps you to deploy Qualys Cloud Agent in Azure Virtual Machine (VM) using Azure Automation and Run command.
The PowerShell script install.ps1 logs into the Azure subscription and locates all the Resource Groups. Crawling each Resource Group, it locates VMs inside them. With the help of the Azure Run command Invoke-AzureRmVMRunCommand, it downloads the script to install Qualys Cloud Agent based on the Operating System (OS) of the VM.
Prerequisites You should have an Azure automation account and an Automation connection asset named AzureRunAsConnection in that Azure automation account.
This script only works on powershell version 2 and above. It specifically not works for the V5 core due to the unavailability of the Invoke-web request cmdlet. You can opt for the alternatives.
Usage:
- Create variables named ContainerName, StorageAccountName, StorageAccountKey.
- Copy the executables files (Qualys Cloud Agent exe, rpm, or deb files) and upload them to the Blob storage that is publicly accessible.
- Repeat steps 1 and 2 for scripts LinucQCA.sh and WindowsQCA.ps1 and store it in Blob storage referred by variables created in step 1 and let it be private.
- Import the main script named qcainstall.ps1 into Azure automation runbook and edit the variables and Save and publish it. ActivationId, CustomerId, url_rpm, url_deb.
- Start the Runbook.