Installing the IBM IoT for Energy and Utilities environment

This task involves following the menu driven installation tasks.

Before you begin

The procedure requires the ife_custom_ana_spss_service.war file that is delivered in the installation package.

About this task

The menu items must be completed in sequential order:
  • 0-Precheck the env...
  • 1-Encrypt passwords in property file and generate runtime conf files...
  • 2-Generate key files...
  • 3-Deploy a private registry...
  • 4-Set up calico network...
  • 5-Deploy containers...
  • 6-Updating calico network profile

Procedure

  1. Run the command:
    sudo docker run -it -v /install:/data --net=host --name=installer ibmiot/ife.installer setup
    to return the menu with the steps 0 - 6.
  2. Type 0 to check the environment.
    Precheck the env checks the following conditions:
    • The connections between the installation node and all other nodes.
    • The Iptables service is not running on any node.
    • Selinux is disabled.
    • Docker is running on all nodes.
    Note: If you receive an error, Failed to stop iptables.service: Unit iptables.service not loaded or, Selinux.etc is not loaded you can ignore these errors and go to the next step.
    Important: If the precheck fails due to the incorrect information in the nodes.ini file, for example the incorrect IP address, or host name has been entered, then you must manually log into each node, clear the host name mapping that has been added in the /etc/hosts file and correct the nodes.ini file. You must run the prepareEnv command again in Step 8, in Loading of the Docker image and preparing the installation environment..
  3. Run the command to restore the installation menu:
    sudo docker start -i installer
  4. Type 1 to encrypt the passwords for all nodes and to generate the runtime configuration files.

    If this step1 of the menu items fails the cause can be that the encryptKeyString is either too long or too short in length.

    Change the encryptKeyString value to meet the length requirement, which is 16 characters in length. And rerun step1 of the menu item.

  5. Run the command to restore the installation menu:
    sudo docker start -i installer
  6. Type 2 to generate the keystore files for the Liberty server and the SPSS Modeler server to communicate with DB2 Server after SSL connection is enabled.
    If this step2 of the menu items fails, the cause can be due to the password.DBSSLConnKeyPassword is not strong enough to generate an SSL key for DB2 communications. Find the latest backup file for the /install/conf/config.properties<timestamp> before encryption, and open the file to make sure this back up file has the modification you made and that the password strings are not encrypted. Overwrite the original config.properties in the /install/conf directory. For example:
    sudo cp -rf  /install/conf/config.properties<timestamp> /install/conf/config.properties
    Change the password.DBSSLConnKeyPassword value in config.properties, then rerun from step 4, menu item 1.
  7. Run the command to restore the installation menu:
    sudo docker start -i installer
  8. Type 3 to deploy the private registry to all nodes.
    The deploying of the private registry takes approximately 40 minutes to complete.
  9. Run the command to restore the installation menu:
    sudo docker start -i installer
  10. Type 4 to pull calico related image, and to deploy on each node, also create a virtual network for the containers to communicate.
    This step pulls the calico image from the registry and takes approximately 15 minutes.
    If you see an error in this step, go to the other nodes and run the following command:
    sudo calicoctl node status
    The command checks that the STATE of all peers is up and that the INFO is Established to make sure that there is no error.
  11. Run the command to restore the installation menu:
    sudo docker start -i installer
  12. Type 5 to deploy the Docker containers.
    The return message happens before the work on the middleware images is complete. You can continue to the menu item 6 while the menu item 5 is being completed.
  13. Run the command to restore the installation menu:
    sudo docker start -i installer
  14. Type 6 to update the network calico profile.
  15. Do these steps if openId is enabled.
    By default openId is disabled.
    1. These substeps are required to temporary disable the openId authentication to be able to check the application links. As openId authorization requires IBM to register the new application link in the IBM application as described in config.properties file openId might not work in the current status. Go to the AppNode and enter the IFEAppNode container:
      sudo docker exec -it IFEAppNode bash
      su - wlp
      
    2. Go to /opt/IBM/WebSphere/Liberty/usr/servers/framework_server and open server.xml.
    3. Comment out the line <include location="${server.config.dir}/openId.xml" />
      For example:
      <!--    <include location="${server.config.dir}/openId.xml" /> -->
    4. Restart the liberty server with the commands:
      /opt/IBM/WebSphere/Liberty/bin/server stop framework_server
      /opt/IBM/WebSphere/Liberty/bin/server start framework_server	
      
  16. After about 10 minutes, make sure that the backend installation tasks are complete, check the application links.
    Note: When installing a 1+2 configuration, more waiting time may be necessary.
    https://<node of the ip where IFEAppNode container is deployed on>:<exposed port for liberty server in IFEAppNode, default 9443>/ibm. If you have Cognos BI, check the link http://<node of the ip where IFECogNode container is deployed on>:<exposed port for cognos server in IFECogNode, default 9300>/bi

    When both links work well, go to the next step to run postConfig.

    If the Cognos BI link does not work, refer to Cannot access the Cognos BI link

  17. From the installation node, run the command to do the post configuration step:
    sudo docker run -t --rm -v /install:/data --net=host ibmiot/ife.installer postConfig
    This step may take 20 minutes to complete.
  18. Login to App node and run the commands:
    sudo docker exec -it IFEAppNode bash
    /opt/IBM/WebSphere/Liberty/bin/server stop framework_server
    chown -R wlp:wlp /opt/IBM/WebSphere/Liberty/usr/servers/framework_server
    su - wlp -c "/opt/IBM/WebSphere/Liberty/bin/server start framework_server --clean"
    
  19. Go to the SPSS node, or App node for 3nodes topology, and run the commands.
    sudo docker exec -it IFESpssNode bash
    rm -f /opt/IBM/energy/AHI/SPSS_stream/stream/Common/*
    cp /opt/IBM/energy/AHI.bak/SPSS_stream/stream/Common/* /opt/IBM/energy/AHI/SPSS_stream/stream/Common/
    chown -R spss:spss /opt/IBM/energy/AHI /opt/IBM/energy/AIP
  20. Save the ife_custom_ana_spss_service.war file on to the node with IFESpssNode container in the /tmp folder.
  21. Login to the node with IFESpssNode container, and run the commands:
    sudo docker cp /tmp/ife_custom_ana_spss_service.war IFESpssNode:/tmp
    sudo docker exec -it IFESpssNode bash
    cp /tmp/ife_custom_ana_spss_service.war /opt/IBM/WebSphere/Liberty/usr/servers/framework_server/apps/
    chown -R wlp:wlp /opt/IBM/WebSphere/Liberty/usr/servers/framework_server
    su - wlp -c "/opt/IBM/WebSphere/Liberty/bin/server stop framework_server"
    su - wlp -c "/opt/IBM/WebSphere/Liberty/bin/server start framework_server --clean"
  22. Do these steps if you have temporally disabled openId authentication in step 15.
    1. Open /opt/IBM/WebSphere/Liberty/usr/servers/framework_server and open server.xml.
    2. Restore the line <include location="${server.config.dir}/openId.xml" />:
      For example:
      <include location="${server.config.dir}/openId.xml" />
    3. Restart the liberty server with the commands:
      /opt/IBM/WebSphere/Liberty/bin/server stop framework_server
      
      /opt/IBM/WebSphere/Liberty/bin/server start framework_server