Commit Graph

89 Commits

Author SHA1 Message Date
Monty Taylor 8c9b4af143 Stop cloning more puppet modules
Previous review pointed out some additional modules we probably
aren't using any longer.

Remove the openafs::client section from openstack_project::server
because we're doing this with ansible now.

Depends-On: https://review.opendev.org/733890
Change-Id: Ib5104da9cf7d53b77191f48ec185f5d667d51944
2020-06-05 12:09:30 -05:00
Clark Boylan 9c465131db Make kdc03 the master kerberos kdc and admin server
This change will convert kdc03 to a master from a hot standby and will
remove kdc01 from management.

Cutover plan:
  Disable kdc01 in ansible emergeny file
  Stop run-kprop cron on kdc01
  Stop kadmind on kdc01
  Execute run-kprop.sh on kdc01
  Merge this change
  Wait for puppet to convert kdc03 to the master
  Confirm that run-kprop works from kdc03 to kdc04
  Update dns records as documented in our kerberos docs
  Test kadmin works
  Delete old kdc01 server

Change-Id: Ib14b11fa1f0a6bc11b0f615ce5b6f6be214b5629
2019-02-22 15:47:49 -08:00
Clark Boylan 452760a49c Add kdc03.openstack.org
This new Xenial server is being added as a kerberos standby node but
will be used to replace kdc01 as the master once fully configured and
happy as a standby. This replaces the old trusty server.

Note that the server wasn't added to opendev.org as we don't have a
kerberos realm for that domain so that would be a separate activity for
the future.

Change-Id: I4cc5fcd7504c98a7bcd9dc4f2ad57bb5bf8b54bd
2019-02-22 10:30:57 -08:00
David Shrewsbury 6a8707a02d Enable unattended upgrades
Debian gets this from 'unattended-upgrades' and Red Hat family
gets it from yum-cron.

Change-Id: Ie00f6073ad1127b11a89e69816baf47011480dbf
2018-08-28 12:05:15 -04:00
James E. Blair 3d166f99f6 Add unbound role
Add it to the base playbook and add a testinfra test for it.

Change-Id: Id5098f33aac213e6add6f061684d0214dc99ab5b
2018-08-27 13:29:18 -07:00
James E. Blair dceb09d886 Add snmpd role and add it to base
Change-Id: I00bf872e8504efb26d20832f1da82da8cfe87258
2018-08-27 07:34:36 -07:00
David Shrewsbury b3b698c6ff Add timezone role
Contains a handler to restart crond when tz is changed. Cron service
name differs across distros.

Removes the puppet-timezone usage.

Change-Id: I4e45d0e0ed37214ac491f373ff2d37750e720718
2018-08-27 07:34:28 -07:00
David Shrewsbury 360e0107a7 Add NTP service to base-server
Removes puppet-side ntp setup.

Change-Id: I75a87ca55fd4b75c5715cc3fd2b708e0b0ae2c20
2018-08-27 07:34:25 -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 eae9a42b4b
Manage sshd config with ansible
We write out a specific sshd config file. Let's do it with ansible.

Change-Id: Ie92b6ec6c8772d31009d1c2a2f7d5558bb38f67a
2018-08-20 11:26:38 -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 11fb693530
Add bridge.openstack.org to trusted ssh list
We put in IP restrictions on logging in as root on our servers. Add
bridge.openstack.org's IPs so that we can ansible from it.

Change-Id: Id1cd81c41806cd028d834fb56e1686687d3fb65d
2018-08-03 08:35:01 -05:00
Ian Wienand b4bd2f8177 Ensure yum-cron is running
Ensure the service is running so we get automatic updatesx

Change-Id: I9bf7f23ad5fb52488330b082de6f6ad6d4643177
2018-06-12 09:42:24 +10:00
Zuul 865ef69ca0 Merge "Setup bash history to contain standard timestamps (RFC3339)" 2018-02-28 19:21:02 +00:00
Ian Wienand 514b35f8b7 Allow multiple declarations of ARM64 of HWE kernel package
The openafs puppet module also declares a linux-generic-hwe-16.04
package for arm64 as it is required for those modules.  This is to
cover the non-afs server case, where the later kernel still works
better anyway.  Switch to ensure_packages, which handles if it is
already declared, so everyone can live together in peace.

