Commit Graph

18 Commits

Author SHA1 Message Date
Guilherme Steinmüller c30e4a5a34 Retire openstack-ansible-os_zaqar
Change-Id: Id1b0aa720d293298ab48fae2e926e79fb7df4511
2019-04-17 23:43:21 +00:00
Jesse Pretorius 673dcb63a3 Enable overriding the service setup host python interpreter
In order to enable the service setup host python interpreter to
be changed easily, we make it a variable. This will be useful
when someone sets the service setup host to be the utility
container, because we'll be able to set this var by default.

Change-Id: I0c3f20032fc673a20088fb6a946c7af57d6a4841
2018-11-30 16:59:05 +00:00
Jesse Pretorius 0fc824798e 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.

This patch also cleans up the unnecessary tags and makes a
few changes to the role to tidy things up a bit.

Depends-On: https://review.openstack.org/598957
Change-Id: I61d005d4732bd1d6cf4125cbf1adfdb1479a4b1b
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-04 13:47:41 +00:00
Jesse Pretorius 62dfbc77bd 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. The keystone client library is not required any more now that we're
using the upstream modules. 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.

Depends-On: https://review.openstack.org/582359
Change-Id: Ic844753c3ece4383eefa490f00be0bff441c6a7e
2018-07-13 15:36:09 +00:00
Kevin Carter 70706066b4
Add packages required for osprofiler
The following packages are required in-order to run osprofiler.
these packages will provide deployers the ability to profile
a service on demand should they choose to enable the profile
functionality.

Change-Id: I4f785e0dac12e7cfffa2b1910dab343b978c09bd
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2018-06-11 22:59:33 -05:00
Jean-Philippe Evrard 9a293bce71 Replace virtualenv-tools by a script
virtualenv-tools has a bug which gets triggered in gates: it can't
change the shebang of a virtualenv python bin/ files if they
were generated with a virtualenv script whose shebang ends with
python2 instead of python.

Because we can't modify virtualenv-tools, we use shell scripts
instead.

Change-Id: If5d213bbe27c7f07508f4c20e7d3f5d911ba974d
Partial-Bug: #1741634
2018-01-15 14:18:59 +00:00
ZhongShengping 1e3a4a4463 Deprecate auth_plugin option
Option "auth_plugin" is deprecated, use option "auth_type" instead.

Change-Id: Ibe125dc89b7c59daf83b950692319ec18457d3f2
Implements: blueprint deprecate-auth-plugin
2017-03-25 12:25:28 +08:00
Logan V 541537405d Clean up developer mode logic
Fixes the ability to deploy a venv in cases where:
1) developer_mode is not enabled
2) A cached venv is not downloaded from the repo server

Additional cleanup to the developer_mode venv deployment
logic is implemented by adding a *_venv_download var
which is used to decouple developer_mode from the
cached venv extraction process so that a deployer
can force venv builds in-place (disable cached
venv usage) without enabling developer mode
constraints.

Change-Id: Id41f3963f4be4444dca8362e6f71f537f01429f2
2017-01-13 19:52:42 -06:00
Jean-Philippe Evrard eee216fdc4 Fix linting issues for ansible-lint 3.4.1
Preparing this role for the ansible-lint version bump

Change-Id: I157d31811c3104a75b14521a560a04f9bd5156b2
2016-11-04 17:39:22 +00:00
Jesse Pretorius ef36c27565 Simplify pip options/constraints mechanism
The current constraints generation for the
installation involves multiple tasks and multiple
variables.

Using multiple tasks extends the installation time
unnecessarily and the additional variables are
unnecessary.

This patch aims to simplify the mechanism and
hopes to speed it up a little.

Change-Id: I6784878e7a46560bebfb0be9d51b048da3774f70
2016-11-02 18:26:10 +00:00
Jesse Pretorius af5d82609a Add project group to role
This patch adds a var used by the repo_build process to determine
which host group to check for members of before building the pip
packages required by this role. This provides the ability to
optimise the repo build process to only building the packages
that are required for an environment.

Depends-On: Idda16b4f382eee57c7469af898859d6d81d4eb30
Change-Id: Iedb4c0c91daa291f881a9fc00c5b8c40bb312ce3
2016-08-04 05:20:48 +01:00
Jesse Pretorius 65cd7cde31 Add ability to change apt/yum package state
The current method of installing the distribution packages required is
set in the tasks and cannot be changed by a deployer.

Currently the apt task always installs the latest package. This results
in unexpected binary changes when a deployer may simply be trying to
execute a configuration change.

This patch adds the ability for a deployer to change the desired state
so that the results are predictable.

Change-Id: I3e99a77fb53ba91367c6548523b9e0f3b910e469
2016-08-02 15:37:11 +01:00
Anton Khaldin e3d63ab1ef Only install to virtual environment
Remove all tasks and variables related to toggling between installation
of zaqar 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: I4a67a53d3d685c1e2f937114352569c9f45a74a0
Implements: blueprint only-install-venvs
2016-07-08 02:10:49 -07:00
Amy Marrich 8a6f23e8de Updating os_zaqar to use the Multi-Distro framework
* The default apt packages have been moved into a var file that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved into a named install task file.

Change-Id: Id95826a9dd9e5d2ed83a95c3f02d18929735a8f2
Implements: blueprint multi-platform-host
2016-05-25 08:28:39 +00:00
Travis Truman 905db08a5d Removing unused verbose var
Zaqar has deprecated the usage of `verbose` within
zaqar.conf and the role was not making use of the
variable in the configuration file template.

Change-Id: I05f796e28f7617b6f5e9f56a75a89f00a6c53fa8
2016-03-29 10:25:44 -04:00
Jimmy McCrory 592eab69a8 Remove dependency on the Keystone admin auth token
Now that auth token usage is deprecated, prefer the admin
user and password for all zaqar setup tasks run against
keystone.

Default vars in keystone namespace have also been removed.

Change-Id: Ic6639d5765925ce6a50b3e9f701eafb45cd6a004
2016-03-17 16:03:26 -07:00
Lingxian Kong 50e596389b Add zaqar_local_mode 2016-03-15 15:11:37 +13:00
Lingxian Kong 141383b19e Initial commit for zaqar ansible role 2016-03-11 15:08:53 +13:00