Browse Source

New README

Installation guide has been updated.

Change-Id: If20b07e2a946ff55d97d562dd042a40e4a73dbda
tags/0.3.5
Fabio Verboso 10 months ago
parent
commit
40dbce7e69
1 changed files with 41 additions and 46 deletions
  1. 41
    46
      README.rst

+ 41
- 46
README.rst View File

@@ -29,9 +29,9 @@ According to the `Openstack Documentation <https://docs.openstack.org/>`_ instal
29 29
 - Message queue
30 30
 - Memcached
31 31
 - Keystone
32
-   
32
+
33 33
 Creation of the database
34
-----------------------
34
+-------------------------
35 35
 On the dbms create the iotronic db and configure the access for the user iotronic::
36 36
 
37 37
     MariaDB [(none)]> CREATE DATABASE iotronic;
@@ -49,13 +49,13 @@ Add the user and the enpoints on Keystone::
49 49
     openstack role add manager_iot_project
50 50
     openstack role add user_iot
51 51
 
52
-    openstack endpoint create --region RegionOne iot public http://IP_IOTRONIC:1288
53
-    openstack endpoint create --region RegionOne iot internal http://IP_IOTRONIC:1288
54
-    openstack endpoint create --region RegionOne iot admin http://1IP_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:8812
54
+    openstack endpoint create --region RegionOne iot admin http://1IP_IOTRONIC:8812
55 55
 
56 56
 
57 57
 Configuring Iotronic Host 
58
-----------------------
58
+--------------------------
59 59
 
60 60
 Crossbar
61 61
 ^^^^^^^^^^^^^^^^^^^^^
@@ -68,74 +68,69 @@ Get the source::
68 68
 
69 69
     git clone https://github.com/openstack/iotronic.git
70 70
 
71
-install the python-mysqldb::
72
-
73
-    sudo apt-get install python-mysqldb 
71
+add the user iotronic::
72
+    
73
+    useradd -m -d /var/lib/iotronic iotronic
74 74
 
75 75
 and Iotronic::
76 76
 
77 77
     cd iotronic
78
-    sudo pip install -r requirements.txt
79
-    sudo pip install twisted
80
-    sudo pip install paramiko
81
-    sudo python setup.py install
78
+    pip3 install -r requirements.txt 
79
+    python3 setup.py install
82 80
 
83 81
 create a log dir::
84 82
 
85 83
     mkdir -p /var/log/iotronic
84
+    chown -R iotronic:iotronic /var/log/iotronic/
85
+
86
+edit ``/etc/iotronic/iotronic.conf`` with the correct configuration::
87
+    
88
+    nano /etc/iotronic/iotronic.conf 
89
+
90
+There is just one wamp-agent and it must be set as the registration agent::
91
+ 
92
+  register_agent = True
86 93
 
87 94
 populate the database::
88 95
 
89
-    cd iotronic/utils
90
-    ./loaddb MYSQL_IP_ON_CONTROLLER
96
+    iotronic-dbsync
97
+
91 98
 
92 99
 API Service Configuration
93
-^^^^^^^^^^^^^^^^^^^^^
100
+^^^^^^^^^^^^^^^^^^^^^^^^^^
94 101
 Install apache and the other components::
95 102
 
96
-sudo 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
 
98
-create ``/etc/apache2/conf-enabled/iotronic.conf`` and copy the following content::
105
+create log directory::
99 106
 
100
-    Listen 1288
101
-    <VirtualHost *:1288>
102
-        WSGIDaemonProcess iotronic 
103
-        #user=root group=root threads=10 display-name=%{GROUP}
104
-        WSGIScriptAlias / /var/www/cgi-bin/iotronic/app.wsgi
107
+    touch /var/log/iotronic/iotronic-api_error.log
108
+    touch /var/log/iotronic/iotronic-api_access.log
109
+    chown -R iotronic:iotronic /var/log/iotronic/
105 110
 
106
-        #SetEnv APACHE_RUN_USER stack
107
-        #SetEnv APACHE_RUN_GROUP stack
108
-        WSGIProcessGroup iotronic
111
+copy the config apache2 file::
109 112
 
110
-        ErrorLog /var/log/iotronic/iotronic-api_error.log
111
-        LogLevel debug
112
-        CustomLog /var/log/iotronic/iotronic-api_access.log combined
113
+    cp etc/apache2/iotronic.conf /etc/apache2/sites-available/iotronic.conf
113 114
 
114
-        <Directory /etc/iotronic>
115
-            WSGIProcessGroup iotronic
116
-            WSGIApplicationGroup %{GLOBAL}
117
-            AllowOverride All
118
-            Require all granted
119
-        </Directory>
120
-    </VirtualHost>
115
+enable the configuration::
121 116
 
122
-edit ``/etc/iotronic/iotronic.conf`` with the correct configuration.
123
-
124
-There is just one wamp-agent and it must be set as the registration agent::
125
- 
126
-  register_agent = True
117
+    a2ensite /etc/apache2/sites-available/iotronic.conf
127 118
 
128 119
 restart apache::
129 120
   
130 121
   systemctl restart apache2
131 122
 
132
-Start the service (better use screen)::
133 123
 
134
-  screen -S conductor
135
-  iotronic-conductor
124
+Starting
125
+^^^^^^^^^^^^^^^^^^^^^
126
+Start 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
 
140 135
 Board Side 
141 136
 ----------------------

Loading…
Cancel
Save