Commit Graph

29 Commits

Author SHA1 Message Date
Guilherme Steinmüller d4e03338cf Retire openstack-ansible-os_molteniron
Change-Id: Idbf958f59a5443abc35d5ed09d086be0ec9688d6
2019-04-24 16:33:17 -04:00
Jesse Pretorius 96fb59ac5a 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.

Depends-On: https://review.openstack.org/598957
Change-Id: I2eba8e7ca3f66169094264f31f3e182287dfa9b2
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 12:00:19 +00:00
caoyuan 595c823989 use include_tasks instead of include
Change-Id: I745b34b5bfeebd5ba1f0ced02258fc789ad35f66
2018-07-24 20:33:00 +08:00
Jean-Philippe Evrard 1c4bd5ffed 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: I7bba2e6e09368361c7c9d2b86084728530780920
2018-07-12 16:57:23 +02:00
Jesse Pretorius 0dae54128d 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: Icc757ac36b298e46c0f257cd8304ac8553b85ee3
Partial-Bug: #1764470
2018-04-18 10:46:05 +01:00
Jean-Philippe Evrard 2a1f8dcf48 Do not log passwords
This prevents data to be leaked into the callback plugin.

Change-Id: I477f0a1cccae41f188b8ad4b4c3f0c53fad85ea5
2018-04-11 13:46:17 +02:00
Jean-Philippe Evrard d3efc0bde7 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: I48c72d06513bf931d9adf45a6dab14cc0045dca4
Partial-Bug: #1741634
2018-01-19 16:55:55 +00:00
Jean-Philippe Evrard d6b107dc6e 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: I964b9be6da90018f67b6a3bc1716245f52ffc9f9
Partial-Bug: #1741634
2018-01-15 14:14:24 +00:00
Andy McCrae f487af10c2 Allow the developer constraints to be adjusted
In order to do a developer mode that allows installation of packages
from local file, which take precedence over the developer_mode
constraints, we need to allow the order of the constraints to be
changed.

This patch adds a "pip_install_developer_constraints" var which is used
to set the developer mode constraints. By default this will leave the
same behaviour but will allow additional constraints to be added, or the
developermode constraints file to be overriden altogether.

Change-Id: Ibd281ceb0696c233a2f17bab162ae3158cf76a95
2017-05-26 11:43:19 +01:00
Jesse Pretorius 4dfa9a89e9 Add venv_tag local fact
In order to make it easier to detect the currently deployed
venv for a service, and therefore allow smarter decisions
for things like upgrading, we implement the venv tag as a
local fact.

The file used to store facts will be the same for all
OpenStack services, with each service using its own section.

Example:

"ansible_local": {
    "openstack_ansible": {
        "molteniron": {
            "venv_tag": "14.2.1"
        }
    }
}

Change-Id: Ic28e2d9d755eb8f5dfe30a7fc82da7eecd122765
2017-05-22 15:45:01 +00:00
Jenkins 72e2f6f3ea Merge "Use package module to install distro packages" 2017-05-19 13:23:37 +00:00
Rick Box b6d5e630cd Fix for lookup and get_url occuring in different places
We use an SSH bastion host which we do our deployment through. The
deployment host doesn't have direct access to the same network as the
host. As a result the venv local checksum lookup fails.

I have described this here:

https://bugs.launchpad.net/openstack-ansible/+bug/1689283

This is a simple fix for this problem, assuming everything is good it
will need repeating in multiple places in the code base.

Change-Id: I52590df47fb28c1347ccfff86e9124cf5438e9a4
2017-05-10 12:32:55 +01:00
Jesse Pretorius 879c1db7cf Use package module to install distro packages
Consolidate distro package install tasks into a
single task using the package module and pass
the package list into the name instead of using
a with_items loop.

The minimum Ansible version is raised to 2.2 due to a
known bug [1] in Ansible's apt module which does not
update the cache properly if the cache update and the
install are combined in a single task.

[1] https://github.com/ansible/ansible-modules-core/issues/1497

Also:
- split install tasks into pre-install, install and
  post-install tasks and tag them appropriately.

Change-Id: I0c5cc16ba1d82b7fd169156d1890c86614210cad
2017-05-02 13:08:49 +00:00
Mark Hamzy 47fd15cd57 use molteniron_container_mysql_password for the password
Add a new "Modify molteniron configuration yaml" and change the
"authorize openstack_citest MYSQL access" task.
2017-03-07 13:50:40 -06:00
Mark Hamzy 01fb87dbbc Remove molteniron_conf_dir 2017-02-23 13:44:20 -06:00
Mark Hamzy a22872578a Add when to include: molteniron_install.yml 2017-02-16 13:13:04 -06:00
Mark Hamzy c1167c7c65 Delete Restart molteniron services 2017-02-09 15:20:33 -06:00
Mark Hamzy 510feab572 Add when to add molteniron nodes 2017-02-09 09:19:28 -06:00
Mark Hamzy e208ae81ef add molteniron nodes 2017-02-08 13:05:17 -06:00
Mark Hamzy df74be799a Use IBM copyright 2017-02-08 10:42:04 -06:00
Mark Hamzy 28ed345a07 Consolidate tasks to pass gate check 2017-02-08 10:40:48 -06:00
Mark Hamzy d6473fa267 Change pip install parameter to a variable to pass gate check 2017-02-06 09:53:54 -06:00
Mark Hamzy bfeba15dc9 Use IBM Copyright 2017-02-05 13:47:50 -06:00
Mark Hamzy 7321e2f2d2 Add start molteniron server 2017-02-05 08:44:05 -06:00
Mark Hamzy 1246726c9f Add authorize openstack_citest MYSQL access 2017-02-05 08:03:04 -06:00
Mark Hamzy b53fe07647 Restart molteniron services 2017-02-05 07:47:15 -06:00
Mark Hamzy 23ab3f750a Remove restart keystone 2017-02-01 09:48:27 -06:00
Mark Hamzy d1ac10f802 Remove pre and post install 2017-01-31 14:49:38 -06:00
Mark Hamzy 0ce3753ab8 Add tasks for installation 2017-01-31 12:54:11 -06:00