Novell Cluster Services (NCS) on Novell OES Linux

Mode 1 - Clustering at the print provider layer

Step 1 - Application Server (Primary Server) Setup

Before installing a secondary server/clustered print provider you should take some time to ensure the primary PaperCut server (central Application Server) is set up and running correctly. The primary server will be responsible for providing PaperCut NG's web based interface and storing data. In most cases where a cluster is involved the primary server will not host any printers and is dedicated to the role of hosting the PaperCut Application Server. If it is not running fine now, adding an extra server will only "add an extra variable to the equation" and complicate troubleshooting. Take some time now to verify that the primary server is functioning correctly. For example, verify that:

  • Install and configuration is completed

  • Administrators can access the system via a web browser for administration.

  • Users can log into the user web interface from their workstations.

Step 2 - Ensure firewall allows access to port 9191

Cluster nodes needs to communicate (initiate a TCP connection) with the primary PaperCut server on port 9191. Administrators should ensure that any firewall software on the primary application server is not set to block any incoming local network traffic on this port. A good way to test is to open a browser on the planned cluster nodes and confirm you can access the administration web interface on port 9191.

Step 3 - Create eDirectory user account

The papercut user's home directory denotes the application install location. For the fact that it is the default for LUM enabled users, /home/papercut is recommended, and assumed through the rest of this guide.

  1. In iManager open UsersCreate User.

  2. For username, enter papercut.

  3. For Last name enter PaperCut LUM user.

  4. For context choose the same eDirectory context as your the iPrint user and iprintgrp group created during your clustered iPrint installation.

  5. Assign the user a secret password during creation, and ensure the user's password is set to not expire. This may require associating the user with an appropriate password policy after creation if you are using eDirectory password policies.

  6. Click the tickbox next to Create home directory.

  7. For Volume choose the volume that is holding your clustered iPrint resource.

  8. For Path ensure that it reads papercut.

  9. Click OK to create the user.

We now need to LUM enable this PaperCut eDirectory user and add it to the already LUM enabled iprintgrp used by the clustered iPrint resource.

  1. In iManager open Linux User ManagementEnable Users for Linux.

  2. Select your papercut eDirectory user and continue.

  3. Select An Existing Linux-Enabled Group and choose the iprintgrp created during your clustered iPrint installation and press Next.

  4. Confirm that Workstation list includes all of the servers in your cluster and press next.

  5. On your clustered iPrint volume, navigate to the papercut folder (/home/papercut) and add RWECMF file rights for the eDirectory group iprintgrp created during your clustered iPrint installation.

  6. As root, on the node that is currently hosting the iPrint resource, run the following, replacing [volume] with the volume name of your iPrint resource.

    shell> ln -s /media/nss/[volume]/papercut /home/papercut 
                            
  7. To confirm all the above stages are working, using any method you like (such as the traditional Novell client for Windows, logged in as an admin user), create a folder or test files inside the papercut folder on your iPrint cluster volume, then on the server holding that resource run:

    shell> su – papercut
    shell> ls
                            

    You should be able to see the files created on the NSS volume.

Step 4 - Install the Print Provider

Important

The instructions below assume i686 architecture. If your system OS is 64-bit, replace i686 with x64 in all file paths.

Install the print provider software onto the secondary server by copying all files and directories from the primary application server's directory:

