37.2 Shared Content Repository

This feature enables you to share the content repository among multiple Primary Servers in the same zone. In prior releases of ZENworks, every Primary Server had its own content repository. This section includes the following:

NOTE:The shared content Repository does not support the Ondemand content distribution. To stop the content servers from getting the content ondemand, you can set the Blacked out Schedule for Ondemand content. For more information, see Blacked out Schedule for Ondemand Content.

37.2.1 Pre-requisites

Before you configure the shared repository, you need to ensure that the following prerequisites are met in the following scenarios:

ZENworks running as a Primary Server on a Linux device

  • Ensure that the ZENworks user has read/write access to the shared volume.

  • Ensure that shared volume path is configured in the /etc/fstab file. This will ensure that during the reboot of the machine, the administrator does not have to remount the shared volume on the Primary Servers.

    The following command is an example of the shared volume path configuration when the shared repository is hosted on an separate OES Server as CIFS Share, on an NSS volume:

    <IP address of the OES server>/<Shared Volume>/var/opt/microfocus/zenworks/content-repo cifs username=zenworks,password=<password>,uid=zenworks,gid=zenworks 0 0

    In this command:

    • Replace <IP address of the OES server> with the IP address of the OES Server on which the content repository is hosted.

    • Replace <Shared Volume> with the NSS volume configured on the OES Server, with CIFS share enabled.

    • /var/opt/microfocus/zenworks/content-repo is the path of the content repo folder.

    • username is the name of the zenworks user, created on the OES Server, which is also LUM (Linux User Management) enabled.

    The following command is an example of the shared volume path configuration when the NFS Share is hosted on a separate SLES Server:

    <IP address of the SLES Server>:<Shared volume> /var/opt/microfocus/zenworks/content-repo nfs rw,sync,hard,intr 0 0

    In this command:

    • Replace <IP address of the SLES server> with the IP address of the SLES Server on which the content repository is hosted.

    • Replace <Shared Volume> with the NSS volume that is configured on the SLES Server, with NFS share enabled.

    • /var/opt/microfocus/zenworks/content-repo is the path of the content repo folder.

ZENworks running as a Primary Server on a ZENworks Appliance

  • Ensure that the ZENworks user has read/write access to the shared volume.

  • Ensure that shared volume path is configured in the /etc/fstab file. This is to ensure that during the reboot of the machine, the administrator does not have to remount the shared volume on the Primary Servers.

    The following command is an example of the shared volume path configuration when the shared repository is hosted on an OES Server as CIFS Share, on an NSS volume:

    <IP address of the OES server>/<Shared Volume>/vastorage/var/opt/microfocus/zenworks/content-repo cifs username=zenworks,password=<password>,uid=zenworks,gid=zenworks 0 0

    In this command:

    • Replace <IP address of the OES server> with the IP address of the OES Server on which the content repository is hosted.

    • Replace <Shared Volume> with the NSS volume configured on the OES Server, with CIFS share enabled.

    • /vastorage/var/opt/microfocus/zenworks/content-repo is the path of the content repo folder.

    • username is the name of the zenworks user, created on the OES Server, which is also LUM (Linux User Management) enabled.

NOTE:If NFS Share is configured on the appliance, ensure that you install the nfs-client RPM. This RPM is not installed by default along with the appliance.

ZENworks running as a Primary Server on a Windows Server Class device

When ZENworks is running as a Primary Server on a Windows device, the user account with which the ZENworks Loader process is running should have read/write access to the shared repository, before the shared repository is configured.

This section explains how to configure the shared content repository for an anonymous user. The ZENworks user account can be obtained by opening the ZENworks Loader process from the services.msc application and navigating to the Log on tab. Configuring stricter access permissions is beyond the scope of ZENworks. You will need to contact your File System administrator for further assistance.

The following command is an example for a scenario in which the shared content repository is hosted on an OES Server as CIFS Share, on an NSS volume:

C:\Program Files (x86)\Micro Focus\ZENworks\work>mklink /D content-repo \\<ip address of the OES Server>\<Shared Volume Eg: WIN_VOL>

In this command, WIN_VOL is the CIFS Share created on the OES Server, with anonymous access.

37.2.2 Configuring the Shared Content Repository for Multiple Primary Servers

  1. Stop the ZENworks Loader and ZENworks Server services only on those Primary Servers for which you want to configure the shared content repository.

    For example, if there are three Primary Servers in a zone (PS1, PS2 and PS3) and the shared content-repo needs to be configured for PS1 and PS2, then the services need to be stopped only on PS1 and PS2.

  2. To back up the existing content, if it is locally mounted, rename the existing /var/opt/microfocus/zenworks/content-repo file to /var/opt/microfocus/zenworks/content-repo.bak.

  3. Mount the shared content repo either by configuring the /etc/fstab file or by using the mount command on a Linux or Windows server. For more information, see the Pre-requisites section.

  4. Repeat steps 1 to 3 to mount each of the Primary Servers to the shared content repository.

  5. Execute the configure action only on those Primary Servers that are configured for the shared content repository. This is to let them know that the content repository is shared among them. To execute the configure action, run the following command on all the Primary Servers that are configured for shared content or run the command from any one of the Primary Servers by providing the path details of all the other Primary Servers that share the same content repository in the zone:

    microfocus-zenworks-configure -c "com.microfocus.zenworks.configure.actions.SharedContentRepoConfigureAction" -Daction=add

    or

    Add the path details of all the other Primary Servers that share the content repository, from one Primary Server, by running the following command:

    microfocus-zenworks-configure -c "com.microfocus.zenworks.configure.actions.SharedContentRepoConfigureAction" -Daction=add -Dservers=/devices/Servers/<Primary Server 1>:<Primary Server 2>....

    In this command:Replace <Primary Server 1> with the full path of the first Primary Server, replace<Primary Server 2> with the full path of the second Primary Server, and so on.

  6. Copy or move the existing data from the /var/opt/microfocus/zenworks/content-repo.bak file to the /var/opt/microfocus/zenworks/content-repo file.

  7. Restart the ZENwork Loader and ZENworks Server services only on those Primary Servers for which the shared content is configured.

    NOTE:

    1. If you plan to add a new Primary Server to an existing zone and then configure the Shared Content Repo for this server, the Primary Server should initially be configured with its own local content repository. Once the server is installed, ensure that there is a long delay in the content replication interval so that content replication does not happen to the local repository. You need to follow steps 1 to 7 that are listed above, to configure the new Primary Server to the shared content repo.

    2. If you want the shared content to be available for all the Primary Servers immediately, run the Replicate Now action.

37.2.3 Revoking the Sharing of the Content Repository

This scenario will enable you to revoke the sharing of the content repository that is mounted to a Primary Server.

  1. Stop the ZENworks Loader and ZENworks Server services on those Primary Servers for which the shared content repository needs to be revoked.

  2. Use the following command to revoke the shared content repository:

    microfocus-zenworks-configure -c "com.microfocus.zenworks.configure.actions.SharedContentRepoConfigureAction" -Daction=remove -Dservers=<Primary Server>

    In this command, replace <Primary Server> with the full path of the Primary Server on which the shared content repository is located.

  3. Once the shared content repo folder is revoked successfully, you need to copy the content from the shared content repo to the local content repo.

  4. Restart the ZENworks Loader and ZENworks Server services on those Primary Servers for which the shared content repository is revoked.