69 Commits

Author SHA1 Message Date
Clark Boylan
ffcd1791bf Cleanup nodepool builder clouds.yaml
We ended up running into a problem with nodepool built control plane
images (has to do with boot from volume not allowing us to delete images
that are in use by a nova instance). We have decided to clean this up
and go back to not doing this until we can do it more properly.

Note this isn't a revert because having a group for access to control
plane clouds does seem like a good idea in general and I believe there
have been changes we'd have to resolve in the clouds.yaml files anyway.

Depends-On: https://review.opendev.org/#/c/665012/
Change-Id: I5e72928ec2dec37afa9c8567eff30eb6e9c04f1d
2019-07-22 13:55:29 -07:00
Monty Taylor
ff1b8a94c6 Add control plane clouds to nodepool builder clouds.yaml
In order to have nodepool build images and upload them to control
plane clouds, add them to the clouds.yaml on the nodepool-builder
hosts. Keep them out of the launcher configs by splitting the config
templates. So that we can keep our copies of things to a minimum,
create a group called "control-plane-clouds" and put bridge and nb0*
in it.

There are clouds mentions in here that we no longer use, a followup
patch will clean those up.

NOTE: Requires shifting the clouds config dict from
host_vars/bridge.openstack.org.yaml to group_vars/control-plane-clouds.yaml
in the secrets on bridge.

Needed-By: https://review.opendev.org/640044
Change-Id: Id1161bca8f23129202599dba299c288a6aa29212
2019-05-23 14:34:10 -05:00
Zuul
91a3ce7e4d Merge "Update zuul servers to puppet 4" 2019-05-14 20:21:03 +00:00
Ian Wienand
2acfc176b0 Remove graphite.openstack.org
The server has been removed, remove it from inventory.

While we're here, s/graphite.openstack.org/graphite.opendev.org/'
... it's a CNAME redirect but we might as well clean up.

Change-Id: I36c951c85316cd65dde748b1e50ffa2e058c9a88
2019-05-08 05:55:33 +10:00
Colleen Murphy
180897e49a Update zuul servers to puppet 4
This leaves ask.o.o and lists.o.o, which are still running Trusty, and
the cgit servers, which are likely to be decommissioned soon.

Change-Id: I78e7fd9e3079cc760da0aad955f6eeb32d442fc3
2019-04-17 16:53:56 +00:00
Colleen Murphy
c7f8b298ef Update nodepool servers to puppet 4
Except nb03.openstack.org, which runs on arm64 for which there are no
puppet 4 packages.

Change-Id: Ia85d20700309a9cd886886c4d4da52fb80ac595f
2019-04-11 21:35:51 +00:00
Ian Wienand
4abd0a3184 yamlgroup: add regex match; exclude puppet4 for arm64 mirrors
Two related changes that need to go together because we test with the
production groups.yaml.

Confusingly, there are arm64 PC1 puppet repos, and it contains a bunch
of things that it turns out are the common java parts only.  The
puppet-agent package is not available, and it doesn't seem like it
will be [1].  I think this means we can not run puppet4 on our arm64
xenial ci hosts.

The problem is the mirrors have been updated to puppet4 -- runs are
now breaking on the arm mirrors because they don't have puppet-agent
packages.  It seems all we can really do at this point is contine to
run them on puppet3.

This is hard (impossible?) to express with a fnmatch in the existing
yamlgroups syntax.  We could do something like list all the mirror
hosts and use anchors etc, but we have to keep that maintained.  Add
an feature to the inventory plugin that if the list entry starts with
a ^ it is considered a full regex and passed to re.match.  This
allows us to write more complex matchers where required -- in this
case the arm64 ci mirror hosts are excluded from the puppet4 group.

Testing is updated.

[1] https://groups.google.com/forum/#!msg/puppet-dev/iBMYJpvhaWM/WTGmJvXxAgAJ

Change-Id: I828e0c524f8d5ca866786978486bc04829464b47
2019-04-11 21:34:57 +00:00
Colleen Murphy
a988c9253e Update AFS servers to puppet 4
Change-Id: I02d63fe1198a8d023814820602d425f891efdb73
2019-04-05 09:31:29 -07:00
Colleen Murphy
db0cf87ddb Update review.openstack.org to puppet 4
Change-Id: I841bae26862d4da41849835bb9f9548a2011cc95
2019-04-01 14:54:04 -07:00
Colleen Murphy
9a7172ab8a Upgrade lists.katacontainers.io to puppet 4
Change-Id: Ic0235ffec7d65a30a44fb518414e872a44b99f37
2019-04-01 14:53:42 -07:00
Clark Boylan
fa0d4f949e Update even more servers to puppet4
Change-Id: Ice2a07e0f1914b45690455b6b7199fc8441f21be
2019-03-22 09:51:25 -07:00
Colleen Murphy
cb868e8f97 Upgrade some servers to puppet 4
In roughly lexicographical order, upgrade a batch of servers to puppet
4. We skip ask-staging because although it is in the futureparser group
it was temporarily disabled in puppet and so hasn't actually gone
through the futureparser validation stage yet.