[app-path]/providers/print/linux-i686/*
                

to the equivalent location on the node currently holding the iPrint resource:

/home/papercut/providers/print/linux-i686/
                

Perform the copy operation as the papercut user so that files are owned by the papercut user. You may use any method to copy the files, including over the network or via a USB key. If the primary server is also Linux, the simplest way would be use secure copy (scp) as follows:

shell> su - papercut
shell> mkdir -p providers/print
shell> cd providers/print
shell> scp -r primary.server.name:/home/papercut/providers/print/* .
                

After the copy operation is performed, execute the setperms and roottasks scripts as root:

shell> su - root
shell> sh ~papercut/providers/print/linux-i686/setperms
shell> sh ~papercut/providers/print/linux-i686/roottasks
                

Step 5 - Configuration

The print provider on the cluster needs to know where the primary server is installed (i.e. its IP address). It also needs to correctly report the cluster name to the primary server.

  1. Open the file /home/papercut/providers/print/linux-i686/print-provider.conf in a text editor.

  2. Locate the line starting with ApplicationServer= and change 127.0.0.1 to the hostname or IP address of the primary server.

  3. Locate the line starting with ServerName=, uncomment it and add the hostname of the cluster. This tells PaperCut NG to report printers as being hosted on the cluster rather than on the node running the resource.

Step 6 - Cluster Configuration

  1. Configuring services

    As the services are going to be managed by Novell clustering, the services on the physical nodes must be disabled so that they don't start. On the node used to install PaperCut in the section called “Step 4 - Install the Print Provider”, in YaSTSystemSystem Services (Runlevel), disable papercutcups.

  2. Installing services and disabling them on all other nodes

    On each other node in the cluster perform the following steps:

    1. As root run the following command ([resource-name] is the name for your iPrint resource, and [node-name] is the server name of the node you are now working on):

              shell> cluster migrate [resource-name] [node-name]
                                      
    2. Once the resource has successfully migrated run the following command (still as root):

              shell> /home/papercut/providers/print/linux-[arch]/roottasks
                                      
    3. In YaSTSystemSystem Services (Runlevel), disable papercutcups.

    4. Repeat steps 1-3 on the other nodes in the cluster.

The binaries copied in the section called “Step 4 - Install the Print Provider” now need to be integrated into Novell iPrint by adding papercut as the Accounting Autoload Command as discussed in the section called “Step 5 - Printer/iPrint Configuration” under the section called “Installation on Novell OES Linux (iPrint)”. Follow that step only and return here once completed.

Step 7 - Test

Mode 1 clustering should now be configured. Perform some test printing on all of this secondary server's printers. Log into the PaperCut admin interface as admin and verify that the printers are now listed under the Printers tab. Simulate a node failover and test again (wait a minute or two between failures for the new node to engage).

Mode 2 - Clustering at all application layers

Step 1 - Prerequisites

This guide assumes you have iPrint up and working within an existing cluster. It is assumed the cluster is set up following Novell's documentation at http://www.novell.com/documentation/oes2/iprint_lx/?page=/documentation/oes2/iprint_lx/data/akujhhq.html.

Ensure the size of the shared disk partition and NSS Pools are sufficient for your print manager, driver store, and PaperCut installation. This may mean making it larger than Novell's recommended 20GB if you are intending to use the internal database and store large amounts of data over time.

Step 2 – Create eDirectory user account

The papercut user's home directory denotes the application install location. For the fact that it is the default for LUM enabled users, /home/papercut is recommended, and assumed through the rest of this guide.

  1. In iManager open UsersCreate User.

  2. For username, enter papercut.

  3. For Last name enter PaperCut LUM user.

  4. For context choose the same eDirectory context as your the iPrint user and iprintgrp group created during your clustered iPrint installation.

  5. Assign the user a secret password during creation, and ensure the user's password is set to not expire. This may require associating the user with an appropriate password policy after creation if you are using eDirectory password policies.

  6. Click the tickbox next to Create home directory.

  7. For Volume choose the volume that is holding your clustered iPrint resource.

  8. For Path ensure that it reads papercut.

  9. Click OK to create the user.

We now need to LUM enable this PaperCut eDirectory user and add it to the already LUM enabled iprintgrp used by the clustered iPrint resource.

  1. In iManager open Linux User ManagementEnable Users for Linux.

  2. Select your papercut eDirectory user and continue.

  3. Select An Existing Linux-Enabled Group and choose the iprintgrp created during your clustered iPrint installation and press Next.

  4. Confirm that Workstation list includes all of the servers in your cluster and press next.

  5. On your clustered iPrint volume, navigate to the papercut folder and add RWECMF file rights for the eDirectory group iprintgrp created during your clustered iPrint installation.

  6. As root, on the node that is currently hosting the iPrint resource, run the following, replacing [volume] with the volume name of your iPrint resource.

    shell> ln -s /media/nss/[volume]/papercut /home/papercut 
                            
  7. To confirm all the above stages are working, using any method you like (such as the traditional Novell client for Windows, logged in as an admin user), create a folder or test files inside the papercut folder on your iPrint cluster volume, then on the server holding that resource run:

    shell> su – papercut
    shell> ls
                            

    You should be able to see the files created on the NSS volume.

Downloading and installing

On the node that is currently hosting the iPrint resource, perform a primary server PaperCut installation as per steps 3 and 4 in the section called “Installation on Novell OES Linux (iPrint)”.

Important

Ensure this only done on the node that is currently holding the iPrint/PaperCut resource.

Step 4 - Installing services

  1. As the services are going to be managed by Novell clustering, the services on the physical nodes must be disabled so that they don't start. On the node used to install PaperCut in the section called “Step 4 - Install the Print Provider”, in YaSTSystemSystem Services (Runlevel), disable both papercut and papercutcups.

  2. Installing services and disabling them on all other nodes

    On each other node in the cluster perform the following steps:

    1. As root run the following command ([resource-name] is the name for your iPrint resource, and [node-name] is the server name of the node you are now working on):

      shell> cluster migrate [resource-name] [node-name]
                                      
    2. Once the resource has successfully migrated run the following two commands (still as root):

      shell> /home/papercut/server/bin/linux-[arch]/roottasks
      shell> /home/papercut/providers/print/linux-[arch]/roottasks
                                      
    3. In YaSTSystemSystem Services (Runlevel), disable both papercut and papercutcups.

    4. Repeat steps 1-3 on the other nodes in the cluster.

Step 5 - File permissions

On each node in the cluster, including the one used to install PaperCut in the section called “Downloading and installing”, run the following command:

shell> chown root:iprintgrp /opt/novell/iprint/bin/papercut
                

Step 6 - Configure the nodes to report the virtual server hostname

Note

This step only has to be completed on whichever node is currently holding the iPrint resource, as the print provider config file is on the portable volume and will automatically be picked up when the resource moves.

  1. Open the file /home/papercut/providers/print/linux-i686/print-provider.conf in a text editor.

  2. Locate the line starting with ServerName=, uncomment it and add the hostname of the cluster. This tells PaperCut NG to report printers as being hosted on the cluster rather than on the node running the resource.

Step 7 – Update iPrint cluster resource scripts to load/unload the PaperCut application server

  1. In iManagerClustersCluster Options open the cluster hosting your iPrint resource.

  2. Click on the iPrint resource, then Scripts.

  3. This screen displays the load script, which should something like the following:

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    exit_on_error nss /poolact=IPRINT
    exit_on_error ncpcon mount IPRINT=250
    exit_on_error add_secondary_ipaddress 10.10.55.7
    exit_on_error ncpcon bind --ncpservername=FPCL_IPRINT_SERVER --ipaddress=10.10.55.7
    ignore_error mv /media/nss/IPRINT/var/opt/novell/iprint/iprintgw.lpr /media/nss/IPRINT/var/opt/novell/iprint/iprintgw.lpr.bak
    exit_on_error rcnovell-idsd start
    exit_on_error rcnovell-ipsmd start
    exit 0
                            
  4. Add the following two lines between exit_on_error rcnovell-ipsmd start and exit 0:

    exit_on_error /etc/init.d/papercut start
    exit_on_error /etc/init.d/papercutcups start
                            
  5. Click Apply, then Unload Script. The unload script should look something like the following:

    #!/bin/bash
    . /opt/novell/ncs/lib/ncsfuncs
    ignore_error rcnovell-ipsmd stop
    ignore_error rcnovell-idsd stop
    ignore_error ncpcon unbind --ncpservername=FPCL_IPRINT_SERVER --ipaddress=10.10.55.7
    ignore_error del_secondary_ipaddress 10.10.55.7
    ignore_error nss /pooldeact=IPRINT
    exit 0
                            
  6. Insert the following two lines between . /opt/novell/ncs/lib/ncsfuncs and ignore_error rcnovell-ipsmd stop:

    ignore_error /etc/init.d/papercutcups stop
    ignore_error /etc/init.d/papercut stop
                            
  7. Click Apply, then offline and online the iPrint resource to load it with these new scripts.

Step 8 - Config files

When installing PaperCut in step the section called “Downloading and installing” the IP address of the physical node will have been automatically detected and stored in config files to simplify the deployment of remote components. These config files will require modification so that the components connect to the cluster / virtual server resource instead.

Update the server IP address and hostname to the cluster / virtual server resource in the following configuration files:

  • /home/papercut/client/win/client.properties

  • /home/papercut/client/mac/PCClient.app/Contents/Resources/config

  • /home/papercut/release/connection.properties

  • client-config.js in each Gadget in /home/papercut/client/win/

  • /home/papercut/client/mac/Widget/PCWidget/config

  • /providers/net/connection.properties

  • /providers/hardware/ricoh/*/connection.properties

As these config files are all on the shared resource they only need to be changed once on the node currently hosting the resource.

Step 9 - Printer / iPrint configuration

Each printer in the cluster that will be managed/tracked by PaperCut needs further configuration via iManager. Follow the section called “Step 5 - Printer/iPrint Configuration” under the section called “Installation on Novell OES Linux (iPrint)” and return here once completed.

Step 10 – Test

Mode 2 clustering should now be configured. Perform some test printing on all of this secondary server's printers. Log into the PaperCut admin interface as admin and verify that the printers are now listed under the Printers tab. Simulate a node failover and test again (wait a minute or two between failures for the new node to engage).

Step 11 – Sharing Client Software

As the clustered solution uses NSS, the client folder is already available as an NCP share at \\[cluster-virtual-server]\[volume-name]\papercut\client. Users should be able to access this folder once they are given file rights. Alternatively, consider making these files available via an alternate share/path/location.