Commit Graph

33 Commits

Author SHA1 Message Date
Dmitriy Rabotyagov 5f76a510ac Deprecate os-panko role
Since upstream Panko project has retired, we deprecating role for it.

Since we might want to get some patches in for stable branches, we're
deprecating role instead of retiring it.

Depends-On: https://review.opendev.org/c/openstack/project-config/+/799802
Change-Id: I35e008bcc9b35373dc6db2672ee1cabb328e7f9b
2021-07-07 15:44:31 +03:00
Zuul ece14c96e5 Merge "[goal] Deprecate the JSON formatted policy file" 2021-04-19 20:40:46 +00:00
Jonathan Rosser d83e139831 Fix cron module special_time parameter.
The original commit used the wrong module parameter name, fix it.

Change-Id: I34566ff3522bfa2366ca7b2ec412ed18c65874d4
2021-04-15 22:42:44 +01:00
Dmitriy Rabotyagov a396d45942 [goal] Deprecate the JSON formatted policy file
As per the community goal of migrating the policy file
the format from JSON to YAML[1], we need to replace policy.json to
policy.yaml and remove deprecated policy.json.

config_template has been choosen instead of the copy, since it can
properly handle content that has been lookuped.

We make a separate task not to restart service when it's not needed.

[1] https://governance.openstack.org/tc/goals/selected/wallaby/migrate-policy-format-from-json-to-yaml.html

Change-Id: Ib434e98cd4df42ea77bcb985eafe2e56b1ac6fe9
2021-04-06 12:21:54 +00:00
Jonathan Rosser 73863b9083 Use ansible_facts[] instead of fact variables
See https://github.com/ansible/ansible/issues/73654

Change-Id: I1f848a2d08be7975a1bde9832fea1e29f5e7b410
2021-03-16 08:14:58 +00:00
OpenStack Proposal Bot 8f42bece6b Updated from OpenStack Ansible Tests
Change-Id: Iaeb3d4b698c8c08cea20b59934acae1b40e53afb
2021-01-11 08:32:20 +00:00
Dmitriy Rabotyagov c2b945d1a1 Cleanup apache tasks
These tasks were added for upgrade purposes and are not
needed anymore.

Change-Id: I533b15e720fdaa366b1aae36151966780c043a40
2020-10-08 17:59:46 +03:00
OpenStack Proposal Bot 49f435a7aa Updated from OpenStack Ansible Tests
Change-Id: I6eeaa3e623da62c78d1984c7c400242b233f27d6
2020-10-07 09:21:03 +00:00
Dmitriy Rabotyagov 25a826e6a6 Define condition for the first play host one time
We use the same condition, which defines against what host some "service"
tasks should run against, several times. It's hard to keep it the same
across the role and ansible spending additional resources to evaluate
it each time, so it's simpler and better for the maintenance to set
a boolean variable which will say for all tasks, that we want to run
only against signle host, if they should run or not now.

Change-Id: I5bdf7a83d7a5809887f4a445619d87bc7e14b40b
2020-10-02 10:42:39 +00:00
Jonathan Rosser 3040ca268e Use the utility host for db setup tasks
Move it to the service setup host (defaults to utility[0]) instead
of the galera[0] host, and use galera_address (defaults to internal VIP)
as the endpoint instead of a local connection on the db host.

Depends-On: https://review.opendev.org/755484
Change-Id: Ic1e031510391795e0971a7fbcdfe79dc939c9bec
2020-10-01 13:37:12 +00:00
OpenStack Proposal Bot 97299c096c Updated from OpenStack Ansible Tests
Change-Id: Ic108f2ede39a439743fcf40a096b78572b2b7304
2020-08-12 11:34:53 +00:00
OpenStack Proposal Bot 7b70b263d6 Updated from OpenStack Ansible Tests
Change-Id: I5430206cc18a4af4d0fb4de60910d69902e3933c
2020-06-08 19:56:39 +00:00
Jonathan Rosser 57d718385c Allow venv python interpreter to be overridden
Change-Id: If5ba771d0ed52c44551ba473fc07275306337b08
2019-09-11 21:20:24 +01:00
Zuul ca2f1e4d0a Merge "Start using uWSGI role" 2019-09-06 15:46:34 +00:00
Dmitriy Rabotyagov 2cb6ab1815 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.

