Commit Graph

36 Commits

Author SHA1 Message Date
Monty Taylor 83ced7f6e6 Split inventory into multiple dirs and move hostvars
Make inventory/service for service-specific things, including the
groups.yaml group definitions, and inventory/base for hostvars
related to the base system, including the list of hosts.

Move the exisitng host_vars into inventory/service, since most of
them are likely service-specific. Move group_vars/all.yaml into
base/group_vars as almost all of it is related to base things,
with the execption of the gerrit public key.

A followup patch will move host-specific values into equivilent
files in inventory/base.

This should let us override hostvars in gate jobs. It should also
allow us to do better file matchers - and to be able to organize
our playbooks move if we want to.

Depends-On: https://review.opendev.org/731583
Change-Id: Iddf57b5be47c2e9de16b83a1bc83bee25db995cf
2020-06-04 07:44:36 -05:00
Paul Belanger 4a11b7ca4d Retire pabelanger as infra-root
The time has come for me to step down my infra-root duties. Sadly, my
day to day job is no longer directly related to openstack-infra, and
finding it difficult to be involved in 'infra-root' capacity to help the
project.

Thanks to everything on the infra team, everybody is awesome humans! I
hope some time in the future I'll be able to get move involved with the
opendev.org effort, but sadly today isn't that day.

Change-Id: I986bc44f1a17ec76b5d7925b47eb65e6efbaad34
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2020-05-25 08:02:33 -04:00
James E. Blair 085856e318 Add iptables_extra_allowed_groups
This adds a new variable for the iptables role that allows us to
indicate all members of an ansible inventory group should have
iptables rules added.

It also removes the unused zuul-executor-opendev group, and some
unused variables related to the snmp rule.

Also, collect the generated iptables rules for debugging.

Change-Id: I48746a6527848a45a4debf62fd833527cc392398
Depends-On: https://review.opendev.org/728952
2020-05-20 13:18:29 -07:00
David Moreau Simard e6c1f58ae8
Remove dmsimard from infra-root
dmsimard will be around but has stepped down due to time constraints [1]

[1]: http://lists.openstack.org/pipermail/openstack-infra/2020-May/006627.html

Change-Id: Ife3cfdfe3b674c7703adcbcf7f5a4af708fcd03a
2020-05-08 12:13:17 -04:00
Monty Taylor 2f342aec13 Stop logging the rsync of puppet
It takes over the log files. So does the sync of
project-config.

Depends-On: https://review.opendev.org/724418
Change-Id: Ic5c3811bf8b03cd387a2790e4d6ab457f5288c57
2020-04-30 16:11:42 -05:00
Monty Taylor 5e6aa5e70d Use python3 for ansible
We get deprecation warnings from ansible about use
of python2 on xenial hosts. Rather than setting
ansible_python_interpreter to python3 on a host by
host basis, set it globally to python3.

Set it to python for the one host that's too old,
refstack.openstack.org, which is running on trusty
which only has python3.4.

Change-Id: I4965d950c13efad80d72912911bc7099e9da1659
2020-04-28 11:54:15 -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
Monty Taylor ebae022d07 Use project-config from zuul instead of direct clones
We use project-config for gerrit, gitea and nodepool config. That's
cool, because can clone that from zuul too and make sure that each
prod run we're doing runs with the contents of the patch in question.

Introduce a flag file that can be touched in /home/zuulcd that will
block zuul from running prod playbooks. By default, if the file is
there, zuul will wait for an hour before giving up.

Rename zuulcd to zuul

To better align prod and test, name the zuul user zuul.

Change-Id: I83c38c9c430218059579f3763e02d6b9f40c7b89
2020-04-15 12:29:33 -05:00
Monty Taylor 211a9950f5 Add zone keys to zuulcd user
We want to trigger nameserver updates when we merge patches
to zone files.

The zuul zone repo is currently managed by infra-core. We need to
make an improvement to zuul before we can offload core role there
to the zuul-maint team.

Change-Id: I6192f2499465844ccf2a1f903a8897458814da5d
2020-04-02 08:14:45 -05:00
David Shrewsbury b0e2df07b4 Remove shrews from infra-root
Change-Id: I55d9670f216fb6d36be8ec080fcc02e40bf83a68
2020-03-26 13:38:02 -04:00
Adam Coldrick e9b2ca3774 Update key for SotK
Change-Id: Ic0ca12a5036fb9025f05c2a9c267da84af62dafc
2019-05-22 20:09:08 +01:00
Kendall Nelson ddc677db19 Adds new key for diablo_rojo
Change-Id: I3805ebcf613ba4459efe0bc28f6c4b0283eb12df
2019-05-22 00:01:16 +02:00
Clark Boylan d618d9a032 Trim the openstack root list
Unfortunately its been a long time since jhesketh, yolanda, and
rcarrillocruz have been able to take on Infra admin/root duties. I've
reached out to all of them and they agree that now is an appropriate
time to remove their access.

