IBM Support

Local storage script

Set up Kubernetes local volume StorageClasses and PersistentVolumes (PVs).

Overview

The createStorageAllNodes.sh script helps you set up Kubernetes local volume StorageClasses and PersistentVolumes (PVs), which are required by Netcool Operations Insight running on Red Hat OpenShift. The script generates PVs using local storage. The PVs are mapped volumes that are mapped to directories off the root file system on the parent node. Local storage volumes are only intended for proof of concept (PoC) or demonstration environments. Do not use in production environments. For production systems, consult with your system administrator for a file system with the required performance, scale, and redundancy requirements.

Before you begin

Ensure the following:

  • You are logged in to a control plane node of your cluster.
  • The Alpine Linux image is available.
  • You are using the default namespace.

See the troubleshooting section if you experience problems.

Creating local storage volumes

  • Create storage classes.

The script creates the following storage classes: [release]-local-storage-cassandra [release]-local-storage-cassandra-bak [release]-local-storage-kafka [release]-local-storage-zookeeper [release]-local-storage-couchdb [release]-local-storage-db2 [release]-local-storage-impactgui [release]-local-storage-ncobackup [release]-local-storage-ncoprimary [release]-local-storage-openldap [release]-local-storage-scala [release]-local-storage-nciserver

  • Create PVs.

The script creates the following PVs for each node: [release]-local-storage-cassandra-[node] [release]-local-storage-cassandra-bak-[node] [release]-local-storage-kafka-[node] [release]-local-storage-zookeeper-[node] [release]-local-storage-couchdb-[node] [release]-local-storage-db2-[node] [release]-local-storage-impactgui-[node] [release]-local-storage-ncobackup-[node] [release]-local-storage-ncoprimary-[node] [release]-local-storage-openldap-[node] [release]-local-storage-scala-[node] [release]-local-storage-nciserver-[node]

  • Create directories.

On each worker node, the script creates directories under the root directory: [root]/[release]/cassandra [root]/[release]/cassandra-bak [root]/[release]/kafka [root]/[release]/zookeeper [root]/[release]/couchdb [root]/[release]/db2 [root]/[release]/impactgui [root]/[release]/ncoprimary [root]/[release]/ncobackup [root]/[release]/openldap [root]/[release]/scala [root]/[release]/nciserver

The script can either automatically create required storage classes, PVs, and directories. Or, the script can output a YAML template, which can be used with the kubectl create -f command.

Deleting local volumes

In addition to creating local storage artifacts, the script also outputs a delete script called deleteStorageAllNodes.sh, which removes all artifacts created by the createStorageAllNodes.sh script.

Create script usage

%> ./createStorageAllNodes.sh -h This script will create local Storage Classes, Persistent Volumes and Directories required by Netcool Operations Insight Usage: ./createStorageAllNodes.sh [-dnryh] [-d base directory path] [-n nodes] [-r release name] [-y yaml output only] [-s silent mode] [-h help]

Examples

Create storage on all worker nodes

The following example creates storage for a Netcool Operations Insight release called noi with a root directory path on each worker node of the /home/netcool/ibm-netcool/prod path. A deleteStorageAllNodes.sh delete script is also created. %> ./createStorageAllNodes.sh -d /home/netcool/ibm-netcool-prod

Create storage on a specified node

The following example creates storage for a Netcool Operations Insight release called noi with a root directory path on each worker node of the /home/netcool/ibm-netcool/prod path. A deleteStorageAllNodes.sh delete script is also created. %> ./createStorageAllNodes.sh -n "10.2.3.4 10.2.3.5"

Create YAML template

The following example outputs a YAML template file noi-storage.yaml, which can be used with the kubectl create -f command to create storage for a Netcool Operations Insight release called noi with a root directory of /root/ibm-netcool-prod. No delete script is created. Instead, the storage artifacts can be removed by running the kubectl delete -f noi-storage.yaml command. Note: This example does not remove the storage directories on the nodes. They must be removed manually.
  %> ./createStorageAllNodes.sh -y > noi-storage.yaml  

Delete script usage

  ./deleteStorageAllNodes.sh -h  This script will delete PVCs, PVs, Storage Classes and directories created by ./createStorageAllNodes.sh  Usage:  ./deleteStorageAllNodes.sh [-sy]   [ -s silent mode ]   [ -y yaml only ]   [ -h help ]  

Troubleshooting

Default namespace

The script is intended to run in the default namespace. When you run the script in a different namespace, ensure that the namespace has the correct privileges to create the following Kubernetes artifacts:
  • Storage classes
  • PVs
  • Directories

Alpine linux

The script requires the alpine image in order to create directories on worker nodes. If the cluster does not have a connection to docker hub, the createStorageAllNodes.sh script hangs:

Script hangs when PVs are deleted.

First, check that there are no PVCs bound to the PV, as these bound PVCs prevent the PV from being deleted. Second, editing the PV and removing the finalizer allows the PVC to be deleted, for example:
  kubectl patch pv [name] -p '{"metadata":{"finalizers":null}}'  
Multiple PVs can be deleted with the following command:
  kubectl get pv | cut -f1 -d' ' | grep [release] | grep -v NAME | xargs kubectl patch pv -p '{"metadata":{"finalizers":null}}'

Released: 31 October 2019
Updated: 13 Jan 2023
Version: N/A
Cost: No Charge
Support: Not Supported
Download license: L-JROZ-72S5LA

Resources

Requirements

  • IBM Netcool Operations Insights V1.6.1 or later on Red Hat OpenShift

Support

This package is subject to the license terms included, along with those terms displayed upon download. To report a problem with deploying this entry, entitled customers can contact the country-specific IBM support channel, reference the IBM worldwide directory.

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSTPTP","label":"Netcool Operations Insight"},"ARM Category":[{"code":"a8m500000008a6cAAA","label":"NOI Netcool Operations Insights"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

More support for:
Netcool Operations Insight

Component:
NOI Netcool Operations Insights

Software version:
All Version(s)

Document number:
6245752

Modified date:
04 July 2023

UID

ibm16245752

Manage My Notification Subscriptions