Commit Graph

134 Commits

Author SHA1 Message Date
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
Jenkins b3f8b4106c Merge "Remove old ssh_authorized_key resources" 2017-04-12 18:36:38 +00:00
Colleen Murphy ee11e477a3 Remove ssh_config NoRoaming setting
The security vulnerability that required this mitigation has been
patched[1][2] so we can clean up this code.

[1] https://www.ubuntu.com/usn/usn-2869-1/
[2] https://access.redhat.com/security/cve/cve-2016-0777

Change-Id: I6c9f5a533ee9c49cd563eb31bd2a3c6f2d056ec3
2017-04-12 20:22:17 +02:00
Jenkins 536636402e Merge "Remove puppet pinning logic" 2017-04-12 18:18:38 +00:00
Jenkins da3d9f9210 Merge "Move package and file purging to o_p::server" 2017-04-12 05:08:06 +00:00
Jenkins 3ff96003a8 Merge "Move automatic_upgrades management to o_p::server" 2017-04-12 05:07:34 +00:00
Jenkins 8688d3bafc Merge "Stop including params class where it is not needed" 2017-04-12 05:06:29 +00:00
Jenkins cd2f6843d5 Merge "Move exim management to openstack_project::server" 2017-04-12 05:04:11 +00:00
Colleen Murphy f924a8bb5b Remove puppet pinning logic
During the transition from puppet 2.7 to puppet 3.x we needed to
add logic to carefully select what versions of puppet and related
packages would be installed from the puppetlabs apt and yum
repositories. Before puppet 4 was announced, we rightfully feared
accidentally upgrading to backwards-incompatible versions of these
packages and breaking the world.

Now we are completely off of puppet 2.7, so we don't need to keep any
remnants of that around. Moreover, the new packaging system for puppet 4
will make it impossible to accidentally upgrade[1]. The package name has
changed from "puppet" to "puppet-agent", which has facter and hiera etc.
bundled into the same package, and in order to get the new package we
must add a new "puppet collections" repository. So, not only is this
pinning logic not needed to keep us safe, it is also not going to be
useful when we upgrade to puppet 4.

Looking at the puppetlabs repositories[2][3] we are already using the
latest version of the packages we are pinning and Puppet is definitely
not going to add new versions to these repositories.

The $puppet_version variable was leftover from when puppet.conf was
managed by puppet and not ansible so this patch cleans that up as well.

[1] https://docs.puppet.com/puppet/4.9/about_agent.html
[2] http://apt.puppetlabs.com/dists/trusty/main
[3] http://yum.puppetlabs.com/el/7/products/x86_64/

