How to upgrade Site Controller Version 1.2 to 1.3

Major Changes

Some of the major changes in 1.3.0 include:

  • The file azeti_logging.cfg is obsolete. All logging-related settings are now integrated into SiteController.cfg
  • As a result SiteController.cfg is not compatible between 1.2 and 1.3 - hence a real upgrade is not possible

  • Modules can be defined to autostart in SiteController.cfg or the SensorConfig
  • A new major module is the data_store. This module now takes over the tasks of hd2cloud exporter & cloud connector
  • Status-Command of Site Controller does now include the status of the connection to the external broker and port used / configured
  • Various bugfixes and improved stability 
    • data_store is able to repair a single DB-corruption (Please note: second DB-corruption will break the Site Controller and a manual restart is mandatory)
    • XML-parsing is more robust

Abstract

This guide describes how to remove the currently installed Site Controller in version 1.2 and do a fresh install with the version 1.3 of the Site Controller. After the new version has been installed, the customer will re-apply custom changes from the old installation. An automated approach has not yet been tested to a statisfactory result, therefore the manual approach has to be taken.

This guide will focus on SSH as the means of connecting to system which runs Site Controller. Other means are of course possible and this guide should also apply to them. 

Prerequisites

  1. The customer needs access to the corresponding azeti Control Panel and admin-rights for her / his account
  2. The customers needs ssh-access for the system, which is to be updated.
    1. It is also possible to transfer data (e.g. the installer) via other methods, depending on the system, but this guide will focus on SSH-based access
  3. Installer-Tar.gz for SiteController-1.3 (can be requested in the online Service Desk)
  4. The customer needs to know, where the current version of Site Controller is installed. By default this should be /opt/azeti/SiteController/, but some systems might differ.

Step-by-step guide

Preparing for the new installation

  1. Copy the installer-Tar.gz for Site Controller in version 1.3 onto the system, which will be upgraded.

  2. Connect to the system, which will be updated. 

  3. If you are not root yet, become root.

  4. Change into the directory where the current Site Controller (v1.2) is installed. By default this should be /opt/azeti/SiteController/

  5. Copy the current SiteController.cfg to a location outside of this directory, because we are going to delete this directory later on.

  6. If you made any changes to azeti_logging.cfg you might also want to backup this file as well. 

  7. Stop the running Site Controller - doing this with root-rights is important!

  8. Change to the directory where the installer-Tar.gz resides.

  9. Remove the old directory of the 1.2-installation (keep in mind, that the location might be different for your system)

  10. Extract the archive and change into the resulting new directory

Executing the new Installation and configuring Site Controller

  1. Execute the script setup.sh

  2. During the Installation, you will be asked to provide a serial for the new installation.

  3. Navigate to the installation-directory of the new Site Controller. 

  4. Use your preferred editor to open the file config/SiteController.cfg.


    The following values have to be present, for any Site Controller to start and work:

    1. Serial (This is already set, since it was entered by the customer during the installation)
    2. External-Broker host (e.g. broker.company.example)
    3. organizationsShortName (e.g. QA)
    4. user_id (username of user with gateway-permissions in cloud)
    5. password (password of said user) 

     

  5. Depending on your Site Controller configuration it can be necessary to add or tweak more aspects of the config (eg. RemoteExecutionJobs or which Serial-Interfaces to use for ModBus-devices). Please reference your previously backed up SiteController.cfg

  6. After your changes have been done, save and close the file

Connecting to the azeti Control Panel and redeploying the SensorConfig

  1. Restart the Site Controller (issue the command run_SiteController.py restart with root privileges).

  2.  Navigate to the corresponding azeti Control Panel and log in with an account, which has admin-rights.
  3. Go to Organization → Locations. Since we assigned the same serial to the new installation, we can just redeploy the existing SensorConfig.
  4. Click on the arrow next to the button "Edit" to activate the dropdown-menu.
  5. From the dropdown-menu select "Deployments"

  6. In the deployments-page click on the Shedule-button, to redeploy the SensorConfig.
  7. Execute the deployment (which in reality is a redeployment)
    1. You can check log/ConfigProvider.log for the success of the deployment on your Site Controller
  8. The procedure is now complete. Your system now has the newest version of Site Controller installed and is (re)connected to the azeti Engine.