201 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov
351f02646c Drop common-db tag from db_sync task
galnce_db_sync has no relation to common-db, and independent step
during glance configuration. common-db tag should be applied only
to the common tasks

Change-Id: I16df6895014f74f7e3d89489b10e91681511faa9
2019-10-30 16:44:50 +02:00
Dmitriy Rabotyagov
4e966b4f4a Drop duplicated keys
Change-Id: Ib8def3441b6c3a634cbb53a44d295b71586fed8a
2019-10-16 17:32:20 +03:00
Panagiotis Karalis
c27d0123ab Turn the filesystem directory to be configurable
Update the ownership of the directory about NFS mount point(s).

This patch could be also stand as an improvement for future use.

Making the filesystem directory configurable, we are able to store
the image in the different directory (or in a new path) under
glance_system_user_home repo, which is able to be configured
dynamically, for instance, via deployment of a scenario.

Change-Id: I7403ac9bd85ea3ed149e13cb57c51039602f6ba1
Signed-off-by: Panagiotis Karalis <pkaralis@intracom-telecom.com>
2019-09-19 19:45:04 +03:00
Zuul
ae681ded4e Merge "Allow venv python interpreter to be overridden" 2019-09-10 05:03:16 +00:00
Zuul
1ff3968959 Merge "Start using uWSGI role" 2019-09-06 15:30:22 +00:00
Jonathan Rosser
a46cb9cfb2 Allow venv python interpreter to be overridden
Change-Id: I31d0d5bb3f65006a8b4b617aba70c3524df6e255
2019-09-05 17:34:23 +01:00
OpenStack Proposal Bot
856add2734 Updated from OpenStack Ansible Tests
Change-Id: If30aa84b8989df5cb1a6c8c1d852da3935f18e3a
2019-09-04 15:13:40 +00:00
Dmitriy Rabotyagov
4b2724b44b Start using uWSGI role
Move service to use uWSGI role instead of iternal task for uwsgi
deployment. This aims to ease the maintenance of uWSGI and speedup
metal deployments as the same uwsgi environment will be used
across all services.

Depends-On: https://review.opendev.org/678025/
Change-Id: I6f129940e55130c289d94138171cee54dbd28fc1
2019-09-04 15:32:08 +03:00
OpenStack Proposal Bot
4c8dd7f0f3 Updated from OpenStack Ansible Tests
Change-Id: Iaee4b8e18c8f2173e3d4c7ef9d7d1f4e65d59985
2019-08-20 03:05:56 +00:00
Zuul
cce497d5d6 Merge "Add missing pre-reqs for glance cinder store" 2019-07-30 20:32:56 +00:00
Craig McIntyre
2636d7eaea Add missing pre-reqs for glance cinder store
There are a number of missing dependencies in the role when using cinder
store with glance. Specifically rootwrap is required for elevating access
when using os-brick to connect to cinder iscsi/fc volume back end storage.
This patch addresses the following:

 - olso.rootwrap is not included in glance_pip_packages

 - files/rootwrap.d/glance_cinder_store.filters is missing

 - glance user is not added to sudoers

glance_pip_packages updated, missing rootwrap.d and sudoer files now dropped in to
Their required locations by glance_post_install.yml task

Change-Id: I55162bc2bf3cbb8858950e4abcf60a3de9929008
Closes-Bug: #1833725
2019-07-30 15:52:38 +01:00
Dmitriy Rabotyagov
bd86eec1c5 service_setup: Update services tasks
During distribution of service_setup.yml it appeared that some services
have extra requirments and usecases. So this patch updated service_setup
and brings it into accordance across the roles.

Change-Id: I7e42e0763c4e55cdc94fa61e3b3a9564370286d3
2019-07-29 14:59:37 +03:00
Zuul
1e077e6899 Merge "Use systemd-journald instead of log files" 2019-07-16 21:10:50 +00:00
OpenStack Proposal Bot
4867a27e21 Updated from OpenStack Ansible Tests
Change-Id: I3d00356be637e48a3556f188602f6eab0216c278
2019-07-16 14:51:34 +00:00
Dmitriy Rabotyagov
002d2a91ea Use systemd-journald instead of log files
This patch aims to migrate service from usage of regular syslog files
to journald. We also disable uwsgi logging, since it dublicates
requests that are logged by service itself.

