summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Verboso <fverboso@unime.it>2018-09-20 10:20:01 +0200
committerFabio Verboso <fverboso@unime.it>2018-09-20 10:20:01 +0200
commit40dbce7e69dd6893a2c9a8294521f0e4187f5cb5 (patch)
treeb351adf64f2a7838ac6a4f705d82d2d0d2ddd6d2
parent094eae78515bae20ffcb8761df0167f4c2fdd287 (diff)
New README
Installation guide has been updated. Change-Id: If20b07e2a946ff55d97d562dd042a40e4a73dbda
Notes
Notes (review): Code-Review+2: Fabio Verboso <fverboso@unime.it> Workflow+1: Fabio Verboso <fverboso@unime.it> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Thu, 20 Sep 2018 11:04:09 +0000 Reviewed-on: https://review.openstack.org/604015 Project: openstack/iotronic Branch: refs/heads/master
-rw-r--r--README.rst87
1 files changed, 41 insertions, 46 deletions
diff --git a/README.rst b/README.rst
index 5bf96ab..5e4219b 100644
--- a/README.rst
+++ b/README.rst
@@ -29,9 +29,9 @@ According to the `Openstack Documentation <https://docs.openstack.org/>`_ instal
29- Message queue 29- Message queue
30- Memcached 30- Memcached
31- Keystone 31- Keystone
32 32
33Creation of the database 33Creation of the database
34---------------------- 34-------------------------
35On the dbms create the iotronic db and configure the access for the user iotronic:: 35On the dbms create the iotronic db and configure the access for the user iotronic::
36 36
37 MariaDB [(none)]> CREATE DATABASE iotronic; 37 MariaDB [(none)]> CREATE DATABASE iotronic;
@@ -49,13 +49,13 @@ Add the user and the enpoints on Keystone::
49 openstack role add manager_iot_project 49 openstack role add manager_iot_project
50 openstack role add user_iot 50 openstack role add user_iot
51 51
52 openstack endpoint create --region RegionOne iot public http://IP_IOTRONIC:1288 52 openstack endpoint create --region RegionOne iot public http://IP_IOTRONIC:8812
53 openstack endpoint create --region RegionOne iot internal http://IP_IOTRONIC:1288 53 openstack endpoint create --region RegionOne iot internal http://IP_IOTRONIC:8812
54 openstack endpoint create --region RegionOne iot admin http://1IP_IOTRONIC:1288 54 openstack endpoint create --region RegionOne iot admin http://1IP_IOTRONIC:8812
55 55
56 56
57Configuring Iotronic Host 57Configuring Iotronic Host
58---------------------- 58--------------------------
59 59
60Crossbar 60Crossbar
61^^^^^^^^^^^^^^^^^^^^^ 61^^^^^^^^^^^^^^^^^^^^^
@@ -68,74 +68,69 @@ Get the source::
68 68
69 git clone https://github.com/openstack/iotronic.git 69 git clone https://github.com/openstack/iotronic.git
70 70
71install the python-mysqldb:: 71add the user iotronic::
72 72
73 sudo apt-get install python-mysqldb 73 useradd -m -d /var/lib/iotronic iotronic
74 74
75and Iotronic:: 75and Iotronic::
76 76
77 cd iotronic 77 cd iotronic
78 sudo pip install -r requirements.txt 78 pip3 install -r requirements.txt
79 sudo pip install twisted 79 python3 setup.py install
80 sudo pip install paramiko
81 sudo python setup.py install
82 80
83create a log dir:: 81create a log dir::
84 82
85 mkdir -p /var/log/iotronic 83 mkdir -p /var/log/iotronic
84 chown -R iotronic:iotronic /var/log/iotronic/
85
86edit ``/etc/iotronic/iotronic.conf`` with the correct configuration::
87
88 nano /etc/iotronic/iotronic.conf
89
90There is just one wamp-agent and it must be set as the registration agent::
91
92 register_agent = True
86 93
87populate the database:: 94populate the database::
88 95
89 cd iotronic/utils 96 iotronic-dbsync
90 ./loaddb MYSQL_IP_ON_CONTROLLER 97
91 98
92API Service Configuration 99API Service Configuration
93^^^^^^^^^^^^^^^^^^^^^ 100^^^^^^^^^^^^^^^^^^^^^^^^^^
94Install apache and the other components:: 101Install apache and the other components::
95 102
96sudo apt-get install apache2 python-setuptools libapache2-mod-wsgi libssl-dev 103 sudo apt-get install apache2 python-setuptools libapache2-mod-wsgi-py3
97 104
98create ``/etc/apache2/conf-enabled/iotronic.conf`` and copy the following content:: 105create log directory::
99 106
100 Listen 1288 107 touch /var/log/iotronic/iotronic-api_error.log
101 <VirtualHost *:1288> 108 touch /var/log/iotronic/iotronic-api_access.log
102 WSGIDaemonProcess iotronic 109 chown -R iotronic:iotronic /var/log/iotronic/
103 #user=root group=root threads=10 display-name=%{GROUP}
104 WSGIScriptAlias / /var/www/cgi-bin/iotronic/app.wsgi
105 110
106 #SetEnv APACHE_RUN_USER stack 111copy the config apache2 file::
107 #SetEnv APACHE_RUN_GROUP stack
108 WSGIProcessGroup iotronic
109 112
110 ErrorLog /var/log/iotronic/iotronic-api_error.log 113 cp etc/apache2/iotronic.conf /etc/apache2/sites-available/iotronic.conf
111 LogLevel debug
112 CustomLog /var/log/iotronic/iotronic-api_access.log combined
113 114
114 <Directory /etc/iotronic> 115enable the configuration::
115 WSGIProcessGroup iotronic
116 WSGIApplicationGroup %{GLOBAL}
117 AllowOverride All
118 Require all granted
119 </Directory>
120 </VirtualHost>
121 116
122edit ``/etc/iotronic/iotronic.conf`` with the correct configuration. 117 a2ensite /etc/apache2/sites-available/iotronic.conf
123
124There is just one wamp-agent and it must be set as the registration agent::
125
126 register_agent = True
127 118
128restart apache:: 119restart apache::
129 120
130 systemctl restart apache2 121 systemctl restart apache2
131 122
132Start the service (better use screen)::
133 123
134 screen -S conductor 124Starting
135 iotronic-conductor 125^^^^^^^^^^^^^^^^^^^^^
126Start the service::
127
128 systemctl enable iotronic-wamp-agent
129 systemctl start iotronic-wamp-agent
130
131 systemctl enable iotronic-conductor
132 systemctl start iotronic-conductor
136 133
137 screen -S agent
138 iotronic-wamp-agent
139 134
140Board Side 135Board Side
141---------------------- 136----------------------