The following is a description of how CapaInstaller services will update them self. The CapaInstaller services is divided into two categories:
- CapaInstaller administrative services, which are services that communicates with a Microsoft SQL Server
CapaInstaller Replicator Service
- CapaInstaller Synchronization Service
- CapaInstaller Patch Management Service
- CapaInstaller PXE Boot Service
- CapaInstaller Client service, which uses file based communication to update them self.
CapaInstaller Agent Service
- CapaInstaller Health Check Service/Service Installation Service (this services is updated by CapaInstaller Agent Service prior to agent execution)
CapaInstaller administrative services
CapaInstaller administrative service uses the database for storing the current versions of the services files. The files are also stored on each Management Point and Server and acts as fail over if the service for some reason is unable to connect to the database.
The service files will be updated in the database by the CapaInstaller Setup Wizard as part of the installation or when patching the system. Files are stored binary in the database and registers their version and checksum to ensure a valid update process.
The administrative services regularly queries the database in order to check if the service in the database is newer than itself. If the versions are different, the service will download the service files from the database, call SelfUpdate.exe in order to stop the service,
update the files and restart the service.
Default interval between checking for new service files is every 15 minutes
CapaInstaller client services
CapaInstaller client service uses the linked Management Server for storing the current versions of the services files.
The CapaInstaller Agent Service will check the service file stored on the local disk in the folder CapaInstaller\Client\Resources\CIStub and compare this version with its own. (The files are downloaded from the Management Server by the CapaInstaller
Health Check) If the versions are different, the service will call SelfUpdate.exe in order to stop the service, update the files and restart the service. This happens each time the CapaInstaller Agent Service is instructed to execute the Agent.
At this time, the CapaInstaller Agent Service will check if the CapaInstaller Health Check Service needs to be updated as well and will perform that action is needed.
Default interval between checking for new service files is:
CapaInstaller Agent Service
Prior the Agent Execution
CapaInstaller Health Check Service
Prior the Agent Execution (by CapaInstaller Agent Service)
How the selfupdate works
The selfupdate is a executable file that - based on arguments - can stop a service, overwrite the services files a restart the service before unloading ifself. CapaInstaller Services will execute this file, leaving control to the executable. Therefore it is crucial that the source files for the services is in place and verified before updating. That is why the file entries in the database is stored along with a checksum.
When the services has copied to the local disk, the files actual checksum is compared with the once stated in the database and only if they match, a service update is performed. Similar to this, the health check service will compare the checksum with check sums stored in a xml file generated by the Replicator to ensure proper client service update.
The database will also store the selfupdate executable in order to allow new versions of this file.
Selfupdate will create a log file entry each time it executes. The log file is stored in %programfiles%\CapaInstaller\Logs\Setup\Selfupdate.log Prior execution logs are stored in the history folder %programfiles%\CapaInstaller\Logs\Setup\Selfupdate_<datestamp>.log