We thank them for their service and will welcome them back should they
return.

Change-Id: Id9994830c506dc28c164c53123a2a248454b5178
2019-04-24 09:03:36 -07:00
Clark Boylan 9342c2aa6d Add zuul user to bridge.openstack.org
We want to trigger ansible runs on bridge.o.o from zuul jobs. First
iteration of this tried to login as root but this is not allowed by our
ssh config. That config seems reasonable so we add a zuul user instead
which we can ssh in as then run things as root from zuul jobs. This
makes use of our existing user management system.

Change-Id: I257ebb6ffbade4eb645a08d3602a7024069e60b3
2019-03-04 14:47:51 -08:00
James E. Blair 800397c3da base-test: iptables: allow zuul console streaming
This adds a group var which should normally be the empty list but
can be overridden by the test framework to inject additional iptables
rules.  It's used to add the zuul console streaming port.  To
accomplish this, the base+extras pattern is adopted for
iptables public tcp/udp ports.  This means all host/group vars should
use the "extra" form of the variable rather than the actual variable
defined by the role.

Change-Id: I33fe2b7de4a4ba79c25c0fb41a00e3437cee5463
2018-08-29 09:20:42 -07:00
Monty Taylor 15663daaf7 Add iptables role
Co-Authored-By: James E. Blair <corvus@inaugust.com>
Change-Id: Id8b347483affd710759f9b225bfadb3ce851333c
Depends-On: https://review.openstack.org/596503
2018-08-27 14:33:32 +00:00
Monty Taylor 92c9a7c869
Clean up puppet variables and playbooks
The puppet playbooks were some of the first we wrote, so they're
slightly wonky.

Remove '---' lines that are completely unnecessary.

Fix indentation.

Move some variables that are the same everywhere into
ansible variables.

Put puppet related variables into the puppet group_vars.

Stop running puppet on localhost in the git playbook.

Change-Id: I2d2a4acccd3523f1931ebec5977771d5a310a0c7
2018-08-17 09:41:12 -05:00
Monty Taylor 1a8c2f66da
Move /opt/system-config/production to /opt/system-config
The production directory is a relic from the puppet environment concept,
which we do not use. Remove it.

The puppet apply tests run puppet locally, where the production
environment is still needed, so don't update the paths in the
tools/prep-apply.sh.

Depends-On: https://review.openstack.org/592946
Change-Id: I82572cc616e3c994eab38b0de8c3c72cb5ec5413
2018-08-17 09:41:02 -05:00
Monty Taylor bab6fcad3c
Remove base.yaml things from openstack_project::server
Now that we've got base server stuff rewritten in ansible, remove the
old puppet versions.

Depends-On: https://review.openstack.org/588326
Change-Id: I5c82fe6fd25b9ddaa77747db377ffa7e8bf23c7b
2018-08-16 17:25:10 -05:00
Monty Taylor 4cca3f8d2a
Add lists exim config to ansible
The mailing list servers have a more complex exim config. Put the
routers and transports into ansible variables.

While we're doing it, role variables with an exim_ prefix - since 'routers'
as a global variable might be a little broad.

iteritems isn't a thing in python3, only items.

