Commit Graph

17 Commits

Author SHA1 Message Date
Guilherme Steinmüller d5244c86ef Retire openstack-ansible-os_searchlight
Change-Id: Ie7c495b997ea91b1bcccfc031b60284e30d9c6f6
2019-04-17 23:49:05 +00:00
Jesse Pretorius f3e86a3382 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: Ie6b2baecdc4260fe814ffd0b62555532c3f677a6
2018-11-30 16:40:31 +00:00
Jesse Pretorius 9aa42e5bea 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.

Depends-On: https://review.openstack.org/598957
Change-Id: I97a614422490e7bff3bbe5f651387fbeb092aeda
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 11:08:51 +00:00
caoyuan 24d67e5e75 use include_tasks instead of include
include is marked as deprecated since ansible 2.4[0]

Switch to include_tasks or import_playbook as necessary

[0] https://docs.ansible.com/ansible/2.4/include_module.html#deprecated

Change-Id: I8dbe7ca1354c204d17f2f4bc0ac3be23f4a7cdc9
2018-08-15 16:59:05 +08:00
Jesse Pretorius 76421ccb31 Clean up vars, tests and overrides
1. It would appear that searchlight does not make use of rabbitmq,
   so we remove the vhost/user setup and vars.
2. The searchlight_requirements_git_repo repo was cloned, but not
   used anywhere. This is a relic of the past and has now been
   removed.
3. The service URI defaults use the load balancer addresses, so
   so instead of overriding all the URI's we simply set the load
   balancer addresses.
4. The 'functional test' installed curl, but didn't use it. It
   used a var to refer to the correct port. This requires the
   duplicating of the var in overrides which is a bit over the top.

Change-Id: Ibd4fd8564ae5f858a2a2676d35de417e673c483c
2018-07-29 15:16:03 +01:00
Zuul ff3be7e3d9 Merge "Remove the unnecessary space" 2018-07-20 15:39:46 +00:00
Jesse Pretorius 70016bb4ee 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.

Change-Id: I81bb3f872dc93e54861cb720e3b37ab7660a074a
2018-07-14 14:00:14 +00:00
Jean-Philippe Evrard cdfac3eaca 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: I032103fdc1fa2bb8599db3f113fb4fc7203a5672
2018-07-12 17:02:05 +02:00
zhulingjie d43aec724c Remove the unnecessary space
Change-Id: Ia68b4a4a183afdbcb0f9fa4c065f186c0cd6e1c1
2018-07-11 23:16:43 -04:00
Zuul 216f4ce8e4 Merge "Only replace python when re-initializing the venv" 2018-04-19 12:51:45 +00:00
Jesse Pretorius 1569617857 Do not log passwords
This prevents data to be leaked into the callback plugin.

Change-Id: I028ee01e9869dcbd0794a5457918fb3bf10e7228
2018-04-18 11:44:43 +01:00
Jesse Pretorius a9561bbce9 Only replace python when re-initializing the venv
We reinitialize the venv to ensure that the right version of
python is in the venv, but we do not want virtualenv to also
replace pip, setuptools and wheel so we tell it not to. If we
don't do this then virtualenv will install the latest available
version, which is not what we want.

Change-Id: I39e64f29e794075ef303d3e1a2c0c1a6a18937b6
Partial-Bug: #1764470
2018-04-18 11:01:24 +01:00
Jean-Philippe Evrard adf76cdc43 Reinitialize the virtualenv
In the previous patch removing the virtualenv-tools, we've updated
paths to the proper binaries, but we don't reset the virtualenv
like what we used to do.

Change-Id: I799bec0d7422406b5364407d7bf740612413959b
Partial-Bug: #1741634
2018-01-19 16:31:59 +00:00
Jean-Philippe Evrard cb3eb81818 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: Ia154238ef95767576283c3230d93748f65b56606
Partial-Bug: #1741634
2018-01-16 07:54:04 +00:00
Jean-Philippe Evrard 26f34084c6 Use systemd module instead of command
This causes linters to break: since ansible 2.4 the systemd
module can have only the daemon_reload directive.

Change-Id: I808068128afa92f800d01636bef3a431cff1054b
2018-01-15 15:31:21 +00:00
Jimmy McCrory 92010a5265 Update configuration to use Keystone v3
Update searchlight.conf's service_credentials options to use Keystone
v3 and reorder the install tasks so that the service is setup before
attempting an index sync.

Change-Id: I13b4fa07fae269a681c2075fb6be40aa5bffa40e
2017-10-10 13:15:44 -07:00
Neill Cox 6139bbed0f Import initial os_searchlight role.
Import the initial verison of the os_searchlight role.

This role currently does the following:
- Installs a jdk, elasticsearch and searchlight
- Starts the searchlight services (api and listener)
- Does an initial DB sync
- Listens for messages from other openstack services
- installs the openstack CLI plugin

Current issues / TODO list:
- linting of Stouts.elasticsearch role
- Setup Apache site properly.

Change-Id: I3ff72c9fbfc96a1f80f5cdd51a91f4d7ef638682
2017-06-05 15:06:59 +01:00