KB N°03: Deploy the post agent via WAPT
In this article, you'll find the detailed procedure for deploying the Station Agent via WAPT.
Context
WAPT is a sovereign IT asset management solution developed by Tranquil IT and certified by ANSSI. Find out more here.
Deployment with WAPT lets you deploy the Agent on your employees' workstations. This deployment mode is particularly useful when the WAPT agent is installed on workstations under your control.
Prerequisites
You need to be in control of your IT assets, WAPT is up and running, and the WAPT agent is deployed on workstations.
Procedure
You can deploy the Agent on a workstation.
- Download the extension agent .msi file from Olfeo SaaS(Configuration > Directories:
- Generate a package template in WAPT by clicking on "Package template" :
- Add the Station Agent .msi file, then click "Continue":
- The package creation wizard will display the following information:
- Click on "Edit manually" to edit the setup.py file which, by default, contains the lines below:
- from setuphelpers import*r " " "
Usable WAPT package functions: install(), uninstall(), session_setup(), audit(), update_package()
" " "# Declaring global variables - Warnings: 1) WAPT context is only available in package functions; 2) Global variables are not persistent between calls
def install():# Declaring local variables
# Installing the softwareprint("Installing: authentication_agent_en.msi")
install_msi_if_needed('authentication_agent_en.msi')
- Tip
- Below is a working setup.py example. We strongly recommend that you follow WAPT's recommendations/instructions by clicking here.
- # -*- coding: utf-8 -*-from setuphelpers import *uninstallkey = []
properties = {
'CONFIG_URL':'https://storage.gra.cloud.ovh.net/v1/AUTH_XXXXX/prod-pub/XXXXXX/config.json',
}def install():
print('installing olf-trustlane-agent')
install_msi_if_needed('authentication_agent_en.msi',properties=properties)def uninstall():
pass
# put here what to do when package is removed from host
# implicit context variables are WAPT, control, user, params, runprint('RAZ configuration proxy')
run(r'reg add " HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections " /f /v " DefaultConnectionSettings " /t REG_BINARY /d " 4600000002000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 "')
run(r'reg add " HKEY_LOCAL_MACHINE\Software\WOW6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\Connections " /f /v " DefaultConnectionSettings " /t REG_BINARY /d " 4600000002000000090000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 "')def session_setup():
print('Session setup for %s' %asrequirement())
# put here what to do when package is configured inside a user session
# implicit context variables are WAPT, control, user, paramsdef update_package():
pass
# put here what to do to update package content with newer installers.
# launched with command wapt-get update-package-sources <path-to-wapt-directory>
# implicit context variables are WAPT, basedir, control, user, params, run
# if attributes in control are changed, they should be explicitly saved to package file with control.save_control_to_wapt()def audit():
pass
# put here code to check periodically that state is matching expectations
# return "OK", "WARNING" or "ERROR" to report status in console.
# all print statement are reported tooreturn "OK
- The "CONFIG_URL" value corresponds to the extension agent configuration URL found in your Olfeo SaaS interface(Configuration > Directories (consult the directory) > Extension agent tab):
- Import the new package by clicking on "Build and import a package into the repository", then select the folder containing the package, which by default is located in "C:\waptdev".
- The "Import" button is used to import the package, which you will then find in the list of packages in the "Private repository" menu:
- The new package appears in the "Private warehouse" list:
Deposit
In some cases, the Agent systray may not start following installation in this deployment mode (desktop use and user rights for the "WAPT" user, where the systray requires admin space). To avoid these side effects, plan to restart the workstation following Agent installation.
Tags: Deploy, Agent, UC-03