Change-Id: I12c5a117d9ca508f24a36a477d2d71c36e6c8c96
2019-07-16 16:09:28 +03:00
Zuul
fc071c769e Merge "service_setup: refactor service setup to a single file" 2019-07-09 14:50:46 +00:00
Dmitriy Rabotjagov
fc6683f3d6 service_setup: refactor service setup to a single file
This patch refactors the openstack user/service/endpoints creation to
service_setup.yml which will eventually be managed by
openstack-ansible-tests.

Depends-On: https://review.opendev.org/#/c/665244/
Change-Id: I06607f373842b9943da5479a4e863f68dde2f08c
2019-06-28 18:49:43 +00:00
OpenStack Proposal Bot
96f0d5bd4a Updated from OpenStack Ansible Tests
Change-Id: Ice4c8057d7d521ec35069934ca5b5d7f38017cc1
2019-06-18 18:15:42 +00:00
OpenStack Proposal Bot
21214a6ff9 Updated from OpenStack Ansible Tests
Change-Id: I7b27a5e7e732505f465d75c457156120759031ce
2019-06-11 22:17:41 +00:00
Zuul
3ef62faf53 Merge "db_setup: refactor database setup to a common file" 2019-05-31 13:48:08 +00:00
Mohammed Naser
a9a9488ef2 db_setup: refactor database setup to a common file
This patch refactors the database creation to db_setup.yml which
will eventually be managed by openstack-ansible-tests.

This also re-orders the mq_setup to be done earlier so these system
level dependencies are ready before service activation.

Depends-On: https://review.opendev.org/660558

Change-Id: If3ac6a4e7002740c8409aef6d378d88bc287a9e7
2019-05-28 18:30:07 +00:00
Zuul
b6eed437de Merge "Add ability to place glance-image-import.conf" 2019-05-17 16:24:48 +00:00
Dmitriy Rabotjagov
a70275c653 Drop private argument for include/import role
Since ansible 2.8 dropped private argument is not supported anymore:
https://github.com/ansible/ansible/issues/45038

Change-Id: I13a46af91e3ccd754e71f0ed7c49a187d488f090
2019-05-17 11:34:53 +03:00
Dmitriy Rabotjagov
2bc76d81a3 Add ability to place glance-image-import.conf
New config file glance-image-import.conf was introduced for a while
and it provides ability to customize image upload process.
As it's optional file, we don't distribute it by default, but only when
it's path to config file is set.

Change-Id: I437647aff026a460e6e5f8b73827e31631fd8d42
2019-05-16 17:04:44 +03:00
OpenStack Proposal Bot
3420ea8142 Updated from OpenStack Ansible Tests
Change-Id: I9acc37ec1b8d14426b1103818cd64cbb687d7140
2019-05-09 11:34:30 +00:00
OpenStack Proposal Bot
5a8db61080 Updated from OpenStack Ansible Tests
Change-Id: If620d517f6c98ec4dd7cb8a0afb19caaeadc4e1f
2019-04-17 19:11:33 +00:00
OpenStack Proposal Bot
86cb432236 Updated from OpenStack Ansible Tests
Change-Id: Ie4b2315a9ac79c95bed59fee410b35daa2f6e333
2019-04-17 07:25:20 +00:00
OpenStack Proposal Bot
6065912f3e Updated from OpenStack Ansible Tests
Change-Id: Ie52ed02bf9f514cdf562468774c0b590e3cdc1f8
2019-04-13 20:22:10 +00:00
OpenStack Proposal Bot
6b02611738 Updated from OpenStack Ansible Tests
Change-Id: I52e9f18fc0a7b104df6e6b35465ce22047168015
2019-04-01 13:18:44 +00:00
Dmitriy Rabotjagov
f27c7aa1c3 Convert dynamic includes to static imports
When task/role files are included using include_tasks, tags are not
passed to the included tasks. As a result, tags like neutron-config
do not have the intended effect. This patch changes include_tasks
to import_tasks for all cases where dynamic vars or loops are not used
so that tags are properly handled.

Reference -
https://docs.ansible.com/ansible/latest/user_guide/playbooks_reuse.html
https://bugs.launchpad.net/openstack-ansible/+bug/1815043

