# Syncing Configuration Files

The Open iT Core Server distributes configuration files upon periodic client requests. The distributed files include those listed in distreplace.xml and the files within the dist-config and module-activation directories of the Core Server.

# File Distribution

The Core Server reads distreplace.xml in C:\Program Files\OpeniT\Core\Configuration\Components and copies the configuration files list to C:\Program Files\OpeniT\Core\Configuration\dist-config. All the included XML configuration files are validated before being compressed into a file named dist-config.[platform].tar.gz and saved to the temp directory for distribution, which is by default in C:\Program Files\OpeniT\Core\Log\temp. This will prevent collection errors if a malformed XML file is sent to the client. The compressed distributable file is then sent to the clients every 6 hours by default and saved to C:\Program Files\OpeniT\Core\Log\temp.

The distributable files have a default maximum age of 24 hours before creating a new one. But suppose changes are made to file(s) in the dist-config directory or distreplace.xml. In that case, new distributable packages will be generated at the start of the next hour.

You can also manually trigger the creation of new distributable packages by following these steps:

  1. Open a command prompt with Administrator level privileges.

  2. Go to the bin directory, which is by default in C:\Program Files\OpeniT\Core\bin, run the command:

    Command Syntax
     cd $BIN_DIR
    Example
     cd C:\Program Files\OpeniT\Core\bin
  3. Run the command:

    Command Syntax
     openit_dist

Then you can proceed with Manual File Distribution to a Client.

The Core Server reads distreplace.xml in /var/opt/openit/etc/Components and copies the configuration files list to /var/opt/openit/etc/dist-config. All the included XML configuration files are validated before being compressed into a file named dist-config.[platform].tar.gz and saved to the temp directory for distribution, which is by default in /var/opt/openit/temp. This will prevent collection errors if a malformed XML file is sent to the client. The compressed distributable file is then sent to the clients every 6 hours by default and saved to /var/opt/openit/temp.

The distributable files have a default maximum age of 24 hours before creating a new one. But suppose changes are made to file(s) in the dist-config directory or distreplace.xml. In that case, new distributable packages will be generated at the start of the next hour.

You can also manually trigger the creation of new distributable packages by following these steps on the Core Server:

  1. Go to the bin directory, which is by default in /opt/openit/bin, run the command:

    Command Syntax
     cd $BIN_DIR
    Example
     cd /opt/openit/bin
  2. Run the command:

    Command Syntax
     ./openit_dist

Then you can proceed with Manual File Distribution to a Client.

# Providing Clients with the Most Up-to-Date Distributable Packages

By default, the client's core_config-client.oconf period is greater than the server's core_create_dist.oconf period. This allows the client to consistently receive the most updated configuration files. If any customizations are made to the scheduler files on either the server or client, it is important to maintain the client's scheduler period greater than the server's scheduler file period. You may follow these instructions to make the necessary adjustments:

On the server:

  1. Go to the scheduler directory, which is by default in C:\Program Files\OpeniT\Core\Configuration\scheduler, and open core_create_dist.oconf.

  2. Locate the root.scheduler.jobs.core_create_dist.scheduling.start-triggers.trigger#1.period and check its value.

    core_create_dist.oconf
     67|		period
     68|		{
     69|			description=Run every hour
     70|			type=timespan
     71|			value=PT1H
     72|		}

On the client:

  1. Go to the scheduler directory, which is by default in C:\Program Files\OpeniT\Core\Configuration\scheduler, and open core_config-client.oconf.

  2. Locate the root.scheduler.jobs.core_download_dist.scheduling.start-triggers.trigger#1.period and check that its value is greater than the client's scheduler file period. If not, you may update this value.

    core_config-client.oconf
     67|		period
     68|		{
     69|			description=Run every 6 hours
     70|			type=timespan
     71|			value=PT6H
     72|		}
  3. Save the changes if there are any.

On the server:

  1. Go to the scheduler directory, which is by default in /var/opt/openit/etc/scheduler, and open core_create_dist.oconf.

  2. Locate the root.scheduler.jobs.core_create_dist.scheduling.start-triggers.trigger#1.period and check its value.

    core_create_dist.oconf
     67|		period
     68|		{
     69|			description=Run every hour
     70|			type=timespan
     71|			value=PT1H
     72|		}

On the client:

  1. Go to the scheduler directory, which is by default in /var/opt/openit/etc/scheduler, and open core_config-client.oconf.

  2. Locate the root.scheduler.jobs.core_download_dist.scheduling.start-triggers.trigger#1.period and check that its value is greater than the client's scheduler file period. If not, you may update this value.

    core_config-client.oconf
     67|		period
     68|		{
     69|			description=Run every 6 hours
     70|			type=timespan
     71|			value=PT6H
     72|		}
  3. Save the changes if there are any.

# Adding Files on the dist-config.[platform].tar.gz Distributable

Copy a file, following the directory structure on the server, to C:\Program Files\OpeniT\Core\Configuration\dist-config to add it to the distributable.

For example, save a file in C:\Program Files\OpeniT\Core\Configuration\dist-config\scheduler and it will be included in C:\Program Files\OpeniT\Core\Configuration\scheduler.

Copy a file, following the directory structure on the server, to /var/opt/openit/etc/dist-config to add it to the distributable.

For example, save a file in /var/opt/openit/etc/dist-config/scheduler and it will be included in /var/opt/openit/etc/scheduler.

# Manual File Distribution to a Client

To immediately send a dist-config.[platform].tar.gz distributable, open a command prompt on the client machine and run the following command as an Administrator:

openit_apicontroller.exe -t download_dist

This process automatically runs after the client restarts, then every 6 hours by default after. It also creates a new dist-config.[platform].tar.gz file if it was manually removed prior.

To immediately send a dist-config.[platform].tar.gz distributable, go to /opt/openit/bin and run the following command:

openit_apicontroller -t download_dist

This process automatically runs after the client restarts, then every 6 hours by default after. It also creates a new dist-config.[platform].tar.gz file if it was manually removed prior.

Files can also be distributed to specific client(s):

   File Distribution via host-config.map  

# Next Step?

   Configuring the Maximum Age of the dist-config Distributable

We value your feedback!

Please take a few minutes to complete our survey and share your thoughts on your recent experience with our documentation.

Take survey

Close