Change-Id: I72c9423956b7739695a04a5de27f5d89c67240d0
2018-02-19 13:12:34 +11:00
Zuul f266d57a91 Merge "Add aarch64 configuration" 2018-02-15 20:31:38 +00:00
Ian Wienand 97e74314f5 Add aarch64 configuration
Add a valid aarch64 sources configuration file, and update the
template to deploy the file on a per-architecture basis.

Ensure we install the HWE kernel for arm64 servers

Change-Id: If345e704540ea10828060d26e930a61ce68ed178
2018-02-15 14:44:43 +11:00
Paul Belanger c721ca047d
Fix puppet error on centos
Seems puppet under centos doesn't like missing quotes:

  Jan 31 16:43:12 git puppet-user[6206]: Parameter mode failed on File[/etc/yum/yum-cron.conf]: The file mode specification must be a string, not 'Fixnum' at /opt/system-config/production/modules/openstack_project/manifests/server.pp:149

Change-Id: I765b408ba79edfa406c69d20407788c26d437052
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-01-31 11:59:12 -05:00
Zuul da27b9152c Merge "Fix typo with yum-cron package / service" 2018-01-11 18:51:21 +00:00
Zuul 6b16800095 Merge "Remove kdc02.o.o (replaced by kdc04.o.o)" 2018-01-10 18:34:42 +00:00
Paul Belanger 2d316859b5
Fix typo with yum-cron package / service
The correct package is yum-cron not yum-crontab.

Change-Id: Iba6f636f83f37f79a9c97f729e4cd2e4634d9e6d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-01-09 16:32:21 -05:00
Paul Belanger e77702e241
Install yum-crontab on CentOS servers
yum-crontab is used to manage automatic updates on CentOS, enable
this to ensure our servers are keep up to date like Ubuntu.

Change-Id: If1b8a68de2e16e8d538df71e45ba5865d1278e0e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2018-01-05 10:55:05 -05:00
David Moreau Simard 1afbd20db2
Setup bash history to contain standard timestamps (RFC3339)
The bash history is an unintended form of documentation and also a way
to see what happened but by default it doesn't tell you when.

Before this change:
  $ history
      1  uname -a
      2  sudo reboot

After this change:
  $ history
      1  2017-12-20T23:50:28+0000 uname -a
      2  2017-12-20T23:50:35+0000 sudo reboot

Note that any entries in the bash history before this change will be
defaulted to when the change takes place.

Change-Id: I4443f00ab050891a16e545315ee88ae24893ac5d
2018-01-02 11:19:31 -05:00
Jeremy Stanley c757a7f1c5 Set gerrit2 as an alias to root on Gerrit servers
Now that the exim module supports custom arrays of aliases (but has
ceased explicitly providing one for gerrit2), set the gerrit2 alias
for root E-mail delivery on review.o.o and review-dev.o.o. Also
plumb this through openstack_project::server so it can be used for
similar purposes on other servers.

Change-Id: I05df49af6abdf1494bdf0fee1be4cc79ec5b06d9
Depends-On: I2911f157812c127a514196ae58b7609378d7d4e4
2017-12-22 18:24:29 +00:00
Paul Belanger 3ee34cf491
Remove kdc02.o.o (replaced by kdc04.o.o)
We no longer need kdc02.o.o (ubuntu trusty), now that kdc04.o.o
(ubuntu xenial) is online.

Change-Id: I92b879f7a233dc81c0d64153b293ac12f7e72a40
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-12-18 15:30:30 -05:00
Paul Belanger 08ce7827b3
Add kdc04.o.o to server.pp
Now that kdc04.o.o is online, update our base server.pp to use it.

Change-Id: If6341ea41e2121ea367e55bec15813b4538dcbeb
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-12-18 15:26:00 -05:00
Paul Belanger e711642984
Clean up cacti.o.o node settings
Now that we have migrated to ubuntu-xenial, we can stop testing on
trusty. We can also clean out old cacti.o.o and cacti01.o.o firewall
rules from our base server.pp.