Depends-On: https://review.openstack.org/643465
Change-Id: I3971ffb9800e95aaaba0076ec3bd6a05cd92a750
2019-03-14 21:34:23 +00:00
Zuul
0c59702709 Merge "Turn on future parser for afs servers" 2019-02-21 21:55:06 +00:00
James E. Blair
e9e1535646 Temporarily stop installing openshift
Change-Id: If7a1070da62fb1d1aec5c5c530e0af174e3c3cf8
2019-02-14 10:19:59 -08:00
Colleen Murphy
7332b423eb Turn on future parser for afs servers
Change-Id: I95237cb46c0258f9bc1e6d7c48f8321dd89674ba
2019-01-10 11:25:36 +01:00
Zuul
b671e4056e Merge "Install openshift module on bridge" 2019-01-09 23:27:23 +00:00
Clark Boylan
b8b1fdde75 Nameservers are now managed with ansible
Remove the puppetry for managing nameservers as we now use ansible
configured name servers without puppet.

We will need to follow this up with deletion of the existing
ns*.openstack.org and adns1.openstack.org servers.

Change-Id: Id7ec8fa58c9e37ce94ec71e4562607914e5c3ea4
2019-01-08 16:16:49 -08:00
Colleen Murphy
edc0571d66 Fix glob for lists.katacontainers.io
Change-Id: I000146f0ea048ea1c82a766875ce536f63b7d940
2019-01-04 08:08:52 -08:00
Colleen Murphy
2f766f2cb5 Turn on future parser for one zuul executor
Change-Id: I8e5b0da658ebc85a7182341b5ac9e135f633bb42
2019-01-04 08:08:52 -08:00
Colleen Murphy
09d854e899 Turn on future parser for one nodepool builder
Change-Id: I92ad4527653ee2024f938b50e7e8062396824af3
2019-01-04 08:08:52 -08:00
Colleen Murphy
289520bd3b Turn on the future parser for master nameserver
Change-Id: I30a42d01453f48fd4edc3b3e71b0b4218ba1cfa2
2019-01-04 08:08:47 -08:00
Colleen Murphy
7d51319e4f Turn on future parser for one zookeeper instance
Change-Id: Id0f4131fdc3a540c318895b7ba1e9c63a7d7cbb9
2019-01-03 11:36:01 +01:00
Colleen Murphy
7b34d3cc5a Turn on the future parser for all mirrors
Change-Id: Id0de8127f66d896b8020f981ce5611ed887c205f
2019-01-03 11:35:04 +01:00
Colleen Murphy
bf9b7b0e88 Turn on future parser for mirror-update.o.o
Change-Id: I2b23099b832a771233b96753cbed6cd8d1508d00
2019-01-03 11:33:55 +01:00
James E. Blair
76c7720df1 Install openshift module on bridge
This is so that we can use the ansible k8s_raw module on bridge
to interact with k8s clusters.

Change-Id: I1bc0de734a8635db528ce159bad6710246309fb9
2018-12-20 13:02:40 -08:00
Jeremy Stanley
b00ce47356 Rejigger hostgroup tests for server removals
An upcoming change will remove review.openstack.org and
puppetmaster.openstack.org from our hostgroups, since these servers
have been deleted from the provider already. We were explicitly
testing the hostgroup membership for the former, so replace that
with a couple of new ones which should provide more stable coverage
going forward.

Change-Id: Ida28b65e9f1dc01f233cc9bff4ce32aef70e347a
2018-12-20 17:47:11 +00:00
David Moreau Simard
35e87d6879
Add support for enabling the ARA callback plugin in install-ansible
This change enables the installation of the ARA callback plugin in
the install-ansible role. It does not take care of any web reporting
capabilities.

ARA will not be installed and set up by default.
It can be installed and configured by setting
"install_ansible_enable_ara" to "true".

