azeti SiteController Software - All in One installer



Table of Contents

Introduction

This document will describe the Initial setup of Site Controller in a IR910 device. 

Please read the official device installation guide: Overview Documentation from Cisco.com for IR910 before you proceed installing the azeti Software.

  File Modified

PDF File ir910hig.pdf

Jul 18, 2016 by Carsten Fenneker

The All in One installer packages is used to install all neccesary components of the Site controller, including Mosquitto and third party libraries at the same time. It cannot be used for upgrading an installed system as it will overwrite any previous configuration.

Prerequisites

You will need to know the IP of the system and to have access via ssh.

You have the installation files:

  • Site Controller all in one installation file: for installing the Site Controller modules, Mosquitto as well as all necessary python libraries.

Timezone configuration

Before you begin the installation, make sure that you have the system with the right time configuration and a timezone configured in your system. Please read the file /etc/timezone to check that it is including your location. This file should contain a pair (Example: Europe/Berlin), that corresponds to the names that you can find in /usr/share/zoneinfo.


Before you start

Once the system is installed, you will need to do a basic configuration of the system in order to connect to the cloud server. You should have received all the credentials beforehand, contact your provider in case you miss some information.

Installing azeti SiteController

  1. Install the Site Controller:
    1. Uncompress the file with the command

      # tar -xvf nameoffile (Example: tar xvzf SC_all_in_one_installer-armv5tel-62bf7d4)
    2. Execute the script .SC_all_in_one_installer.sh in order to proceed to install the Site Controller modules and all the necessary python libraries.
    3. You will be asked for the following parameters:
      1. serial number. This will be the identifier of the system on the cloud, so choose it according to your infrastructure needs. Just alphanumeric characters are allowed.
      2. Organization Short name
      3. Cloud broker hostname or IP
      4. cloud username
      5. cloud password
    4. Alternatively, this all parameters can be introduced using a system variable before the script. The available parameters are:
      1. AUTOSTART_SITECONTROLLER Set to 1 for auto start the site controller 
      2. USER_ID cloud user id
      3. PASSWORD cloud password
      4. HOST broker hostname or IP
      5. ORG_SHORT_NAME Organization Short name of the user 
      6. SERIAL site identifier
      7. Example: AUTOSTART_SITECONTROLLER=1 USER_ID="broker@azeti.net" PASSWORD="broker.test" HOST="cloud-dev.azeti.net" ORG_SHORT_NAME="azeti" SERIAL="Cisco_IR910_Test_3" ./SC_all_in_one_installer.sh
    5. Read the installation.log file generated in order to check that there were no errors during the installation.

The installation script prepares the system to start every time your device is rebooted. In case you want to change this behavior, the installation script is located in /mnt/apps/etc/init.d, with a prefix and the name SiteController.

Starting the system

If the system was not set to autostart, it should be started after installation. To do that follow this procedure:

  1. Start the MQTT broker and  Site Controller by executing the following commands
    1. Start SiteController and Mosquitto

      #/mnt/data/azeti/SiteController/run_SiteController.py start
    2. Please stay 2 minutes in the terminal after the start of the site controller. If there is a problem in the system the modules will launch an exception. If no exception came in 2 minutes, the system is up and running with no issues.

  2. Once everything is started, you can use the following command to check that all modules are up and running:
    1. SiteController Status, note that required modules should be marked green and running

      # /mnt/data/azeti/SiteController/run_SiteController.py status
      WARNING: section SiteController.conf not contained in SiteController.cfg.
      Time zone set to: Etc/UTC
      Serial of this installation: cisco-sbsa-demo001
      Main version of this installation: 1.1.0_(Build:1228_c300ebc)
      OK: Integrity check passed.
      OK: Module Watchdog.py is running with PID (29410)
      OK: Module cloudConnector.py is running with PID (29457)
      OK: Module HD2CloudExporter.py is running with PID (29495)
      OK: Module ConfigProvider.py is running with PID (29557)
      OK: Module RawResultsDeMux.py is running with PID (29663)
      OK: Module CalibResultsEvaluator.py is running with PID (29702)
      OK: Module JobProcessor.py is running with PID (29736)
      OK: Module AutomationController.py is running with PID (29760)
      OK: Module VirtualSensorProvider.py is running with PID (29799)
      OK: Module ModbusDaemon/ModbusMaster.py is running with PID (29828)
      OK: Module UDPserver_AdvantechAdam60xx.py is running with PID (29882)
      OK: Module trapd.py is running with PID (29910)
      OK: Module snmpgetd.py is running with PID (30021)
      OK: Module http_server.py is running with PID (30096)
      OK: Module persistord.py is running with PID (30140)
      WARNING: Module VS_fill_quantity.py is not running.
      WARNING: Module VS_flow_rate.py is not running.
      WARNING: Module VS_tank_simulator.py is not running.
      WARNING: Module VS_access_control.py is not running.
      WARNING: Module VS_battery_details.py is not running.
      WARNING: Module VS_HistoryAnalyser.py is not running.
      WARNING: Module VS_filesize.py is not running.
      OK: Module mosquitto daemon is running with PID (29365)
  3. Once the system is up and running, and if no errors are appearing in your command line or in the logs, you can proceed to delete the installation compressed files and uncompressed folders to save space in the device. 

