81 Commits

Author SHA1 Message Date
Zuul
99f809ccc5 Merge "Use zuul checkouts of ansible roles from other repos" 2020-05-07 18:41:21 +00:00
Ian Wienand
e400865dd0 Retire nb01/02.openstack.org
Remove references to these older builders.  We thank them for their
service.

Change-Id: I1f48f070406bee79ac0d1de61beb44eb7d58d605
2020-05-07 13:06:26 +10:00
Monty Taylor
4b9d1a88bd Use zuul checkouts of ansible roles from other repos
We have two standalone roles, puppet and cloud-launcher, but we
currently install them with galaxy so depends-on patches don't
work. We also install them every time we run anything, even if
we don't need them for the playbook in question.

Add two roles, one to install a set of ansible roles needed by
the host in question, and the other to encapsulate the sequence
of running puppet, which now includes installing the puppet
role, installing puppet, disabling the puppet agent and then
running puppet.

As a followup, we'll do the same thing with the puppet modules,
so that we arent' cloning and rsyncing ALL of the puppet modules
all the time no matter what.

Change-Id: I69a2e99e869ee39a3da573af421b18ad93056d5b
2020-04-30 12:39:12 -05:00
Monty Taylor
f0b77485ec Run Zuul using Ansible and Containers
Zuul is publishing lovely container images, so we should
go ahead and start using them.

We can't use containers for zuul-executor because of the
docker->bubblewrap->AFS issue, so install from pip there.

Don't start any of the containers by default, which should
let us safely roll this out and then do a rolling restart.
For things (like web or mergers) where it's safe to do so,
a followup change will swap the flag.

Change-Id: I37dcce3a67477ad3b2c36f2fd3657af18bc25c40
2020-04-24 09:18:44 -05:00
James E. Blair
42574b2b37 Run ZK from containers
Migration plan:
* add zk* to emergency
* copy data files on each node to a safe place for DR backup
* make a json data backup: zk-shell localhost:2181 --run-once 'mirror / json://!tmp!zookeeper-backup.json/'
* manually run a modified playbook to set up the docker infra without starting containers
* rolling restart; for each node:
  * stop zk
  * split data and log files and move them to new locations
  * remove zk packages
  * start zk containers
* remove from emergency; land this change.

Change-Id: Ic06c9cf9604402aa8eb4bb79238021c14c5d9563
2020-04-17 08:43:09 -07:00
Monty Taylor
c117c1106d Update install-ansible away from /opt/system-config
So that we can start running things from the zuul source rather
thatn update-system-config and /opt/system-config, we need to
install a few things onto the host in install-ansible so that the
ansible env is standalone.

This introduces a split execution path. The ansible config is
now all installed globally onto the machine by install-ansible
and does not reference a git checkout.

For running ad-hoc commands, an ansible.cfg is introduced inside
the root of the system-config dir. So if ansible-playbook is
executed with PWD==/opt/system-config it will find that ansible.cfg,
it will take precedence, and any content from system-config
will take precedence.

As a followup we'll make /opt/system-config/ansible.cfg written
out by install-ansible from the same template, and we'll update
the split to make ansible only work when executed from one of
the two configured locations, so that it's clear where we're
operating from.

Change-Id: I097694244e95751d96e67304aaae53ad19d8b873
2020-04-14 14:54:23 -05:00
Monty Taylor
ca5549fc6c Add review and etherpad to backup group
We should probably back these up.

Change-Id: I1e174273faefacea98ebece7a90a1baf93d52245
2020-04-10 13:46:25 -05:00
Monty Taylor
5d238b1b57 Use ansible debug callback plugin
The normal callback plugin is unreadable for stdout and stderr things.
Update to use the debug plugin which prints their output nicely in
the way we'd like.

Change-Id: I3a6b31af7d6132a1ee31a280f7f21f3132856273
2020-03-31 15:54:58 -05:00
Monty Taylor
d3c8c1077b Switch to running gerrit via ansible+containers
This should be mostly a no-op - but we will need to do a shutdown
in emergency mode.

Tell the gerrit role to not run compose up when run as part of
remote_puppet_git.

Change-Id: Id45376c2697656a12afeacf317b6f26c85c08dad
2020-03-19 17:21:39 -05:00
Monty Taylor
083cbf2911 Get LE certs for review.o.o
We have LE dns entries for review.o.o, but we're not actually
requesting the cert. Go ahead and request it - it'll make the
apache config easier to sort out.

Get the openstack.org certs for review-dev while we're at it.

Change-Id: I91d06c97993ba37204bd1fc326ae823e1b9c0c1a
Depends-On: https://review.opendev.org/707267
Depends-On: https://review.opendev.org/707255
2020-02-11 17:01:43 -06:00
Ian Wienand
cfa816d6d9 install-ansible: Pre-install build deps for aarch64
Because there's no wheels for aarch64, ensure the build dependencies
are installed.

Change-Id: I9a708cbedd4f0dd471ebbd758f7cbe82be7e47c4
2019-12-16 10:23:38 +11:00
Monty Taylor
8725a1ee53 Squash two ansible warnings
Add bool to use_upstream_docker conditional

This is an ansible behavior change that's coming in 2.12 but is
currently spewing warnings. The warnings make the log really hard
to read, so just fix it.

Disable group name auto-renaming

If you have group names with non-python identifier characters, it
prevents you from looking it up in jinja like "groups.group-name"
so ansible auto-transforms it so you can do "groups.group_name".
This is a confusing behavior which is going away. However, ansible
is warning everyone who has groups with characters in them as it
has no idea how you might be accessing those group names. Add
a config setting to suppress the warning about -'s in group names.

Change-Id: Ib3262025799af7c3171ed0b079cb1dd969075931
2019-10-20 08:02:43 +09:00
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