Co-Authored-By: David Moreau-Simard <dmsimard@redhat.com>
Co-Authored-By: Ian Wienand <iwienand@redhat.com>
Change-Id: Iea84ec8e23ca2e3f021aafae4e89c764f2e05bd2
2018-12-04 17:46:47 -05:00
David Moreau Simard
dd554dbd02
Prefix install_openstacksdk variable
Rename install_openstacksdk to install_ansible_opensatcksdk to make it
clear this is part of the install-ansible role, and it's the
openstacksdk version used with ansible (might be important if we
switch to virtualenvs). This also clears up inconsistency when we add
ARA install options too.

Change-Id: Ie8cb3d5651322b3f6d2de9d6d80964b0d2822dce
2018-12-04 17:46:47 -05:00
James E. Blair
2bc9bc8925 Disable openstack inventory plugin
We don't use this anymore, remove it from our config.

Change-Id: I561a6942978fca67d8f83059a957f45540ea52d7
2018-11-30 09:25:09 -08:00
Ian Wienand
06da49c6e2 bridge.o.o: Use latest openstacksdk
Similar to the pinning introduced in
Ic465efb637c0a1eb475f04b0b0e356d8797ecdeb, use the "latest"
openstacksdk package and allow for passing of pinned versions if
required.

Update the devel test to also use the master of opensatcksdk

Change-Id: I4b437ca9024c87903bdd3569c8309cde725ce28e
2018-11-08 09:50:58 +11:00
Ian Wienand
24c81fb0c3 Pin bridge.o.o to ansible 2.7.0, add devel testing job
This adds arguments to "install-ansible" to allow us to specify the
package name and version.

This is used to pin bridge.o.o to 2.7.0 (see
I9cf4baf1b15893f0c677567f5afede0d0234f0b2).

A new job is added to test against the ansible-devel branch. Added as
voting for now, until it proves to be a concern.

Change-Id: Ic465efb637c0a1eb475f04b0b0e356d8797ecdeb
2018-11-08 09:50:53 +11:00
Monty Taylor
214662a424 Install latest openstacksdk on bridge
It's designed to always be used from the latest version.

This trips an ansible lint rule (ANSIBLE0010) which we can ignore, as
we often have pip things that we want to install the latest release
of automatically.

Change-Id: Ieac93ab3a555f2423d4fbcf101d6d9681ae0e497
2018-11-07 06:20:33 +11:00
Clark Boylan
6096e0cf28 Remove mirrors from webservers in groups test
We removed the mirror nodes from the webservers group to fix iptables
rule application on the nodes. Unfortunately we didn't update our test
that tries to assert mirrors should be in the webservers group. Update
the test results fixture to remove webservers as a valid group for a
mirror node.

Change-Id: Iba18e54f4df4a36c0247f65642faacca9d195769
2018-11-02 12:20:20 -07:00
Zuul
2446e616d0 Merge "Add unittest for yamlgroup inventory plugin" 2018-11-02 15:47:35 +00:00
Zuul
e6f2ad0d8b Merge "Add yamlgroup inventory plugin" 2018-11-02 15:46:09 +00:00
Ian Wienand
526a423dd2 Add unittest for yamlgroup inventory plugin
This mocks out enough of the Ansible inventory framework so we can
test the group matching against a range of corner cases as present in
the results.yaml file.

Change-Id: I05114d9aae6f149122da20f239c8b3546bc140bc
2018-11-02 08:20:02 +11:00
Monty Taylor
e998db36f2 Add yamlgroup inventory plugin
The constructed inventory plugin allows expressing additional groups,
but it's too heavy weight for our needs. Additionally, it is a full
inventory plugin that will add hosts to the inventory if they don't
exist.

What we want instead is something that will associate existing hosts
(that would have come from another source) with groups.

This also switches to using emergency.yaml instead of emergency, which
uses the same format.

We add an extra groups file for gate testing to ensure the CI nodes
get puppet installed.

Change-Id: Iea8b2eb2e9c723aca06f75d3d3307893e320cced
2018-11-02 08:19:53 +11:00
James E. Blair
55b3c0374a Install current ansible
2.7.0 has been released so we can remove our pre-release installation
version pin.

Change-Id: I9cf4baf1b15893f0c677567f5afede0d0234f0b2
2018-10-10 15:27:31 -07:00
Clark Boylan
681e24d27d Treat unparsed inventory as a failure
We don't want to run ansible if we don't get a complete inventory from
our clouds. The reason for this is we cannot be sure that the ordering
of git servers, gerrit, and zuul or our serialized updates of afs
servers will work correctly if we have an incomplete inventory.

