7 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov
25047cd997 Fix horizon distro installation for EL
RDO is installing Horizon not under site-packages, but under /usr/share
which makes it completely different logic, with default horizon-manage
not working, as it can not import openstack_dashboard now, as

Change-Id: I4c06b4b5a206b087a9fce856f5fec936e058e3f8
2024-06-04 19:47:13 +02:00
Dmitriy Rabotyagov
3c20e3607e Improve defining horizon_lib_dir
Instead of hardcoding lib directory for distro installs, we can
retrieve it dynamically based on the horizon.__file__ output

Change-Id: I8e87f9a9945b7526c90ca8c4dc09e43a86ab62e0
Closes-Bug: #1950798
2022-02-04 11:40:17 +00:00
Dmitriy Rabotyagov
9c3c776c7a Switch SESSION_ENGINE to memcached
Previously we were using cached_db session backend by default.
However with django version update, it requires more recent
mysqlclient module which is not part of requirements.
Moreover usage of cached_db makes us to carry and maintain
extra stuff, which can be dropped with memcached backend.

Change-Id: I8df7ee967d8dcbeb09a42fd568f98acc3e88adad
2019-12-18 19:52:38 +02:00
Jesse Pretorius
53e79276c9 Rename SUSE vars file and remove mysql-python
The SUSE builds are failing due to a change in the galera_client
role causing the trove role's vars file to be found before the
galera_client vars file. We therefore rename the trove vars file
for SUSE. This also makes transitions between versions easier.

The mysql-python package is no longer maintained. We are using
pymysql instead, so this package does not need to be installed.
This resolves current build failures due to the mysql-python
package not being installable due to the new version of MariaDB
being used.

With this, we also switch django to use pymysql and ensure that
the appropriate distribution package is installed when doing
distro builds.

Depends-On: https://review.openstack.org/602924
Change-Id: I020678e0beb131836e3006e46eec22c02977f8ec
2018-09-15 20:53:09 -06:00
Jimmy McCrory
4559edf920 Only install to virtual environment
Remove all tasks and variables related to toggling between installation
of horizon inside or outside of a Python virtual environment.
Installing within a venv is now the only supported deployment.

Additionally, a few changes have been made to make the creation of the
venv more resistant to interruptions during a run of the role.
* unarchiving a pre-built venv will now also occur when the venv
  directory is created, not only after being downloaded
* virtualenv-tools is run against both pre-built and non pre-built venvs
  to account for interruptions during or prior to unarchiving

Change-Id: I8f5d33b90cc2c41beca2067f0f99d8c1283021e4
Implements: blueprint only-install-venvs
2016-07-08 06:16:12 -07:00
Matt Thompson
7d01073884 Remove venv activation code
This commit uses the pattern established in [1] to remove the venv
activation code by using the correct venv Python interpreter instead.

Note that using python-path in openstack_dashboard.conf.j2 does not
achieve full isolation from the host's python installation as we'd hope
(the path will still include /usr/local/lib/python2.7/dist-packages and
/usr/lib/python2.7/dist-packages), but every attempt at using
python-home failed due to the venv interpreter not being able to find
argparse.  We will need to spend some additional cycles here trying to
solve this as locking the venv interpreter into its own site-packages
is the best solution long-term.

[1] https://review.openstack.org/#/c/273943/

Change-Id: I0fbb8b9b070d1a0ab5cd55abfcc6587a0cd8957d
2016-03-03 13:55:50 +00:00
Kevin Carter
61827ccfbd Implement horizon venv support
This commit conditionally allows the os_horizon role to
install build and deploy within a venv. This is the new
default behavior of the role however the functionality
can be disabled.

Change-Id: I136eed8bd40f4ae5bc77f3fa925e4cbc6f842271
Implements: blueprint enable-venv-support-within-the-roles
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2015-10-13 20:12:43 +00:00