Deployment Instructions of SMG2.0

This is the installation guide for SMG2.0 on any Linux based system. E.g (Raspberry Pi, Odroid board etc.)

Step 1: Download SMG2.zip file.

  • Setup ssh connection with the board where you want to deploy SMG2.0 (Raspberry Pi, Odroid board etc.)
  • Once the connection is established, download smg2.zip into the opt folder as super user and unzip it.

$ cd /opt          $ unzip smg2.zip

  • Make sure that the following core bundles are inside opt folder:
    -actuatorclient.dummy
    -actuatormaster.impl
    -actuatormaster.api
    -ambulance.impl
    -ambulance.api
    -config.lib
    -containermanager.impl
    -containermanager.api
    -informationbroker.impl
    -informationbroker.api
    -remoteframework.lib
    -smg.schemas
    -sqltools.lib
    -usermanager.impl
    -usermanager.api

Step 2: Install additional softwares required for SMG2.0:

  • Install JRE 1.7:

$ apt-get install openjdk-7-jre

  • Install mysql for backend support, run the following script:

$ apt-get install mysql-server

NOTE: Mysql setup will ask for creating or changing the password for the root. Remember this password, you will require it during the DB tables setup.

  • Install rabbitmq version 3.0 or newer and start rabbitmq using scripts:

$ apt-get install rabbitmq-server

$ sudo service rabbitmq-server start

  • Install phpmyadmin for the ease of viewing DB tables (not mandatory). Select apache2 server

$ sudo apt-get install phpmyadmin

  • To make sure that the installation is complete, access database through web browser. Type IP address of the board/raspberry pi in the web browser. For instance 192.168.21.225/phpmyadmin.
  • If phpmyadmin is not accessible, run the command below

$ dbkg-reconfigure phpmyadmin

Step 3: Setup database tables for SMG2.0:

  • Login to phpmyadmin, using the password created during mysql installation.
  • Create a new database using utf8_unicode_ci as collation. For instance, “smg2”.
  • Create a new user for the database. Go to home (small house underneath the phpMyAdmin sign) -> user -> add user

For instance: username:smguser

host: select any host

password: smg

global privileges: all 

  • Set up tables in the newly created database by import smg2.sql from  smg2/intialTables folder.

Step 4: Configure SMG2.0:

  • Start felix and all the osgi bundles in smg2 using command:  $ ./start
  • Check for the status of bundles using command: $ lb

Hurray! you have successfully deployed SMG2.0.