Instead we just want ansible to fail and try again in the future (we can
then debug why our clouds are not working).

From the ansible docs for any_unparsed_is_failed:

  If 'true', it is a fatal error when any given inventory source
  cannot be successfully parsed by any available inventory plugin;
  otherwise, this situation only attracts a warning.

Additionally we tell openstack inventory plugin to report failures
rather than empty inventory so that the unparsed failures happen.

Change-Id: I9025776af4316fbdd2c910566883eb3a2530852a
2018-09-12 15:09:21 -07:00
James E. Blair
09d10bdbdc Install ansible 2.7.0rc1 on bridge
In order to use handlers with the free strategy, we need this
fix: 5f953d1129

Change-Id: Ibbbb65e2eaa34220f35f3621b4a7fd46c0f6687f
2018-09-07 13:31:09 -07:00
Ian Wienand
bb568ddde8 Up profiled tasks limit
Some of our summaries need to display more than 20 tasks to show
complete information.  Up to 50, which should be enough for anyone.

Change-Id: I3ae3bb714ea7f5fb094f85c33c19ea3c8a81f6c3
2018-09-06 07:28:26 +10:00
Ian Wienand
3657cacfca Add logrotate role and rotate ansible log files
Add a logrotate role that allows basic configuration of a logrotate
configuration for a specific log-file.

Use this role in the ansible-cron and install-ansible roles to ensure
the log output they are generating is rotated.

This role is not intended to manage the logrotate package (mostly to
avoid the overhead of frequently checking package state when this is
expected to be called for multiple configuration files on a server).
We add it as a base package to our servers.

Tests are added for testinfra.

Change-Id: I90f59c3e42c1135d6be120de38e942ece608b761
2018-09-05 09:15:46 +10:00
Paul Belanger
ad0e8bd241 Add profile_tasks and timer callbacks for ansible
These add extra datetime information to tasks, in an effort to help
profile ansible. More info at:

  https://docs.ansible.com/ansible/2.5/plugins/callback/profile_tasks.html
  https://docs.ansible.com/ansible/2.5/plugins/callback/timer.html

Change-Id: Iebd40bfe06484ec1c6f938570eb6cb60e532fb9f
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-08-28 18:30:31 -04:00
Zuul
18bcfeb5c8 Merge "Don't create "admin" group" 2018-08-24 19:57:29 +00:00
Ian Wienand
114953cbff Don't create "admin" group
According to the Ubuntu 12.04 release notes, up until Ubuntu 11.10
admin access was granted via the "admin" unix group, but was changed
to the "sudo" group to be more consistent with Debian et al.

Remove the now unnecessary group

Modify the install-ansible role to set some directory ownership to
root:root; there didn't seem to be any reason to use admin here.

This means the "users" role is no longer required in the bridge.yaml,
as it is run from the base playbook anyway.

Change-Id: I6a7fdd460fb472f0d3468eb080aebbb010931e11
2018-08-24 08:50:22 -07:00
Ian Wienand
4402201d56 roles: Add README.rst and lint
These role docs aren't exactly War and Peace, but I think longer term
as we fiddle about making things generic or not and moving them
around, we'll be better off having kept ourselves to writing
*something*.

Add terse README.rst files for all existing roles, and add simple
linter check to ensure new roles get them too.

Change-Id: Ibc836310fb8a45e12c2e31f112d92509ac350413
2018-08-23 21:34:42 +10:00
Zuul
45930d6cb4 Merge "Have ansible retry ssh connections" 2018-08-20 20:41:03 +00:00
Monty Taylor
f6533076f7
Have ansible retry ssh connections
In zuul's ansible config we add retries=3 to deal with transient issues.
Do the same thing for our production runs.

Change-Id: Ide53bae34e5e622de1fd4741706752e8728da20e
2018-08-20 13:18:21 -05:00
Monty Taylor
03f52d0bc8
Move ansible log into directory
file: state=touch returns changed every time. Instead, put the log files
into a /var/log/ansible directory.

Change-Id: I086d803f0e532b9da41cb01d4e7d2ed66245dfc1
2018-08-17 12:57:20 -05:00
Monty Taylor
03d09b777e
Use openstack and groups inventory from system-config
Rather than copying these out of system-config inside of
install-ansible, just point the ansible.cfg to them in the system-config
location. This way as changes come in that have group updates we don't
have to first apply them to the system.

Change-Id: I1cefd7848b7f3f1adc8fbfa080eb9831124a297b
2018-08-17 11:47:13 -05:00