Change-Id: I84b96de40a79d8103cfce5ec121e13a7d01f729d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-12-14 19:08:14 -05:00
Zuul aeb6dec058 Merge "Add cacti02.o.o to all snmp iptables rules" 2017-12-14 23:51:17 +00:00
Paul Belanger 3bdbe3b7f3
Add cacti02.o.o to all snmp iptables rules
As we upgrade cacti02.o.o to xenial, we need to allow it access to all
servers to collect stats.  We can delete old firewall rules in a
follow patch.

Change-Id: I0bbd3e82fdf8644159dfe82b1dfc5478ef5095bb
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-12-14 18:09:34 -05:00
James E. Blair 994365d1bf Use iptables allowed_hosts
This allows us to more safely specify hosts by name in iptable
rules, as they will be resolved by puppet before being written
to disk.

Change-Id: Ie133ad8246d5907723a6d7cbf14644e0a10cc4e7
Depends-On: I7a0dfbab67bdba72c0a56acc611503795d2bc350
2017-12-14 11:16:42 -08:00
Paul Belanger 92d89a3d8a
Disable cloud-init, if installed
Cloud-init is changing our hostname on servers when we reboot. Stop
this from happening by disabling it.

Change-Id: Ia825a7823d7099870885636e0adb4134c5568715
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-21 11:03:55 -04:00
Paul Belanger b3424363cd
Bump virtualenv to 15.1.0
Due to a bad puppet-pip patch that I have merged, it was possible for
our virtualenv python installs to be switch to python3.  As a result,
now we have a mix of virtualenv versions under python2 and python3 for
our control plane.

As a result, bump virtualenv to the latest version so we can reset the
base versions across all our servers.

Change-Id: I9f2819b697dcffddc9ca7c06bfcf72766ec86d40
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-06-01 11:36:10 -04:00
Colleen Murphy 53b0e624e0 Clean up puppetmaster cruft
Now that we are running puppet in masterless mode, we don't need to tell
nodes where the puppetmaster is, or what their certname is, nor do we
need to keep running the puppetmaster in Apache. This patch cleans those
things up.

Change-Id: I663af0d9948f2ce3a47cc22ada47c3bbbbf316fa
2017-05-02 16:50:09 +02:00
Colleen Murphy 0fe57bd954 Remove empty template class
Change-Id: I7d9e68e3a879e52b10fa6a70cb5fb38d41db427f
2017-05-01 22:06:17 +02:00
Colleen Murphy e4c872e5bf Move puppet repos to openstack_project::server
The zuul workers already have these repos installed by
install_puppet.sh (not for much longer but still).

Change-Id: I52bd7d48586492e8843b47bfb91043f28ea06b78
2017-05-01 22:06:17 +02:00
Colleen Murphy 0be72dc1d0 Move iptables management to o_p::server
iptables rules are statically installed on zuul workers by DIB, so we
can move this class from openstack_project::template to
openstack_project::server and remove some related parameters from
openstack_project::template and openstack_project::single_use_slave.

Change-Id: I03db58441674a3f3eea86165c949a7d14425a0b7
Depends-On: I3ee306e46747b77499ff8975cd3d842b09ec2937
2017-04-24 22:11:19 +02:00
Colleen Murphy 0c43225fac Move afs client to openstack_project::server
single_use_slave does not enable afs so we can move the client class
over to openstack_project::server. We don't remove the afs parameter
from the template class yet because it is needed for the iptables class.

Change-Id: Ibb099d5ffbf40501c27ba5caedd1e94e5ead6827
2017-04-24 22:11:14 +02:00
Paul Belanger e172150bdb
Remove users.pp and users_install.pp from single_use_slave.pp
Now that glean manages our ssh keys for nodepool diskimages, we can
remove this puppet code.

Change-Id: I443258acd37a7df17ab30af48b181570489b9b16
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-20 14:49:28 -04:00
Paul Belanger bcd3fb298b
Remove security limits and apt.conf.d setting from diskimages
Limits was recently added for NPM jobs and should be moved into JJB.
Our apt.conf.d changes can be removed, we now have locally APT mirrors
in each region, this should remove the need for these 2 files.

As for the reason for the removal of our 2 apt.conf.d files, I believe
we no longer need to skip translations or apt retry values as each
cloud region has local AFS repos for APT.

However, I plan to keep an eye on this and we can always add these
files back into DIB elements if it becomes an issue.