We need to escape the exim config with ${if or{{ - because of the {{
which looks like jinja. Wrap it in a {% raw %} block.

Getting the yaml indentation right for things here is non-trivial. Make
them strings instead.

Add a README.rst file - and use the zuul:rolevar construct in it,
because it's nice.

Change-Id: Ieccfce99a1d278440c5baa207479a1887898298e
2018-08-15 15:11:48 -05:00
Zuul ee72c7e3c3 Merge "Remove old inactive users" 2018-08-10 21:16:21 +00:00
Zuul 411b2ccc93 Merge "Make integration tests works" 2018-08-10 19:30:23 +00:00
Monty Taylor 204b36fcfd
Remove old inactive users
We don't really need to keep these in here. We can put a user in the
remove group without them being in this list.

Change-Id: I321d489d4202272e36d25c5b8913ca7cdda25fdd
2018-08-10 12:21:39 -05:00
Monty Taylor d587307aaf
Make integration tests works
Split base playbook into two plays

The update apt-cache handler from base-repos needs to fire before we run
base-server. Split into two plays so that the handler will fire.

Fix use of first_found

For include_vars, using the lookup version of first_found requires being
explicit about the path to search in as well. We also need to use query
together with loop to get skip to work right.

Extract the list of file locations we look for for distro and platform
specific variables into a variable so that we can reuse it instead of
copy-pasta.

The vim package is vim-nox on ubuntu and vim-minimal on debian.

ntpdate only needs to be enabled on boot, it does not need to be
immediately started. At least, that's what the old puppet was doing and
trying to start it immediately breaks centos integration tests.

emacs-nox is emacs23-nox on trusty.

Change-Id: If3db276a5f6a8f76d7ce8635da8d2cbc316af341
Depends-On: https://review.openstack.org/588326
2018-08-10 12:12:32 -05:00
Monty Taylor 4180e8be03
Move key type into the key string
In translating these from puppet, they key_type was messed up.

Change-Id: I28e9a203961cfc049c6fb0522f38e0a5d5647b16
2018-08-08 08:26:55 -05:00
Monty Taylor 0bb4232586 Add base playbooks and roles to bootstrap a new server
We want to launch a new bastion host to run ansible on. Because we're
working on the transition to ansible, it seems like being able to do
that without needing puppet would be nice. This gets user management,
base repo setup and whatnot installed. It doesn't remove them from the
existing puppet, nor does it change the way we're calling anything that
currently exists.

Add bridge.openstack.org to the disabled group so that we don't try to
run puppet on it.

Change-Id: I3165423753009c639d9d2e2ed7d9adbe70360932
2018-08-01 14:57:44 -07:00
Paul Belanger e420c72da7 Stop reporting to puppetdb
We are in the process of shutting down puppetdb.o.o, so stop pushing
reports to it.

Change-Id: Ib27b21c3fb2cd149e57432fd511129a5c8ecc3e9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-06 16:35:56 -04:00
James E. Blair 820ac0b0bb Stop publishing to puppetdb
It is AWOL while under repair.  Stop publishing there until it
is back in reliable service.

Change-Id: I781bfb32090803edcc027d3bc72ea5719951e9d5
2016-10-31 12:20:08 -07:00
Monty Taylor a97a3d4c7a Start namespacing ansible group_vars
It's fine right now with 5, but over time if we keep a flat namespae,
which is not necessary, it's just going to get ugly.

Change-Id: I07a143f45f2eb100c231ea1b7dd617b40f8f231c
2016-02-24 11:57:32 -06:00
Monty Taylor 658b0958ff Configure the host to report to puppetdb as
We need to plumb through a configured host setting to report to puppetdb
as so that certs work.

Change-Id: I290ad569283390bac2a74a9991331c9e86821ab7
2016-02-24 11:38:10 -06:00
Monty Taylor 63325581c1 Configure out puppet runs to log to syslog
The puppet ansible module is growing a flag to be able to send stdout to
syslog. It's growing that because we want to use it. Let's.

Change-Id: I22b1d0e1fb635f2c626d75a11764725c8753bf24
2016-01-21 18:36:16 -05:00
Monty Taylor 4e62f20007 Use puppet apply instead of puppet agent
At long last, the day of reckoning is here. Run puppet apply and then
copy the log files back and post them to puppetdb.

Change-Id: I919fea64df0fbb8681e91ac9425b4c43760bb3dd
2016-01-19 18:40:28 -05:00
Monty Taylor b8b5cf748a Use /opt not /etc as the system-config location
/etc/system-config isn't really a thing.

Change-Id: I8b0598a7645e2dd3505ac239e6194e7f165d2ee7
2016-01-19 11:10:22 -05:00
Monty Taylor 2f9b98b3cd Use the puppet role to copy the puppet code
When we do it as a second playbook, the failure to copy updated code
cannot prevent puppet from running.

Change-Id: I94b06988a20da4c0c2cf492485997ec49c3dca13
Depends-On: I22b7a21778d514a0a1ab04a76f03fdc9c58a05b3
2016-01-19 08:09:01 -05:00
Monty Taylor 43d26acad8 Start copying hiera data everywhere
One step before flipping the switch, start copying hieradata, even
though we're still using agent, so that we can verify as much as we
want.

Change-Id: Iae63fd056cdb17aedd6526b9cbc1d83037ddcbb3
2015-11-24 19:17:35 -05:00
Monty Taylor 1e862a9ade Add some in-tree ansible group vars
As we're using these roles, we'll want to pass potentially different
values to different of our hosts over time. For instance, we may want to
set the jenkins servers to start using puppet apply before we get all
the hosts there. Since we run most of the hosts in a big matching
mechanism, the way we can pass different input values to each host.

Change-Id: I5698355df0c13cd11fe5987787e65ee85a384256
2015-10-30 02:33:27 +00:00