Creating a soft link to an image directory in Cognos Analytics

Use the image.sh script with the -c add_link option to create a soft link to an image subdirectory in a Cognos Analytics service instance.

Using image subdirectory soft links can be useful when you move existing reports to a Cloud Pak for Data environment without altering the report.

For example, an existing report might have a header image in a fixed directory (../portal_images/portal_heading.gif). Uploaded images are stored in the pods on disk in /opt/ibm/cognos/analytics/webcontent/bi/images/customImages/. You can change the report to use this file path, but changing the report is difficult to do at a higher scale. Instead, you can have the system create a soft link that is accessible to the existing report and the soft link can point to the location with the image files.

./image.sh -c add_link -n instance_namespace -t tethered_namespace -u user_name -p password -s portal_subdirectory -d link_name [-h]
-d link_name
The name of the soft link.
-n instance_namespace
The namespace or project.
-p password
Cloud Pak for Data user password.
-s portal_subdirectory
The destination subdirectory for the soft link.
-t tethered_namespace
Namespace in which Cognos Analytics is provisioned.
-u user_name
Cloud Pak for Data username.
-h
Prints help to the console and exits.

The following example creates a soft link that is named portal, which points to the /opt/ibm/cognos/analytics/webcontent/bi/images/customImages/portal_subdir directory:

export ADMIN_NAME=<platform administrator user name>
export ADMIN_PASSWORD=<platform administrator password>
./image.sh -c add_link -n ${PROJECT_CPD_INST_OPERANDS} -t ${PROJECT_CPD_INSTANCE_TETHERED} -u ${ADMIN_NAME} -p ${ADMIN_PASSWORD} -s portal_subdir -d portal

For more information about creating the image.sh script, see Creating administration scripts.