Commit Graph

47 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov a4ecbfc6dc Fix linters and metadata
With update of ansible-lint to version >=6.0.0 a lot of new
linters were added, that enabled by default. In order to comply
with linter rules we're applying changes to the role.

With that we also update metdata to reflect current state.

Change-Id: I40ff3ec0393bf90836d943fc09e74d6a5f207b48
2023-07-17 10:25:45 +02:00
Kevin Carter 8f8a84f15c Add uwsgi option to horizon
This change provides the horizon role the ability to deploy its services
using uWSGI instead of apache. This feature produces a minimal horizon
deployment which is perfectly functional in cases where capabilities
like federation and SSL terminated all the way through are not needed.

Change-Id: I457a111511543731746d868ae7f7184743e5703b
Signed-off-by: Kevin Carter <kevin@cloudnull.com>
2022-09-21 01:18:34 +00:00
Zuul 1ed0cea42a Merge "Improve defining horizon_lib_dir" 2022-04-27 19:10:47 +00: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
Jonathan Rosser a470557e44 Only support python3 for apache wsgi module
Remove logic supporting python2.

Change-Id: I6897713f1a46311944a384e31fb9caefb27acf4f
2022-02-02 04:43:35 -05:00
Jonathan Rosser 5e702329d5 Remove references to unsupported operating systems
All references to Gentoo, SUSE, Debian stretch and Centos-7  are removed.
Conditional tasks, ternary operators and variables are simplified where possible
OS specific variables files are generalised where possible

Change-Id: I31c5e6cde00cdb7addcc0cb4b1c7a13529ce1e60
2021-03-10 12:18:02 +00:00
Jonathan Rosser 9c8062fb51 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: Ia8eca0c54079f96f1160ac88670392794e7f747a
2021-02-26 22:53:36 +00:00
root 4c2cc73d57 Add Centos-8 support
Change-Id: If0f8b4a7442d8cd904337f802758e17aa3cb8da8
2020-07-02 17:08:14 +00:00
gugug fe00ea83d0 Remove the neutron-fwaas since it retired
Depends-On: I561504160e5548c54d1af31821c3366ab34cf0ec
Change-Id: Ib03f3d25a2b28fc7a856a1838440acfd4d7656e4
2020-06-20 12:13:25 +00:00
Dmitriy Rabotyagov a51da4719e Compile mod-wsgi module for CentOS 7
CentOS 7 do not have Apache mod-wsgi package for py3, so we're building it.

Change-Id: I02f7b3c91468c5d7ed44d950afa2cc6164d2650f
2020-06-10 16:06:23 +03:00
Dmitriy Rabotyagov 92e8b24148 Install pcre-devel to build pyScss2
pyScss2 requires pcre devel to be installed for building it's wheels.
Buster was missing that package being installed, so we add it.

Change-Id: I07d8e160c83991a72697b8c156d28f99f02d5e3a
2020-03-28 21:15:14 +02:00
Dmitriy Rabotyagov 61caabf325 Add murano-dashboard
This patch adds deployement of murano-dashboard to horizon,
once `horizon_enable_murano_ui` variable is set to True.

Depends-On: https://review.opendev.org/710773
Change-Id: I9a2f1920611ca8ad2b2f2cdb625281132b968ec2
2020-03-25 20:06:28 +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
Georgina Shippey 7decc60313 Debian mod_wsgi python versions
Use horizon_venv_python_executable instead of the install_method to
decide what version of libapache2-mod-wsgi should be installed.

Change-Id: Ie68d587bf69af9d298a643b056edcbd6e2c8a73d
2019-10-29 17:18:29 +00:00
Shannon Mitchell 32a9e2b808 Broken panel registration fix
Fixes broken panel registration for source install method
due to python 3 changes changing the horizon_lib_dir path
dynamically.  This sets changes the horizon_dashboard_panel_dir
var to utilize the horizon_lib_dir fact being set in in the
horizon_install_source.yml playbook.

Closes-Bug: 1848561

Depends-On: https://review.opendev.org/689323
Change-Id: Ide5181c14fdc2c67df4df3adaa155d5959b4c468
2019-10-18 07:50:43 +00:00
Dmitriy Rabotyagov 9f9b66a985 Allow to configure horizon bind address
Added variable horizon_bind_address which allows to define address
on which horizon will be listening.

