Admin center:Teledeploy Configuration 2

From OCS Inventory NG
Jump to: navigation, search

Foreword

As in its previous versions, the deployment is only made in HTTPS. The deployment is based on a control of certificate of the server over the customer. The used Web server thus has to be configured to accept HTTPS requests. For that purpose, you can refer in the part HOWTO.

Configuration of the deployment through the GUI

To use the function of deployment, it is necessary to activate this function on the server. For that, connect you to your server OCS at the http://OCSServer/ocsreport. Go on the icon TOOLS, then click Configuration.

Both tabs concerning the configuration of deployment are Deployment and Interface

The tab deployment

See below for a classic configuration.

Deploy1.jpg
The mandatory parameters:
  • DOWNLOAD : Activate or not the function deployment
  • DOWNLOAD_URI_FRAG : Define the path where fragments of the packages are located
  • DOWNLOAD_URI_INFO : Define the path where INFO files of the packages are located

The tab Interface

Deploy2.jpg

The configuration file on the server

The configuration file is located on the server, in the apache configuration directory. The file is named: z-ocsinventory-server.conf. The path is different according to Linux distributions

Debian: /etc/apache2/conf.d/
CentOS: /etc/httpd/conf.d/
OpenSuse: /etc/apache2/conf.d/

Here is the part of this file which concerns the deployment :

  # ===== SOFTWARES DEPLOYMENT SETTINGS =====

  # Enable this feature
  PerlSetEnv OCS_OPT_DOWNLOAD 1
  # Package wich have a priority superior than this value will not be downloaded
  PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LENGTH 10
  # Time between two download cycles (bandwidth control)
  PerlSetEnv OCS_OPT_DOWNLOAD_CYCLE_LATENCY 60
  # Time between two fragment downloads (bandwidth control)
  PerlSetEnv OCS_OPT_DOWNLOAD_FRAG_LATENCY 60
  # Specify if you want to track packages affected to a group on computer's level
  PerlSetEnv OCS_OPT_DOWNLOAD_GROUPS_TRACE_EVENTS 1
  # Time between two download periods (bandwidth control)
  PerlSetEnv OCS_OPT_DOWNLOAD_PERIOD_LATENCY 60
  # Agents will send ERR_TIMEOUT event and clean the package it is older than this setting
  PerlSetEnv OCS_OPT_DOWNLOAD_TIMEOUT 7
  # Number of cycle within a period
  
  # Enable ocs engine to deliver agent's files (deprecated)
  PerlSetEnv OCS_OPT_DEPLOY 0

Resolution of the deployment problems

Base tests and verifications

  1. Verify that SSL is correctly enable on th server. try to connect to https://OCSServeur/download with a browser
  2. Verify that the SSL certificate (cacert.pem) is copied on the client and is identical to the certificate of the server
  3. Verify that the certificate of the server contents a CN (Certificate Name) that is identical to the name of the OCS server written in the ocsinventory.ini file of the client. It is not compulsory to activate the validation of the certificate. This option is modifiable in the ocsinventory.ini file.
SSL=1 : Validation of the certificate is activated
SSL=0 : Validation of the certificate is not activated

Logs usage

The log files of the client

Windows agent

As any computer system, SCO uses logs to simplify the detection of problems. Concerning the deployment, both files of log main things are machine.log and download.log. These files are in the file of configuration of the agent. Under Windows XP:

C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent

Under Windows 7 :

C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent

The download.log file is always generated, since the function of deployment is activated. On the other hand, machine.log is only generated if the agent is launched in mode " Debug ". The configuration of this parameter is made in:

C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\ocsinventory.ini

The Debug option has different levels.

  1. Debug=0 : no log file is generated
  2. Debug=1 : a simple log file is generated
  3. Debug=2 : a detailed log file is generated
The inventory log file
  • Path : C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent
  • Name : ocsinventory.log

Below, the part concerning the inventory in the file log, with the highest level of details ( Debug=2)

When everything goes well:

53. AGENT =>  Communication Server ask for Package Download
54.	DOWNLOAD => Package history file successfully cleaned for duplicate IDs
55.	DOWNLOAD => Metadata file <info> for package <1288105907> is located at <https://192.168.4.12/download/1288105907/info>
56.	COM SERVER => Initializing cURL library for getFile
57.	COM SERVER => Using cURL with server authentication
58.	COM SERVER => Disabling cURL proxy support
59.	COM SERVER => Disabling cURL SSL server validation support
60.	COM SERVER => Sending fileGet request to URL <https://192.168.4.12/download/1288105907/info>
61.	COM SERVER => fileGet response received <HTTP Status Code #200>
62.	COM SERVER => Cleaning cURL library
63.	DOWNLOAD => Unloading communication provider
64.	DOWNLOAD => Retrieve info file...OK (pack 1288105907)
65. DOWNLOAD => Package <1288105907> added to download queue
66. DOWNLOAD => Download and setup tool successfully started
The deployment log file
  • Path : C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent
  • Name : ocsinventory.log


Below, the part concerning the deployment in the file log, with the highest level of details ( Debug=2)

When everything goes well:

==============================================================
1. Starting OCS Inventory NG Package Download and Setup Tool on Thursday, December 16, 2010 12:20:20.
2. DOWNLOAD => Running OCS Inventory NG Download Version 2.0.0.6
3. DOWNLOAD => Using OCS Inventory NG FrameWork Version 2.0.0.6
4. DOWNLOAD => Using network connection with Communication Server
5.	COM PROVIDER => Loading Communication Provider <C:\Program Files\OCS Inventory Agent\ComHTTP.dll>
6. DOWNLOAD => Using Communication Provider <OCS Inventory NG cURL Communication Provider> Version <2.0.0.6>
7. DOWNLOAD => Starting new period of 10 cycles
8.	DOWNLOAD => Flushing package queue
9. DOWNLOAD => Parsing directory <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\download> for packages
10.	DOWNLOAD => Verifying package <C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\download
11. \1288105907>
12. DOWNLOAD => Package <1288105907> verified and added to process queue
13.	DOWNLOAD => Processing packages for cycle 1
14.	DOWNLOAD => Pausing for cycle latency (60 seconds)
15.	DOWNLOAD => Processing packages for cycle 2
16.	DOWNLOAD => Pausing for cycle latency (60 seconds)
17.	DOWNLOAD => Processing packages for cycle 3
18.	DOWNLOAD => Pausing for cycle latency (60 seconds)
19.	DOWNLOAD => Processing packages for cycle 4
20.	DOWNLOAD => Pausing for cycle latency (60 seconds)
21.	DOWNLOAD => Processing packages for cycle 5
22.	DOWNLOAD => Pausing for cycle latency (60 seconds)
23.	DOWNLOAD => Processing packages for cycle 6
24.DOWNLOAD => Downloading package fragment <1288105907-1>
25.	COM SERVER => Initializing cURL library for getFile
26.	COM SERVER => Using cURL with server authentication
27.	COM SERVER => Disabling cURL proxy support
28.	COM SERVER => Disabling cURL SSL server validation support
29.	COM SERVER => Sending fileGet request to URL <HTTP://192.168.4.12/download/1288105907/1288105907-1>
30.	COM SERVER => fileGet response received <HTTP Status Code #200>
31.	COM SERVER => Cleaning cURL library
32.	DOWNLOAD => Pausing for fragment latency (10 seconds)
33.	DOWNLOAD => Pausing for cycle latency (60 seconds)
34.	DOWNLOAD => Processing packages for cycle 7
35.	DOWNLOAD => Pausing for cycle latency (60 seconds)
..................
..................

Unix agent

 ocsinventory-agent --debug --logfile=/path/souhaité/agent.log

The log files of the server

Many log files would be very useful for the resolution of problems :

* Apache log files
* OCS server log files

For detailed log files, modify the file: z-ocsinventory-server.conf

PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 1 : detailed logs 
PerlSetEnv OCS_OPT_DBI_PRINT_ERROR 0 : simple logs