Change-Id: Ied62269392fa8d7b0ddfe6e29f52c34ddbbbce20
2019-09-06 00:45:45 +03:00
OpenStack Proposal Bot 1b88e8ab09 Updated from OpenStack Ansible Tests
Change-Id: I7e7c8c50e3d6cd0c97a8a6ef8f5854fce5d16e96
2019-09-04 15:17:48 +00:00
Dmitriy Rabotyagov ece27edf70 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.

Change-Id: I2d849e55a1bb300e3f9290ef173b259f71cf3b45
2019-08-07 20:23:17 +03:00
Dmitriy Rabotyagov 50f1a48c6c Migrate panko to use uWSGI
This patch moves panko-api from usage of apache with mod_wsgi
to uWSGI, which means unification across another roles and
reduced maintenance costs

During migration period tasks that ensures apache won't listen
on panko_service_port are present, but they are supposed to be removed
after train release.

Change-Id: Ic61c60e2db45ac5e51bb3a43d7928648d9ae5d19
2019-08-02 16:28:12 +03:00
Dmitriy Rabotyagov caeb205aeb 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: I83b54a175b15932036755c2673993990492592e8
2019-07-17 19:17:17 +03:00
Guilherme Steinmüller 4b86f269d5 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.

Change-Id: If399f3a515b0f3306819c23f1f62bc1b6ee0ea32
2019-06-12 15:42:02 +00:00
Dmitriy Rabotjagov a3b0443be5 Update role for new source build process
The variables panko_developer_mode and panko_venv_download
no longer carry any meaning. This review changes panko 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 installation 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.

Change-Id: I82f9eceb171befc1a47d18134fcc6c1482f14eef
2019-03-28 09:40:38 +02:00
Christian Zunker 5a6add8c88 Add panko-expirer cron job
Automatically delete events when TTL for events
is greater than zero.

Change-Id: Ifecec755edc4d9b1eb202abceb7fecd5aaf87fe7
2018-12-24 09:37:41 +01:00
Jesse Pretorius 0ade5f38ef 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: I039cb8485447c7b0e4159aea7944d6ba8241af20
2018-11-30 16:27:00 +00:00
Jesse Pretorius a188bb25f0 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: Ibe21d0114a935bd2f91ca7a570c8051e14611548
Implements: blueprint python-build-install-simplification
Signed-off-by: Jesse Pretorius <jesse.pretorius@rackspace.co.uk>
2018-09-03 11:09:55 +00:00
caoyuan bcba7cf1eb use include_tasks instead of include
Change-Id: Ida8caa3c714767d785a45e2efc039e97be878778
2018-08-15 04:53:18 +00:00
Jesse Pretorius c7dfd59acf 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: I4279311e1022d8625503b41e69573e680fbb742a
2018-07-14 14:41:40 +01:00
Jean-Philippe Evrard 9df93bf606 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: I15c2baf69195543100bb3c25cabb2e16dac1984e
2018-07-12 16:57:01 +02:00
Jesse Pretorius e5b8094b74 Move database creation into role
There is no record for why we implement the database creation outside
of the role in the playbook, when we could do it inside the role.

Implementing it inside the role allows us to reduce the quantity of
group_vars duplicated from the role, and allows us to better document
the required variables in the role. The delegation can still be done
as it is done in the playbook too.

In this patch we implement a new variable called 'panko_db_setup_host'
which is used in the role to allow delegation of the database setup
task to any host, but defaults to the first member of the galera_all
host group. We also document the variable 'panko_galera_address' which
has been used for a long time, but never documented. A bunch of unused
variables have also been removed.

Change-Id: Ib31b94433183bb12209fe824ea5c8ee67aaa8276
2018-06-28 17:49:30 +00:00
Zuul 185feed051 Merge "Replace virtualenv-tools with a script" 2018-04-19 15:17:05 +00:00
Jesse Pretorius f1f9ac8ee4 Do not log passwords
This prevents data to be leaked into the callback plugin.

Change-Id: I0c3e30f7935329c9758e4aa9d0b678ac3bb5b078
2018-04-18 12:19:23 +01:00
Jesse Pretorius 3a254e3582 Replace virtualenv-tools with 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: I8b40b4bceaf90fadecb4512c0cb9dbee143fe987
Partial-Bug: #1741634
Partial-Bug: #1764470
2018-04-18 10:11:20 +00:00
gokhan.isik 0e71f81ba4 panko role is created 2018-01-09 13:59:36 +03:00
gokhan.isik 0afd4d81e4 Openstack Ansible panko service role created 2018-01-05 14:59:49 +03:00