horizon_listen_ports variable was converted to dict()
and used in apache vhost template.

As an addition metal jobs were added for horizon CI.

Depends-On: https://review.opendev.org/681722
Change-Id: I11c3edec6d58e39da8de5e214fab9731eb5df9e2
2019-09-19 09:32:09 +00:00
Dmitriy Rabotyagov a2280e2e90 Retire neutron-lbaas UI plugin
Because of global retirement process of neutron-lbaas  we stop providing
neutron-lbaas-ui plugin installation for horizon.

Change-Id: Ic39a4d1cc03df72a4080abd6513bf8f4036da456
2019-09-13 13:37:54 +03:00
Jonathan Rosser 20e47c9e4b Add python3 compatibility to horizon role
* Remove horizon_python_lib_dir, this is not used anywhere
* Autodetect the horizon_lib_dir for source installs
* Remove hardcoded python2.7 path from uwsgi template

Change-Id: I0747ad5c50c0c007385b4756f1b386363bafcf93
2019-09-10 06:07:05 +00:00
Dmitriy Rabotyagov ef1c53fa88 Use systemd-journald instead of log files
This patch aims to migrate apache from usage of regular syslog files
to journald.

Change-Id: Ifde6b86bec87fdd2fa161f8d28aed7f6ffa52f74
2019-07-24 18:32:47 +03:00
Jonathan Rosser f5829f517c Only install py3 version of libapache2-mod-wsgi for ubuntu distro installs
Change-Id: I180cd0abbb64c538585ef4bb9a1ccdd70c3eb0dc
Closes-Bug: 1834059
2019-06-24 16:57:37 +01:00
Jimmy McCrory 67db4e81a9 Fix distro installs on Ubuntu
Beginning in the Stein release, Ubuntu distro packages are now using
Python3. Conflicting packages have been removed or updated to their
Python3 equivalents. The 'horizon_manage' variable has been updated to
ensure that python3 is used to run manage.py commands.

Values for STATIC_ROOT and LOCALE_PATHS have also been added to the
local_settings.py template. Defaults for these settings are defined
in the setting.py provided by Ubuntu packages, but those defaults
required the 'Collect and compress static files' and 'Compile messages'
tasks be run by the root user, instead of horizon. STATIC_ROOT also
needed to correlate to the folder apache is configured to serve.

Change-Id: Iaa41593e3a91640bd9c5d531da8238c04d7e747b
2019-06-05 14:10:43 -07:00
Dmitriy Rabotjagov 52ca70be38 Set appropriate branch key in _horizon_translations_pull
Once branch is defined in _horizon_translations_pull, variable
horizon_translations_project_version was not influencing anyhow on the
pull process, as it was set as default variable, when branch not defined

With this change horizon_translations_project_version was set as
branch in vars, with default value of master.

Change-Id: I4a9c3b2bdc442b5cbcc28672931190c53023ab82
2019-03-19 14:00:03 +00:00
Jean-Philippe Evrard 39d8e2338b Revert "Rename SUSE vpnaas-ui package"
This reverts commit 6c9285f5e0.

Change-Id: Idfcf4da0ee1ceda527589aaab1155a5440de18e0
2019-01-08 13:24:29 +00:00
Jesse Pretorius 6c9285f5e0 Rename SUSE vpnaas-ui package
The package has been renamed, affecting both master and rocky.

Change-Id: I607546949d1df8e3caa2b240f1fe779377ce14e0
Related-Bug: #1809460
2018-12-21 14:04:32 +00:00
Dmitriy Rabotjagov 9a25d2507b Implements masakari-dashboard to be installed in horizon
Added masakari dashboard to horizon installation.
As for now it's installation is available only from source.

Change-Id: I07937e2d97080ec5f4aece61a6bf032cd8790f5f
Implements: blueprint masakari-ansible-plugin
2018-11-21 11:51:54 +00:00
Zuul 3940a1602d Merge "Extend Zanata Pull with module option and more dashboard plugins" 2018-11-10 10:23:04 +00:00
Jesse Pretorius 0fcfbf374c Remove unnecessary package install duplication
Currently the devel packages are installed everywhere,
but they only need to be where the wheels are built.

Also, there is already a task to install the packages
needed on the target hosts when installing - so we do
not need to give the same list to the venv install role
because they will already have been installed.