Change-Id: Iafec2c547f65386805822ff2b0ba9a418c962a8e
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-20 14:03:48 -04:00
Paul Belanger 3677bafdab
Remove puppet-sudoers from nodepool diskimages
We no longer need to manage sudoers, as we do this with DIB elements
now.

Change-Id: Ic558953ae2ba04c78408f43138495200fc9395dc
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-20 13:50:30 -04:00
Paul Belanger 474e8d914c
Move rsyslog into server.pp
Remove rsyslog from diskimages, as we want to manage it outside of
puppet.

Change-Id: I55b608edb826e9614682bb372898414c543a4865
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-20 13:50:24 -04:00
Paul Belanger e707431b69
Move puppet-timezone to server.pp
This drops the puppet dependency from our diskimages.

Change-Id: I653b5f31ce7075e455de8617c8604e78fc7eb449
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-20 13:46:38 -04:00
Jenkins 5f76abb55f Merge "Move puppet service disablement to o_p::server" 2017-04-20 17:37:44 +00:00
Colleen Murphy 0929840479 Move puppet service disablement to o_p::server
We don't need to stop the puppet service in single_use_slave, so as part
of emptying out openstack_project::template, move that resource
to openstack_project::server.

We still need to disable the service during the image build so add that
to the install_puppet.sh script.

Change-Id: I11db1b49f083c7a30e7908ba5a4a7df9d4033c9f
2017-04-18 14:53:40 +02:00
Paul Belanger d5b91b3423 Remove puppet-ssh from zuul workers
This is part of the effort to remove puppet from our diskimage builds.

Change-Id: Ia2926621211e647504b2636606cba4119c17e0cc
Depends-On: I4335eaa7948428a04cd2b4e73bb7dcc024dd7c97
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-17 18:43:19 +00:00
Colleen Murphy 5f538cf596 Move pip management to openstack_project::server
First we remove the `include ::pip` from single_use_slave, since it was
already being declared in openstack_project::template and it is a fluke
of puppet that it wasn't causing a duplicate resource error.

Then we move the pip puppet class and the virtualenv package resource
out of openstack_project::template to openstack_project::server. The
virtualenv package should already installed on nodepool workers by DIB.
The pip puppet class does three things:

  1. Installs the python devel package, which we are already getting
     from DIB
  2. Installs pip, which we are already getting from DIB
  3. Manages pip.conf. Here in the puppet manifests we're setting the
     index URL to the upstream pypi repository, not our mirrors. When
     the node is launched in nodepool the configure_mirror.sh ready
     script will undo this and configure pip to use our mirrors.

So there should be no need to use the pip class on the nodepool workers.

Change-Id: Icc720e61cd12f31113a6e12482d4903a6772ae69
2017-04-12 21:12:19 +02:00
Colleen Murphy b76a1c138d Move package and file purging to o_p::server
*-minimal images don't have byobu, whoopsie, or popularity-contest
installed on them, so there is no need to purge them from
single_use_slave. We can move these over to openstack_project::server to
help empty out openstack_project::template.

Change-Id: I3b39a89269e424f3d1c5806f35c743937c92f3f8
2017-04-10 20:13:44 +02:00
Colleen Murphy 3f28416af6 Move automatic_upgrades management to o_p::server
single_use_slave turns this off so there is no reason to keep it in the
openstack_project::template class.

This patch also removes the automatic_upgrades parameter from the
single_use_slave class, which is safe because project-config does not
use it.

Change-Id: If4d425cb581f4c5f57fbcdd7eee0622e829cb7ec
2017-04-10 20:13:19 +02:00
Colleen Murphy db6c0b902b Move exim management to openstack_project::server
single_use_slave does not set the manage_exim parameter in
openstack_project::template to true so there is no reason to manage it
there. We can move the exim class into openstack_project::server to help
empty out openstack_project::template.

Change-Id: I3e933e55af147b9c50a6c2f861919449b8114e0a
2017-04-10 20:12:42 +02:00
Paul Belanger e70d41fb1d Remove snmpd from zuul workers
We use snmpd for cacti.o.o today, which our workers do no use. As
such, remove so we can reduce our puppet footprint.

Change-Id: Ic26a8e6f2b2fe3d76c36c4ed7bccd8efb7839858
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-07 18:55:57 -04:00