Commit Graph

13 Commits

Author SHA1 Message Date
Jesse Pretorius 522bba6f30 Update role for new source build process
The variables glance_developer_mode and glance_venv_download
no longer carry any meaning. This review changes glance to
do the equivalent of what developer_mode was all the time,
meaning that it always builds the venv and never requires
the repo server, but it will use a repo server when available.

As part of this, we move the source build out of its own file
because it's now a single task to include the venv build role.
This is just to make it easier to follow the code.

We also change include_tasks to import_tasks and include_role
to import_role so that the tags in the python_venv_build role
will work.

Depends-On: https://review.openstack.org/620339
Depends-On: https://review.openstack.org/637240
Depends-On: https://review.openstack.org/637503
Depends-On: https://review.openstack.org/644391
Change-Id: I1e5bd71b164676031fcde9890be43554e67048bf
2019-03-20 05:17:22 +00:00
Zuul 9539f40f7c Merge "Add glance_user_pip_packages variable" 2019-02-27 11:33:14 +00:00
Zuul 77148fb080 Merge "Cleanup files and templates using smart sources" 2019-02-25 22:49:10 +00:00
Guilherme Steinmüller e24fe31e2e Add glance_user_pip_packages variable
With this variable, users would be able to extend
the list of pip packages in case of needing an
extra pip package.

Currently if we need an extra pip package we need
to override the existing list.

Change-Id: I59bd71a581b23574323db55f0f16194e7788e22e
2019-02-22 16:38:25 +00:00
Kevin Carter c22d786120 Remove the private option from include_role
The private option on include role was never implemented and
will no longer be developed. This change removes the option
so ansible no longer raises a deprecation warning.

Change-Id: I011fba2674dc4c6888ba93c0ea90f4d60e4b7657
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-02-22 00:39:38 +00:00
Kevin Carter 9748e6b154
Cleanup files and templates using smart sources
The files and templates we carry are almost always in a state of
maintenance. The upstream services are maintaining these files and
there's really no reason we need to carry duplicate copies of them. This
change removes all of the files we expect to get from the upstream
service. while the focus of this change is to remove configuration file
maintenance burdens it also allows the role to execute faster.

  * Source installs have the configuration files within the venv at
    "<<VENV_PATH>>/etc/<<SERVICE_NAME>>". The role will now link the
    default configuration path to this directory. When the service is
    upgraded the link will move to the new venv path.
  * Distro installs package all of the required configuration files.

To maintain our current capabilities to override configuration the
role will fetch files from the disk whenever an override is provided and
then push the fetched file back to the target using `config_template`.

Change-Id: I3e7283bf778a9d686f3ae500b289c1fb43b42b92
Signed-off-by: cloudnull <kevin@cloudnull.com>
2019-02-18 09:06:26 -06:00
Heba Naser efd079420c venv: use inventory_hostname instead of ansible_hostname
It is possible that the hostname of the system does not match the
one in the inventory which means that the delegate_to or the
comparision to inventory_hostname will fail in the tasks later.

Change-Id: Ifb477a405eef800b4aa224e05d882a8badf401a3
2019-02-06 09:55:17 -05:00
Jesse Pretorius e98b2d6116 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: I18cc964196dbbf5019bc116c41861cb39e466e14
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 11:11:57 +00:00
Andy Smith efb98a3ebc Setup oslo.messaging extra packages for optional drivers
Change-Id: Ib822a1799119b7c153929f6e80f20e0b110d266d
2018-07-31 13:25:20 -04:00
Jean-Philippe Evrard fb2802d2e4 Fix usage of "|" for tests
With the more recent versions of ansible, we should now use
"is" instead of the "|" sign for the tests.

This should fix it.

Change-Id: I6749670146cc64cb39b67efb26a9226208828ae7
2018-07-12 16:44:20 +02:00
Jesse Pretorius fa11f38215 Execute service setup against a delegated host using Ansible built-in modules
In order to reduce the packages required to pip install on to the hosts,
we allow the service setup to be delegated to a specific host, defaulting
to the deploy host. We also switch as many tasks as possible to using the
built-in Ansible modules which make use of the shade library.

The 'virtualenv' package is now installed appropriately by the openstack_hosts
role, so there's no need to install it any more. The 'httplib2' package is a
legacy Ansible requirement for the get_url/get_uri module which is no longer
needed. As there are no required packages left, the task to install them is
also removed.

With the dependent patches, the openstack_openrc role is now executed once
on the designated host, so it is no longer required as a meta-dependency for
the role.

Ansible 2.5 is a hard dependency for this patch due to the dynamic setting
of the ansible_python_interpreter, which in 2.4 is literally interpreted,
but in 2.5 thanks to [1] is now templated. See [2] for more details.

[1] https://github.com/ansible/ansible/pull/33698
[2] https://github.com/ansible/ansible/issues/18665
Depends-On: https://review.openstack.org/501814
Depends-On: https://review.openstack.org/568139
Depends-On: https://review.openstack.org/568141
Depends-On: https://review.openstack.org/568146
Depends-On: https://review.openstack.org/571423
Depends-On: https://review.openstack.org/579233
Depends-On: https://review.openstack.org/579959
Depends-On: https://review.openstack.org/580156
Change-Id: I6a5a85fae5a481900149a343a163fe82e788d1eb
2018-07-06 13:54:34 +00:00
Jesse Pretorius 2377702b33 Simplify fact setting
The conditionals are currently difficult to follow.
This simplifies them by splitting the fact setting
up and doing a fact refresh after the first one is
set.

Change-Id: I3f74d06ba3b246674e3ea3eb6ee1e5ca6e86a79b
2018-05-15 10:55:31 +01:00
Markos Chandras ba64ce3083 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.

Change-Id: I026a440b6a0fda43b613e30f359b2a23c3c1151f
Depends-On: I5a78e2120e596d36629b4ba978b2b5df76b149b0
Implements: blueprint openstack-distribution-packages
2018-05-04 15:42:26 +01:00