Change-Id: Ifdff299a81cbba90cf819c9a628650c8b1be3d6a
2018-10-30 19:21:05 +00: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
Frank Kloeker 066e462c64 Extend Zanata Pull with module option and more dashboard plugins
horizon-manage.py provides a module option to define different project
modules (horizon modules are default), so provide this option also here

Compile messages can be perform directly in horizon_lib_dir.
It's not required to go in each module dir, so removed this.
All messages will compiled now which takes insignificantly longer.

Change-Id: I82be90e722780d27bb0593575b8bfe5befe46686
2018-09-12 20:42:03 +02:00
Dmitriy Rabotjagov 3d60097f94 Re-written dashboards linking.
Old style of dashboards linking was replaced with find module.
horizon_panels variable was removed. Now deployer may install extra
dashboard with pip package, and it will be linked by role
in case of correct structure and naming.
Task for linking found dashboards was moved to horizon_install_source,
as we don't need linking during installation from packages.
Added _dashboard_panels_location - it's a list with subdirs inside
dashboard folders, where panels should be located.

horizon_panel_enable_state variable was also removed, as we
don't try to link dashboards in post_install anymore.

Depends-on: I708b5cf32e5cce6a18624d0b3be0cd4c828ad389
Change-Id: Ia76d959aa03ff67703bd41bd7ea418ea49a91df7
2018-09-04 16:01:01 +03:00
Dirk Mueller 4530c4d903 Reenable designate dashboard for openSUSE
The packaging error that prevented this from being used
should be fixed meanwhile

Change-Id: I59934be8ec4cc6d60e55a326270d9e71296e5409
2018-07-25 16:35:30 +02:00
Markos Chandras 2af1b7a6c4 Add support for using distribution packages for OpenStack services
Distributions provide packages for the OpenStack services so we add
support for using these instead of the pip ones.

Implements: blueprint openstack-distribution-packages
Change-Id: Ie6eeff541a319967715e619dcdc26177aec5be72
2018-07-23 17:29:14 +01:00
Andy McCrae 6f6af10880 Add required packages to build mysql-python
The horizon deploys are failing due to missing packages required to
install the mysql-python pip package. This PR adds those in.

Depends-On: I3df2c670beeb78baaa1515bcd27e8f2b0d95b3a9
Change-Id: I20abe34118014f9bca03daadf5d1f14b7f9fd0ff
2018-06-24 17:16:52 +00:00
Jonathan Rosser b6ea51848d Correct the fwaas horizon panel filenames
upstream neutron-fwaas-dashboard has added/renamed files, update
osa horizon role to account for this

Change-Id: Iee185167fefdcb4c85006df07992ccbd1c501420
2018-04-23 10:00:34 +01:00
Frank Kloeker c3a1fe8954 Rename pull_catalog args from version to branch
This is required after duplicate argument settings, fixed in
https://review.openstack.org/#/c/559071/

The branch must be overridable per item, and should default
to the master branch, and be the same for all the items
by default.

Change-Id: I656c8793714b5dc764d7aa0cef28e5eca65d927a
Co-Authored-By: Jean-Philippe Evrard <jean-philippe@evrard.me>
2018-04-19 13:27:23 +00:00
ArchiFleKs 4814cb17d4 Add support for Horizon Octavia UI
Change-Id: I65c9d117f8e74d9a2e1e5b3cfad34a4dbb06ca60
2018-02-13 17:41:12 +01:00
Jean-Philippe Evrard 53113aa25d Add heat dashboard to horizon
Heat is now a plugin that needs to be enabled in horizon [1].
This uses the same process as the other plugins.

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

Change-Id: Ic3ec4684d941df6343074d9275fcfaeff6724181
Closes-Bug: 1745400
2018-01-26 10:35:34 +00:00
Jean-Philippe Evrard f4b69c929c Flexible horizon dashboard configuration
If any user wants to provide its own dashboard, he can now
install its own pip package by overriding the proper variables,
and then do the linking directly by overriding the new variable,
``horizon_panels``.

If we wants to use any existing horizon_panels, and just add a
personal panel, a deployer must define the override like this:
``horizon_panels: "{{ my_horizon_panels + _horizon_panels }}"``
where ``my_horizon_panels`` is a list whose items are composed
of src, dest, and state.

