Internet of Things resource management service for OpenStack clouds.
Go to file
Vu Cong Tuan 19e56c0064 Update "auth_url"
Following the change in Keystone Install Guide [1],
this patch replace port 35357 with 5000 for "auth_url".

For more details, please check similar changes which have been done
on other projects: Nova [2], Neutron [3], Cinder [4], Glance [5].

In addition, update deprecated "auth_uri" to "www_authenticate_uri",
according to [6].

[1] https://review.openstack.org/#/c/541857
[2] https://review.openstack.org/#/c/562812
[3] https://review.openstack.org/#/c/566491
[4] https://review.openstack.org/#/c/565464
[5] https://review.openstack.org/#/c/558932
[6] https://review.openstack.org/#/c/508522

Change-Id: I57ee0008e5b6eef2c289cfa029f51c920124d489
2018-05-11 10:00:39 +07:00
doc/source Applied cookiecutter template 2016-03-16 01:26:16 +01:00
etc Update "auth_url" 2018-05-11 10:00:39 +07:00
iotronic Update "auth_url" 2018-05-11 10:00:39 +07:00
utils Fix db 2018-05-08 13:17:48 +02:00
.gitignore general fixes and checks 2017-04-03 19:03:02 +02:00
.gitreview Applied cookiecutter template 2016-03-16 01:26:16 +01:00
CONTRIBUTING.rst Applied cookiecutter template 2016-03-16 01:26:16 +01:00
HACKING.rst Applied cookiecutter template 2016-03-16 01:26:16 +01:00
LICENSE Applied cookiecutter template 2016-03-16 01:26:16 +01:00
MANIFEST.in Applied cookiecutter template 2016-03-16 01:26:16 +01:00
README.rst new README 2017-05-09 12:06:43 +02:00
babel.cfg Applied cookiecutter template 2016-03-16 01:26:16 +01:00
requirements.txt Moved to python3.5 2018-02-06 13:04:16 +01:00
setup.cfg Moved to python3.5 2018-02-06 13:04:16 +01:00
setup.py Applied cookiecutter template 2016-03-16 01:26:16 +01:00
test-requirements.txt Moved to python3.5 2018-02-06 13:04:16 +01:00
tox.ini Moved to python3.5 2018-02-06 13:04:16 +01:00

README.rst

IoTronic

IoTronic is an Internet of Things resource management service for OpenStack clouds.

IoTronic allows to manage Internet of Things resources as part of an OpenStack data center.

Contents:

Basic scenario

For this installation of the Iotronic Service we are considering a scenario with the following hosts and softwares:

  • Controller ( Ubuntu linux): Mysql, Keystone, Rabbitmq
  • Iotronic ( Ubuntu linux ): Iotronic-conductor, iotronic-wamp-agent, crossbar
  • Board: iotronic-lightining-rod

Controller host setup

According to the Openstack Documentation install the following softwares on the controller host:

  • SQL database
  • Message queue
  • Memcached
  • Keystone

Creation of the database ----------------------On the dbms create the iotronic db and configure the access for the user iotronic:

MariaDB [(none)]> CREATE DATABASE iotronic;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON iotronic.* TO iotronic@'localhost' IDENTIFIED BY IOTRONIC_DBPASS;
MariaDB [(none)]> GRANT ALL PRIVILEGES ON iotronic.* TO iotronic@'%' IDENTIFIED BY IOTRONIC_DBPASS;

Add the user and the enpoints on Keystone:

source adminrc
openstack service create iot --name Iotronic
openstack user create --password-prompt iotronic

openstack role add --project service --user iotronic admin
openstack role add admin_iot_project
openstack role add manager_iot_project
openstack role add user_iot

openstack endpoint create --region RegionOne iot public http://IP_IOTRONIC:1288
openstack endpoint create --region RegionOne iot internal http://IP_IOTRONIC:1288
openstack endpoint create --region RegionOne iot admin http://1IP_IOTRONIC:1288

Configuring Iotronic Host ----------------------

Crossbar

Install crossbar on the Iotronic host following the official guide

Iotronic Installation

Get the source:

git clone https://github.com/openstack/iotronic.git

install the python-mysqldb:

sudo apt-get install python-mysqldb 

and Iotronic:

cd iotronic
sudo pip install -r requirements.txt
sudo pip install twisted
sudo pip install paramiko
sudo python setup.py install

create a log dir:

mkdir -p /var/log/iotronic

populate the database:

cd iotronic/utils
./loaddb MYSQL_IP_ON_CONTROLLER

API Service Configuration ^^^^^^^^^^^^^^^^^^^^^ Install apache and the other components:

sudo apt-get install apache2 python-setuptools libapache2-mod-wsgi libssl-dev

create /etc/apache2/conf-enabled/iotronic.conf and copy the following content:

Listen 1288
<VirtualHost *:1288>
    WSGIDaemonProcess iotronic 
    #user=root group=root threads=10 display-name=%{GROUP}
    WSGIScriptAlias / /var/www/cgi-bin/iotronic/app.wsgi

    #SetEnv APACHE_RUN_USER stack
    #SetEnv APACHE_RUN_GROUP stack
    WSGIProcessGroup iotronic

    ErrorLog /var/log/iotronic/iotronic-api_error.log
    LogLevel debug
    CustomLog /var/log/iotronic/iotronic-api_access.log combined

    <Directory /etc/iotronic>
        WSGIProcessGroup iotronic
        WSGIApplicationGroup %{GLOBAL}
        AllowOverride All
        Require all granted
    </Directory>
</VirtualHost>

edit /etc/iotronic/iotronic.conf with the correct configuration.

There is just one wamp-agent and it must be set as the registration agent:

register_agent = True

restart apache:

systemctl restart apache2

Start the service (better use screen):

screen -S conductor
iotronic-conductor

screen -S agent
iotronic-wamp-agent

Board Side

Follow the iotronic-lightning-rod README