Share filesystem resources

Configure Codar to share filesystem resources to free up disk space (this task is optional). Static filesystem resources, such as images or JSP files, can be stored on one system and shared by all nodes in the cluster. The following example shows how to share the images directory that is installed with each instance of Codar.

Codar provides images that are stored in an images directory (for example,csa.war/images). From the Cloud Service Management Console, you may also upload images which are saved to the same images directory. You can store these images on a shared filesystem on a network and the images on this single shared filesystem can be used by all nodes in the cluster.

Configuring Codar to use a shared filesystem to store images on Linux

To configure Codar to use a shared filesystem to store images on Linux systems, perform the following steps:

  1. Move the contents of the csa.war/images directory to the shared location. For example, move the files to //<SharedFilesystem>/Codar/Images
  2. On the Codar node, log in as root.

  3. Delete the <codar_home>/jboss-as/standalone/deployments/csa.war/images directory if it exists.
  4. Create a credentials file to store the shared filesystem user login information. For example, create /etc/.win-mnt-cred and add the following lines:

    username=<SharedFilesystemUser>
    password=<SharedFilesystemPassword>
  5. Change the permissions of the credentials file by typing chmod 600 /etc/.win-mnt-cred.

  6. Edit /etc/fstab by adding the following line:

    //<SharedFilesystem>/CodarImages $Codar_HOME/jboss-as/
    standalone/deployments/csa.war/images cifs credentials=
    /etc/.win-mnt-cred,iocharset=utf8,file_mode=0777,dir_mode=0777,
    uid=codaruser,gid=csagrp 0 0
  1. Mount the shared filesystem by typing mount -a.

Configuring Codar to use a shared filesystem to store images on Microsoft Windows

To configure Codar to use a shared filesystem to store images on Windows systems, perform the following steps:

  1. HPE recommends that you run the Codar service as a non-administrative user. If you run the Codar service as a non-administrator user, the examples in this section assume that you have created the CodarUser.
  2. On a remote system, create a directory or folder that will contain the shared files and share the folder. For example, if you create a folder named C:\Codar\images on the remote system, in a command prompt on the remote system, type net share Codar_images=C:\Codar\images.
  3. Copy the <codar_home>\jboss-as\standalone\deployments\csa.war\images directory from one of the Codar nodes to the shared folder on the remote system.
  4. Delete the \csa.war\images directory from each Codarr node.
  5. On each Codar node, create a symbolic link to the shared folder. For example, from a command prompt, type the following commands:

    mklink /d <codar_home>\jboss-as\standalone\deployments\csa.war\images
    \\<SharedFilesystem>\Codar_images
    Note: If you configured a non-administrator user to start and stop the Codar service (for example, CodarUser), you must create the symbolic link as this user.
  6. On each node, do the following:
    1. Navigate to Control Panel > Administrative Tools > Services.

    2. Right-click on the Codar service and select Properties.

    3. Click the Log On tab.

    4. Select This account, enter the user who starts and stops the Codar service (for example, if you are running the Codar service as a non-administrator user such as CSAUser, enter .\CSAUser; if you are running the service as an administrator, enter .\Administrator), and enter the user's password.
    5. Click OK.