Change-Id: I87324aaa3a685b1e65081b7c7dce767c080f22ee
2017-12-06 08:07:33 +00:00
Markos Chandras a64745174b Add support for the openSUSE Leap distributions
Add support for the openSUSE Leap distributions. Additionally,
for openSUSE, we need to load some extra apache2 modules which are
not there by default. Finally, Apache on openSUSE configures some
of it's components in httpd.conf and some others in default-server.conf
so it's not possible to drop one of them as that will likely break
Apache. A future improvement would be to drop both and provide a good
httpd.conf template. Until then, we need to drop the default
configuration for the root directory as that breaks Horizon since
it does not allow symlinks and global access to it.

Change-Id: I51613df836c6a507f6f36967c0ce4b76ba9202a9
2017-07-12 18:23:13 +01:00
Jean-Philippe Evrard bbe5bb7c3c Ensure the log folder exists
Restarting the apache service under ubuntu read the envvars file.
This envvars contains the folder for logrotate. If the folder
doesn't exist or hasn't the apache permissions, the restart of
the service will fail.

We ensure here the folder properly exists, with the right
permissions.

Change-Id: I041a044ef88aff917eeb3a618c2c08ac9ceb80fe
2017-03-07 15:56:35 +00:00
Travis Truman ff47522cb0 Implementing stricter permissions on config files
The security guide suggests that /etc/horizon/local-settings.py
should be owned by root and in the horizon group with 0640 permissions.

Change-Id: I4a49394cd2afb92e0da1b233e21bad862ddee059
2017-02-06 16:14:09 -05:00
Marc Gariepy 27dad708c2 Add which in CentOS package list
which is needed by virtualenv-tools.

Change-Id: I338ab5f9b0362d5a992e840625a79d02c00e3888
2017-01-11 13:54:07 -05:00
Marc Gariepy 21499f4366 Add CentOS support for os_horizon role
Change-Id: I1cd6d4b8f4626331a47575be330f4a4fc4ba593f
2016-11-29 15:31:16 +00:00
Jesse Pretorius 0b6085c007 Rename package lists (and related vars) appropriately
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.

This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.

Change-Id: Ib4b177992753ad53b8bdb7a7652f1fbc6cc5267d
2016-08-30 18:04:39 +01:00
Andy McCrae d1dd1aa856 Add required gettext package for compilemessages
The Xenial gate is failing due to missing "gettext" package, which is
required for the "horizon-manage.py compilemessages" command to run.

This PR adds gettext as a package to install and should ensure the
Xenial gate now passes successfully.

Change-Id: Ib744121b002970e606b86dde4ed356184433cba7
2016-08-11 11:30:17 -05:00
Kevin Carter cc71003acb
Updated tests and role for Xenial support
These changes allow the role to be tested on Xenial hosts
while also ensuring that the tests are testing everything
within the container as expected.

Overview:
  * Included in this PR is a manual-test.rc. This has been
    added to  allow developers to run tests locally without
    having to invoke tox. This RC file was lifed from the
    os_keystone role.
  * The git package was added to the install list. This is
    needed on the target when the role is running with developer
    mode enabled.
  * Connection settings within the container create prep playbook
    were removed. A``connection: local`` setting forces all
    commands to be executed against the host regardless of a
    delegated task.
  * A task has been added to the horizon role to when SSL is
    enabled. This task ensures that that ca certificates are
    updated. Without this change, when running on Xenial,
    tempest will fail due to the following error:
      [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)
    By updating the ca certificats on tempest is able to verify
    the certificate and pass the tests. NOTE: This fix came from
    the puppet-OpenStack community where they ran into the same
    problems in Xenial as discussed here: [0]

[0] - https://irclogs.ubuntu.com/2016/05/18/%23ubuntu-server.html#t13:37

Change-Id: I1e6808c49a8faaba5b2748918be5d6b5a59fd3d1
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2016-07-12 09:05:46 -05:00
Travis Truman c82ef96e1d Updating os_horizon to use the Multi-Distro framework
Debian-specific vars and logic have been moved to tasks
that will execute only on those distributions.

Change-Id: I16664a9c4364938a065bf07472e25e93ba1b828c
Implements: blueprint multi-platform-host
2016-05-20 15:01:26 -04:00