Browse Source

Updated documentation

Change-Id: I1527a8cd42dc24ff6f688970c389184f75c0d844
Carmelo Romeo 11 months ago
parent
commit
172d40f0b6
1 changed files with 63 additions and 31 deletions
  1. 63
    31
      README.rst

+ 63
- 31
README.rst View File

@@ -13,52 +13,84 @@ Features
13 13
 
14 14
 * TODO
15 15
 
16
-Enabling in DevStack
17
---------------------
18
-
19
-Add this repo as an external repository into your ``local.conf`` file::
20
-
21
-    [[local|localrc]]
22
-    enable_plugin iotronic_ui https://github.com/openstack/iotronic_ui
23
-
24 16
 Manual Installation
25 17
 -------------------
26 18
 
27 19
 Begin by cloning the Horizon and IoTronic Panels repositories::
28 20
 
29
-    git clone https://github.com/openstack/horizon
30
-    git clone https://github.com/openstack/iotronic_ui
21
+    git clone https://github.com/openstack/horizon.git
22
+    git clone https://github.com/openstack/iotronic-ui.git
23
+
24
+Install IoTronic Panels with all the dependencies::
25
+
26
+    cd iotronic-ui
27
+    pip install -r requirements.txt
28
+    python setup.py install
29
+
30
+Copy the Iotronic API and enable the plugin in Horizon::
31
+
32
+    cp iotronic_ui/api/iotronic.py /usr/share/openstack-dashboard/openstack_dashboard/api/
33
+    cp iotronic_ui/enabled/_60*.py /usr/share/openstack-dashboard/openstack_dashboard/enabled/
34
+
35
+To run horizon with the newly enabled IoTronic Panels plugin restart apache::
31 36
 
32
-Create a virtual environment and install Horizon dependencies::
37
+    systemctl restart apache2.service
33 38
 
34
-    cd horizon
35
-    python tools/install_venv.py
39
+Check the Horizon Login page on your browser and you will see the new Dashboard called "IoT".
36 40
 
37
-Set up your ``local_settings.py`` file::
41
+Extra info
42
+----------
43
+If you want to enable logs for a better debug follow the following steps or just skip them.::
38 44
 
39
-    cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
45
+    mkdir /var/log/horizon
46
+    touch /var/log/horizon/horizon.log
47
+    chown -R horizon:horizon horizon
40 48
 
41
-Open up the copied ``local_settings.py`` file in your preferred text
42
-editor. You will want to customize several settings:
49
+    vim /etc/openstack-dashboard/local_settings.py
43 50
 
44
--  ``OPENSTACK_HOST`` should be configured with the hostname of your
45
-   OpenStack server. Verify that the ``OPENSTACK_KEYSTONE_URL`` and
46
-   ``OPENSTACK_KEYSTONE_DEFAULT_ROLE`` settings are correct for your
47
-   environment. (They should be correct unless you modified your
48
-   OpenStack server to change them.)
51
+        'formatters': {
52
+            'verbose': {
53
+                'format': '%(asctime)s %(process)d %(levelname)s %(name)s %(message)s'
54
+            },
55
+        },
49 56
 
50
-Install IoTronic Panels with all dependencies in your virtual environment::
57
+        ....
51 58
 
52
-    tools/with_venv.sh pip install -e ../iotronic_ui/
59
+        'handlers': {
60
+            ....
61
+            'file': {
62
+                   'level': 'DEBUG',
63
+                   'class': 'logging.FileHandler',
64
+                   'filename': '/var/log/horizon/horizon.log',
65
+                   'formatter': 'verbose',
66
+             },
67
+        },
53 68
 
54
-And enable it in Horizon::
69
+        ....
55 70
 
56
-    ln -s ../iotronic_ui/iotronic_ui/enabled/_90_project_iot_panelgroup.py openstack_dashboard/local/enabled
57
-    ln -s ../iotronic_ui/iotronic_ui/enabled/_91_project_iot_boardss_panel.py openstack_dashboard/local/enabled
71
+        'loggers': {
72
+            ....
73
+            'horizon': {
74
+                ....
75
+                'handlers': ['file'],
76
+                ....
77
+            },
78
+            'openstack_dashboard': {
79
+                ....
80
+                'handlers': ['file'],
81
+                ....
82
+            },
83
+            'iotronic_ui': {
84
+                'handlers': ['file'],
85
+                'level': 'DEBUG',
86
+                'propagate': False,
87
+            },
88
+        }
58 89
 
59
-To run horizon with the newly enabled IoTronic Panels plugin run::
90
+Verify if Apache Openstack Dashboard Configuration file is correctly set with what follows::
60 91
 
61
-    ./run_tests.sh --runserver 0.0.0.0:8080
92
+    vim /etc/apache2/conf-available/openstack-dashboard.conf
93
+        WSGIApplicationGroup %{GLOBAL}
62 94
 
63
-to have the application start on port 8080 and the horizon dashboard will be
64
-available in your browser at http://localhost:8080/
95
+    service apache2 reload
96
+    systemctl restart apache2.service

Loading…
Cancel
Save