Change-Id: I630ea698191aa7ccd71c8cce34978d42c1935678
2019-03-25 09:43:02 +02:00
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
Juri Hudolejev
414df67f86 Fix Glance NFS mount point ownership
Glance NFS mounts are owned by `root` and are not writable by `glance`
user. Proposed change sets the `glance_nfs_client.local_path`
directory ownership to
`glance_system_user_name:glance_system_group_name` so that
Glance can write to that.

Change-Id: I226827d4f44da098961b16fd4450104d7a367205
Closes-Bug: 1813300
Related-Bug: 1759552
2019-02-01 14:19:34 +00:00
Zuul
b8890c4841 Merge "Fix ansible deprecation warnings" 2018-12-21 14:17:11 +00:00
Zuul
392b312e6f Merge "Fix permissions on /var/lib/glance/cache" 2018-12-11 13:55:05 +00:00
Jonathan Rosser
ede416aac3 Fix ansible deprecation warnings
===
[DEPRECATION WARNING]: Using tests as filters is deprecated.
Instead of using `result|search` use `result is search`. This
feature will be removed in version 2.9.
===

Change-Id: I158a42b82d1818fa4e9296343b1b4ab787e8d89d
2018-12-03 17:26:08 +00:00
Jesse Pretorius
88334b5a95 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: I63b56c8003efab5a31b9322a865ccbad74022c09
2018-11-30 14:50:48 +00:00
Mohammed Naser
55f9e3600c Fix permissions on /var/lib/glance/cache
During deployment, it is possible that the folder was previously
created by something else (i.e. in this case, the nspawn deployment
tooling).

We already set the permissions for the subfolders but we don't set
it to the root folder which is causing Glance to fail to start
properly.

Change-Id: I91b3529fd1896ecde814801c0297465f1b956871
2018-11-21 14:35:05 -05:00
Jimmy McCrory
2bb196613d Make glance cache management cron task idempotent
Use a seed in the glance cache management cron task's random
filter so that each host's results are idempotent when re-running.
This prevents the constant changing of the crontab whenever the
playbook is run.

Change-Id: Ia14e867347aeadc6c55cef49f9f2ae0e6f86412f
2018-10-20 13:51:47 -07:00
Andy Smith
209e2ba35c Update messaging notification configuration
This patch removes the conditional inclusion of the notification
section of the service configuration. This ensures that oslo.messaging
notifications use the correct transport for deployments that have
separate rpc and notify messaging backends.

This patch conditionally selects the notifier driver for when
ceilometer is enabled.

Change-Id: Ie73bf32a62d0e959e4905de31517b20b83b5c583
2018-09-24 09:55:33 -04: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
OpenStack Proposal Bot
3305a60ae9 Updated from OpenStack Ansible Tests
Change-Id: I7440b49b71474cee8dce697846d7cd47a7348f7b
2018-08-20 10:48:10 +00:00
OpenStack Proposal Bot
c4e150397d Updated from OpenStack Ansible Tests
Change-Id: I8096f3708e9dd99d8c38647f3fc3257a511bc372
2018-08-15 13:40:42 +00:00
Zuul
3d5703d12a Merge "Setup oslo.messaging extra packages for optional drivers" 2018-08-09 06:15:40 +00:00
Jesse Pretorius
a71d1666d8 Allow tags to be used for MQ tasks
The use of 'include_tasks' and a loop of variables creates
a situation where a user is unable to use tags to scope the
inclusion of only the MQ tasks when running the playbooks.

The use-case this is important for is when the rabbitmq
containers are destroyed and rebuilt in order to resolve
an issue with them, and the user wishes to quickly recreate
all the vhosts/users.

Ansible's 'include_tasks' is a dynamic inclusion, and dynamic
inclusions are not included when using tags. The nice thing
about dynamic inclusions is that they completely skip all
tasks when the condition does not apply, cutting down deploy
time. However, given the use-case, we should rather take on
the extra deployment time.

This patch changes the dynamic inclusion to a static one,
adds a 'common-mq' tag to cover all MQ implementations,
and re-implements the 'common-rabbitmq' tag for the tasks
that relate to RabbitMQ specifically.

It also implements conditionals for each task set so that
the rpc/notify tasks can be skipped if a vhost/user is not
required for that purpose (eg: swift does not use RPC, and
most roles will not use notifications by default).

Depends-On: https://review.openstack.org/588191
Change-Id: Iae85f92ae0204cd8ac2be16c71e548b0cb34f554
2018-08-07 13:39:47 +01:00