Basic configuration options

Once you finish the installation process, you have a basic Site Controller system installed. The system has to be configured in order to do the necessary tasks. You can adjust some configuration, from deciding which modules will run in Site Controller to select some parameters of the different modules. Please read carefully the guides about Site Controller before proceeding to change any configuration of the system. A wrong configuration may cause a failure in the monitoring/actuation system that can affect the overall solution.

Configuration needed:

  • Cloud connection: address and username/password for the cloud connection. You will need to edit the file /mnt/data/azeti/SiteController/config/cloudConnector.cfg 
    The hostorganizationShortName, user_id and password have to be provided by you from the cloud administrators. See an example configuration below.

[ExternalBroker]
host=10.0.0.72
organizationShortName = Test
sub_topics=cloud/%SYSID%/#
user_id=cvd.cisco@azeti.net
password=india.89

  •  Sensor configuration: the file $SiteControllerPath$/config/sensor_config.xml includes the information about all configured devices, sensors and actions. After the system is run, this file can be provided from our cloud interface, manually implemented or published in the MQTT broker.

Production configuration

After you have performed your initial tests on the system, it is time to prepare it for production. It is advisable that you perform the following steps for a production system:

StepDescription
Block incoming access to the local SC Mosquitto MQTT brokerThe broker is initially open to external connections, as there are some tests that have to be done after installation that normally need a technician to connect to the broker. After the installation is done, you may want to block the access to the Mosquitto broker from the outside. This is done in the configuration file of Mosquitto, adding the parameter bind_ address localhost. Please refer to the Mosquitto documentation in http://www.mosquitto.org. In the IR910 the mosquitto configuration file is in  /mnt/apps/etc/mosquitto/mosquitto.conf.
Securing the communications with the cloud

The default installation does not contain certificates. In order to have a secure communication, you will need TLS certificates provided by azeti. Please see the section "Activating TLS connections" below.

Activating TLS connections

  • Copy the "*.pem" files provided to you by azeti to %SiteController%/config.
  • Edit the the port setting in the [ExternalBroker] section in the file cloudConnector.cfg to 8883 (please confirm with your sysadmin that this port is not blocked in your network or if the port must have a different number).
  • Change the setting tls_enable in the [ExternalBroker] section in the file cloudConnector.cfg to True.
Sample External Broker section in SiteController.config
[ExternalBroker]
#azetibroker02 azeti organization
tls_enable=True
host=azetibroker02.azeti.net
organizationShortName = Test
user_id=user.just.test@azeti.net
password=doNotTryIsFake
port=8883

Known issues

  • During the installation process, you will see some errors in the install.log file. This library manages the encryption in several python modules. These errors are due to the lack of a c compiler in the IR910. At the moment of writing, it is not affecting Site Controller basic functionality.
  • If the timezone is not properly configured, you will receive exceptions while starting the system. We require that a timezone is defined for the machine.
  • Under some circumstances, a software update may launch some exception. If this happens, stop the application, stop the broker and restart both to solve the issue.

Troubleshooting

Make sure that enough disk space is available in the IR910 linux environment.

# Show available disk space
Router> df -ah
...

If you receive errors during the first start of the Site Controller regarding non existing modules, it might be that you run out of space during the installation and that the necessary python modules are not installed. Please check the space in the directory where you put the installation files to be sure it has still free space. If not, search for a different suitable directory and repeat the installation process. 

You may want to remove the backups from previous installations that are in /mnt/data/SiteController-install.

Network issues

It may happen that you have restrictions in your network regarding ports and IPs. Contact your system administration department with the following information in order that they solve it:

Access given to the PC that manages the cloud server:

  • To the broker host (IP/Name of the broker host will be provided from azeti): Ports: 61614 (websockets), 8081(websockets),1883 (MQTT broker), 8883 (MQTT broker).
  • To the Cloud (IP/Name of the front-end host will be provided from azeti): Ports: 80 (web),443 (web)
Access given to the IR910:
  • To the broker host (IP/Name of the broker host will be provided from azeti): Ports: 1883 (MQTT broker), 8883 (MQTT broker).

Check the version installed

If you have a site controller but you do not know which version is installed, look in the root folder of Site Controller. There is a file called SiteController-rev-info.txt, which include the version and build of the software. This information will be useful in case you contact support and cannot provide direct access to the system.

Contact our support service (support@azeti.net) in case you do not manage to proceed with the installation. Be prepared to give our technicians direct or remote ssh access to the system.