Commit Graph

11 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
Damian Dabrowski db7110d297 Add PKI support to horizon backends
Replace legacy SSL support with ansible-role-pki.
It is used to generate required TLS certificates if needed.

Depends-On: https://review.opendev.org/c/openstack/openstack-ansible/+/879085

Change-Id: Id2f9d6f911cee6e58c261c1a68c34a37ab9ced4f
2023-04-29 18:37:24 +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
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
Dmitriy Rabotyagov b7a579b41e Do not become `horizon` user for distro installs
Compiling messages as horizon user during distro installs results in
permissions error due to the fact that libraries are owned by root user
and been already compiled by distro package hook (for some distros)

Change-Id: If6e3b48b68e0018e0122d76bf49dfbe569ce96ce
2020-03-25 12:44:21 +00:00
Dmitriy Rabotjagov 60ae573179 Moved compilemessages to handlers
As there were 2 compilemessages tasks in different places and one of
them was executed on every launch, in order to remove dublicated code
and ease it's maintenance, this task was moved to handlers.

Change-Id: Ic9c0de9248c8bd3cd796aa2a338cc57afba57446
2019-03-19 15:59:04 +02:00
Jesse Pretorius 0d573583a9 Use a common python build/install role
In order to radically simplify how we prepare the service
venvs, we use a common role to do the wheel builds and the
venv preparation. This makes the process far simpler to
understand, because the role does its own building and
installing. It also reduces the code maintenance burden,
because instead of duplicating the build processes in the
repo_build role and the service role - we only have it all
done in a single place.

We also change the role venv tag var to use the integrated
build's common venv tag so that we can remove the role's
venv tag in group_vars in the integrated build. This reduces
memory consumption and also reduces the duplication.

This is by no means the final stop in the simplification
process, but it is a step forward. The will be work to follow
which:

1. Replaces 'developer mode' with an equivalent mechanism
   that uses the common role and is simpler to understand.
   We will also simplify the provisioning of pip install
   arguments when doing this.
2. Simplifies the installation of optional pip packages.
   Right now it's more complicated than it needs to be due
   to us needing to keep the py_pkgs plugin working in the
   integrated build.
3. Deduplicates the distro package installs. Right now the
   role installs the distro packages twice - just before
   building the venv, and during the python_venv_build role
   execution.

Depends-On: https://review.openstack.org/598957
Change-Id: Ia91227b411a07424325be1d3362d4ce79c1430a5
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 11:07:58 +00:00
Jesse Pretorius faa5b91e1f Optimise the role execution
This patch does the following:

- Instead of scoping to the inventory group name, we scope
  to the play hosts. This allows the execution of the role
  using limits to still execute the necessary tasks.

- A little style update is done to improve readability.

- Some includes are changed from static to dynamic to
  improve execution speed.

- The tag for the translations async finalisation is
  changed to 'horizon-config' to match the rest of the
  config related tasks, including the task which starts the
  async process.

- The enabling and starting up of Apache is moved to the
  handler so that it's all done in one task.

Change-Id: If9726035d1fae0ec78aead38eb85f4d30a45a07c
2017-07-10 12:32:53 +00: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
Kevin Carter 787bf47d02 Convert existing roles into galaxy roles
This change implements the blueprint to convert all roles and plays into
a more generic setup, following upstream ansible best practices.

Items Changed:
* All tasks have tags.
* All roles use namespaced variables.
* All redundant tasks within a given play and role have been removed.
* All of the repetitive plays have been removed in-favor of a more
  simplistic approach. This change duplicates code within the roles but
  ensures that the roles only ever run within their own scope.
* All roles have been built using an ansible galaxy syntax.
* The `*requirement.txt` files have been reformatted follow upstream
  Openstack practices.
* Dynamically generated inventory is now more organized, this should assist
  anyone who may want or need to dive into the JSON blob that is created.
  In the inventory a properties field is used for items that customize containers
  within the inventory.
* The environment map has been modified to support additional host groups to
  enable the seperation of infrastructure pieces. While the old infra_hosts group
  will still work this change allows for groups to be divided up into seperate
  chunks; eg: deployment of a swift only stack.
* The LXC logic now exists within the plays.
* etc/openstack_deploy/user_variables.yml has all password/token
  variables extracted into the separate file
  etc/openstack_deploy/user_secrets.yml in order to allow seperate
  security settings on that file.

Items Excised:
* All of the roles have had the LXC logic removed from within them which
  should allow roles to be consumed outside of the `os-ansible-deployment`
  reference architecture.

Note:
* the directory rpc_deployment still exists and is presently pointed at plays
  containing a deprecation warning instructing the user to move to the standard
  playbooks directory.
* While all of the rackspace specific components and variables have been removed
  and or were refactored the repository still relies on an upstream mirror of
  Openstack built python files and container images. This upstream mirror is hosted
  at rackspace at "http://rpc-repo.rackspace.com" though this is
  not locked to and or tied to rackspace specific installations. This repository
  contains all of the needed code to create and/or clone your own mirror.

DocImpact
Co-Authored-By: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
Closes-Bug: #1403676
Implements: blueprint galaxy-roles
Change-Id: I03df3328b7655f0cc9e43ba83b02623d038d214e
2015-02-18 10:56:25 +00:00