
This change aligns the Mistral documents folder structure to the one specified for Pike [1]. Documents were move to thir appropriate folder, but the different guides do not follow their cookie cutted structure yet. Install guide is in a separate change [2], while I could not found the cookie cutter for the rest of the guides. test-requirements.txt updated with the missing modules. tox_install.sh modified to do not pass $MODULE_NAME and -e parameter to edit-constraints. [1]: http://specs.openstack.org/openstack/docs-specs/specs/pike/os-manuals-migration.html [2]: https://review.openstack.org/#/c/476499/ [3]: https://etherpad.openstack.org/p/doc-migration-tracking Change-Id: Ia1101fa2eada446d8eebfefa9bd15d8facd8b3b0 Depends-On: Ia750cb049c0f53a234ea70ce1f2bbbb7a2aa9454 Signed-off-by: csatari <gergely.csatari@nokia.com>
72 lines
2.3 KiB
ReStructuredText
72 lines
2.3 KiB
ReStructuredText
Troubleshooting And Debugging
|
|
=============================
|
|
|
|
Mistral-Dashboard debug instructions
|
|
------------------------------------
|
|
|
|
**Pycharm**
|
|
|
|
Debugging OpenStack Mistral-Dashboard is the same
|
|
as debugging OpenStack Horizon.
|
|
The following instructions should get you sorted to debug both on the same run.
|
|
|
|
Set PyCharm debug settings:
|
|
|
|
1. Under File > Settings > Languages and Framework > Django - Enter the following:
|
|
|
|
a. Check "Enable Django Support"
|
|
b. Django project root: your file system path to Horizon project root
|
|
c. Settings: openstack_dashboard/settings.py (under your Horizon folder)
|
|
d. Manage script: manage.py (also in your horizon folder)
|
|
e. Click OK
|
|
|
|
.. image:: ../img/Mistral_dashboard_django_settings.png
|
|
|
|
2. Enter debug configurations menu, using the tiny arrow pointing down,
|
|
left to the "play" icon, or under the run menu
|
|
|
|
.. image:: ../img/Pycharm_run_config_menu.png
|
|
|
|
3. In the new window, click the green plus icon and then select "Django server"
|
|
to create a new Django Server configuration.
|
|
|
|
4. In the new window appeared:
|
|
|
|
a. Name that configuration Horizon
|
|
b. Enter some port so it won't run on the default (for example - port: 4000)
|
|
|
|
.. image:: ../img/Mistral_dashboard_debug_config.png
|
|
|
|
5. Click on Environment variables button, then in the new window:
|
|
|
|
a. Make sure you have PYTHONUNBUFFERED set as 1
|
|
b. Create a new pair - DJANGO_SETTINGS_MODULE : openstack_dashboard.settings
|
|
c. When finished click OK.
|
|
|
|
.. image:: ../img/Mistral_dashboard_environment_variables.png
|
|
|
|
|
|
You should now be able to debug and run the project using PyCharm.
|
|
PyCharm will listen to any changes you make
|
|
and restart the Horizon server automatically.
|
|
|
|
**Note**: When executing the project via PyCharm Run / Debug,
|
|
you could get an error page
|
|
after trying to login: "Page not found (404)".
|
|
To resolve that - remove the port from the browser URL bar,
|
|
then login.
|
|
You should be able to login without it.
|
|
After a successful login bring the port back - it will continue your session.
|
|
|
|
**Further notes**
|
|
|
|
- If you need help with PyCharm and general debugging, please refer to:
|
|
`JetBrains PyCharm developer guide <https://www.jetbrains.com/pycharm/help/debugging.html.>`_
|
|
|
|
- If you would like to manually restart the apache server,
|
|
open a terminal and run::
|
|
|
|
$ sudo service apache2 restart
|
|
|
|
*(if not under Ubuntu, replace "sudo" with an identical command)*
|