Change-Id: I06b5cd87ee7816b0f929d5e64dc66a5cceca222a
2017-04-10 23:10:16 +02:00
Colleen Murphy fb4a94317d Clean up hiera hacks for fedora
The fedora gem and symlink were added for fedora 18[1]. We no longer
install hiera-puppet (in fact it's been decommissioned[2]) and we don't
need to install the hiera gem, the distro-provided hiera version is
3.0.1 which should be good enough.

[1] https://review.openstack.org/#/c/32449/
[2] https://github.com/puppetlabs/hiera-puppet

Change-Id: Ic70ea22ce4274e7f61816bf36052c3ac7939091d
2017-04-10 22:49:09 +02:00
Jenkins a52407114d Merge "Remove CentOS 6 specific configs" 2017-04-10 19:01:32 +00: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
Colleen Murphy 8d31b5996e Stop including params class where it is not needed
Nothing in the template or puppetmaster classes uses any of the params
values. Classes that do use values in the params class, which are
o_p::server, o_p::users and o_p::users_install, include the params class
already either explicitly or by including other classes.

Change-Id: If91ff59e26bdb345f96224603becfb3f937ea90f
2017-04-08 22:33:58 +02:00
Colleen Murphy 7b316c19fb Remove CentOS 6 specific configs
We don't have any CentOS 6 machines left.

Change-Id: I482076348335db9bcda8b7e637db86b3afe29dba
2017-04-08 22:11:44 +02:00
Colleen Murphy 16393d6ea7 Remove old ssh_authorized_key resources
These were ensure=>absented years ago, it's probably a safe bet that
they're not there anymore.

Change-Id: I2fd218bed0fe57c9de325c0ced88f88821ffed96
2017-04-08 21:07:54 +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
Colleen Murphy 4f734e0738 Move unbound to openstack_project::server
Once nodepool is installing and fully configuring unbound, we don't need
to manage it in the common openstack_project::template class. This patch
moves them over to openstack_project::server so that it is obvious that
puppet doesn't need to manage them for both single-use workers and
long-lived servers. Eventually the openstack_project::template class
should be empty and we can remove it.

Depends-On: I3905be12acd85581a608d87ba5159cc883343a37
Change-Id: Ie1daae8471d424f373b47262e9d0b21c15affce9
2017-04-07 21:57:13 +02:00
Colleen Murphy dccba790ae Move NTP management into openstack_project::server
Once nodepool is building images with NTP already installed and enabled,
we don't need to manage it in the common openstack_project::template
class. This patch moves them over to openstack_project::server so that
it is obvious that puppet doesn't need to manage them for both
single-use workers and long-lived servers. Eventually the
openstack_project::template class should be empty and we can remove it.

Depends-On: Iee6babc183dd12cc82ce76ddfde04f2d98ddc4d6
Change-Id: Ie808a5b62014716c8506506fd15f39dba06e76b6
2017-04-07 21:57:13 +02:00
Colleen Murphy df050bc7b6 Move package resources to o_p::server
Once nodepool is building worker images with these packages already
installed, we don't need to manage them in the common
openstack_project::template class. This patch moves them over to
openstack_project::server so that it is obvious that puppet doesn't need
to manage them for both single-use workers and long-lived servers.
Eventually the openstack_project::template class should be empty and we
can remove it.

Depends-On: Ie1a0aba57390c9c0b269b4cbb076090ae1de73a9
Change-Id: I31295cdf12941e4adcf87a73418df1d17d9ec3d2
2017-04-07 21:57:13 +02:00
Colleen Murphy a883b74661 Move sources.list purging into o_p::server
The single use nodepool workers don't need this, so let's slim down the
template class by moving this logic into the server class. As we move
away from running puppet to build images we should eventually end up
with an empty template class that we can delete entirely.

Change-Id: Ie65b2572dfdd74ffdefada57faaf03ff30ccd37f
2017-04-07 21:57:13 +02:00
Jenkins ee085879be Merge "Specify cacti ip addresses for snmp access" 2016-10-13 14:54:29 +00:00
Jenkins cb061a4d9e Merge "Fix regex in NoRoaming workaround" 2016-10-12 23:18:28 +00:00
K Jonathan Harker be286edb05 Specify cacti ip addresses for snmp access
Move openstack-specific configuration into the openstack_project module.
This was previously hard-coded in the iptables module, but is now
parameterized. Before the parameter can be given a site-agnostic default
value, pass in the needed value here.

Add both the IPs for both the old and new cacti servers as part of the
service migration.

Change-Id: I173ca1efae4644c89cfab68d6beeba0a1dae9ce2
Depends-On: I9394982811f8dcf0d63eccb782de04bf4a047ec7
Needed-By: Ibae45af594fc2b18024fcc2d6ef040afd4ddd926
2016-10-12 11:17:33 -07:00
James E. Blair d24d96ab4b Stop managing puppet config in puppet
This is completely superceded by ansible at this point.

Change-Id: Ib0e08d9a5104213671af5106d88ffc9b38eb47a9
2016-10-04 15:29:25 -07:00
Paul Belanger ac32f43096
Disable puppet service on boot
Because we nolonger poll a puppetmaster with puppet, we can disable
the puppet service on boot. I noticed on ubuntu-xenial nodes it was
taking 2+ minutes for puppet to be started, which is a waste of
resources.

Change-Id: If03f83c73297c223999951b294b8ce675d7eab25
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-08-16 11:12:09 -04:00
Jenkins 2272d2017b Merge "Enable ntpdate service for centos-7" 2016-08-03 05:58:01 +00:00
Paul Belanger 3f5c72fa92
Enable ntpdate service for centos-7
We need to ensure ntpdate service starts on boot for centos-7.
Currently, ntpd explicitly require ntpdate to be running before
the sync process can happen in ntpd.  As a result, if ntpdate is not
running, ntpd will start but fail to sync because of DNS cannot be
resolved.

If the clock is not already synced when ntpd starts, it will enter a
synchronisation phase for a default of 900s that holds up ntp-wait.

Change-Id: I98029a288c9a57f4b4b278b0dfb185609989662d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-08-02 18:48:05 -04:00
Paul Belanger ec205cfb00
Also use IP address in from fields for authorized_keys
We also need to update our root user ssh authorized_keys file to use
IP address, not hostnames.

Change-Id: I579e29a601c1e57caa35b206efb7f03ee63634cd
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-08-01 19:41:54 -04:00
Paul Belanger f0def4bef0
Use IPv6 address for puppetmaster.o.o
We are switching to the IPv6 address because ubuntu-xenial has
disabled DNS lookup in openssh-server by default.  As a results, root
can no longer SSH into ubuntu-xenail servers.

Change-Id: Ic796bee28bc04d35785647b003749860f6b26730
Depends-On: I28c5d71e62a62bd27f289a8bd70b235eac213e5c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-08-01 12:48:16 -04:00
Ian Wienand 68f7134a6d Add ntp-perl package for RedHat platforms
Since I29a101eb9ea5c2d0da6b7762fe93366f0c0a8999 we use ntp-wait, which
is part of the ntp-perl package on RedHat platforms, but included in
the base ntp package for others.  For consistency, add the ntp-perl
package here so we can assume the utility is everywhere.

I have submitted similar upstream (see Jira issue); we could revert
this if it gets accepted.

Change-Id: If59acfb2a950f74d8246424580be3b2bd1409ad3
2016-07-29 14:04:28 +10:00
Jeremy Stanley 92420c28ae Install at(1) on all our servers
Why is the `at` utility not installed? Correct this obvious lapse in
judgement.

Change-Id: I7853ac989bf73e3c7e990737778b8874787ebdf8
2016-07-22 15:56:20 +00:00
Derek Higgins bc9c1c8cc8 Enable root login on single use slaves
Since glean only configures the ssh key for the root
user on instances, this is needed so that the nodepool
generated images can be used by users who don't have their
ssh keys baked into the image.

Change-Id: Id09c63920b5565e1cc011eb98cfb132a11060bcc
Depends-On: I704453c6d3091a24e68509650c61efb638aea601
2016-07-09 00:10:07 +00:00
Philip Marc Schwartz 83fe8878bf Upodate pip provider to use openstack_pip provider
Change-Id: I727a1233c1a0833e03b4bef1a94f0f470778ee60
Signed-off-by: Philip Marc Schwartz <philip@progmad.com>
2016-06-16 09:25:28 -04:00
Jenkins 350f6d0296 Merge "Increased open file limits on debian systems" 2016-06-06 19:52:48 +00:00
Michael Krotscheck b1451c8321 Increased open file limits on debian systems
This change is prompted by npm-based builds, which tends to open
many files due to the 'microlibrary' approach that many javascript
projects take. In particular, horizon's npm-based builds were
running into this limit- while the tests were executing well, the
file open limit was exceeded during report generation.

This patch ups the soft limit from 1024 to 4096, and the hard limit
from 4096 to 8192 on all debian systems.

Change-Id: I8fc4a23eb34da88f7076a4c1ef2ec4c975dc450e
2016-06-05 05:55:41 -07:00
Jenkins 22d3a38c8d Merge "Always apt-get update after replacing sources" 2016-05-10 16:02:32 +00:00