Commit Graph

535 Commits

Author SHA1 Message Date
Clark Boylan fbdd3aa557 Retire this repo
The opendev project has been moving away from puppet and this is one of
the puppet modules that is no longer used. To simplify things for us we
are taking the extra step of retiring this repo.

Change-Id: Ibd49cc2311b2b3ee10b5d0ec235f9d247dafdc94
2022-02-17 11:47:50 -08:00
Paul Belanger 7a9eafd698
Revert "Pin tox to 2.7.0"
Tox 2.8.1 was released fixing out unpack errors.

This reverts commit 5fc0bbbdb3.

Change-Id: I3dc95064b442c26bf7803b46e92ecd5171937a6d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-04 17:44:09 -04:00
Paul Belanger 5fc0bbbdb3
Pin tox to 2.7.0
Tox 2.8.0 has broke us, clarkb has a patch upstream to fix. In the
mean time, we can pin to 2.7.0.

https://github.com/tox-dev/tox/issues/595

Change-Id: I1079fb1bc6606a33b5b2517cca0c8eba2c12ce13
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-02 15:30:33 -04:00
Colleen Murphy 275e22f63f Make ssh_key parameter optional
The main reason to do this is for CI. We don't want to overwrite the
real jenkins user's SSH authorized keys, but we still want to test
everything else about the jenkinsuser class, so allow the ssh_key
parameter to be empty and don't overwrite authorized_keys if it is.

Change-Id: Ic2c12940767d53928fa07170c32f34619019287c
2017-06-10 20:26:05 +02:00
dongwenjuan 3f2c0a65aa use 'openjdk-8-jre-headless' for ubuntu-16.04
Use 'puppet apply' to install jenkins in ubuntu-16.04 failed.
Need to upgrade the 'openjdk-8-jre-headless' package.
See https://github.com/rvm/rvm/issues/3719

Change-Id: If31abd1d29416dbb567c0f76529913b8327d40c1
Signed-off-by: dongwenjuan <dong.wenjuan@zte.com.cn>
2017-05-03 17:02:18 +08:00
Dirk Mueller b507108750 Add Suse family support to jenkins puppet module
Change-Id: I5cf6481aed0bc6e371fe84e0b9f2d632785304eb
2017-04-06 14:43:48 +02:00
Isaac Beckman 89d89683e3 Customize jenkins.default by template
Turn jenkins.default to a template. This enables to customize it
easily. This is useful for downstream projects where it is needed
to tune jenkins.default parameters. Either Pass the required
parameter to jenkins class or pass a customized jenkins.default
file location in jenkins_default.
For backward compatibility, default values are set in the class
parameters list.

Change-Id: Ice0e4ffa2fffd041d8bcc4a0b323ffae7ba2b0c8
2016-12-05 08:19:54 -06:00
Simon McCartney 5991ee6a62 Enable a specific version of jenkins to be installed
This is an update to https://review.openstack.org/#/c/354086/ so
that puppet uses the dpkg provider with puppet archive to download & install a
specific version of jenkins if jenkins_version isn't set to latest or
present.

Change-Id: I054b27b045e97c39f0706d110c05459e6b9d74a1
2016-11-11 15:11:55 -08:00
Jenkins 6116e612d5 Merge "Update jenkins repo URL + option to select version" 2016-08-12 08:15:36 +00:00
Thiago Paiva d72bb2caeb Update jenkins repo URL + option to select version
Jenkins repo moved to 'pkg.jenkins.io'. Since that, Jenkins packages were being
get from the default mirror on Ubuntu distros. This patch fixes that and also
adds a parameter to request an specific Jenkins version to be installed.

Change-Id: I43ea562028da8385c9d3bc74794f62d1aa1b9bf8
2016-08-11 10:52:47 -03:00
Jeremy Stanley a2a3faf8a7 Add user.signingkey to .gitconfig
In an effort to support having an OpenPGP signing key that doesn't
exactly match the name+email in .gitconfig, separately parameterize
the signingkey option allowing it to be explicitly overridden with a
key ID or other similar identifier (such as a matching E-mail
address).

Change-Id: Id577c4479abd2f443f73c630a12e94d3ebe63660
2016-07-29 18:39:33 +00:00
Jeremy Stanley b489487781 Make the Gerrit SSH key configurable
Make it possible to provide an SSH key for the jenkins user on slave
hosts, rather than expecting it to be manually provided. This is
useful for long-lived slaves which need to SSH into Gerrit for
proposing new changes or pushing tags.

Change-Id: Id07bd1e9f08f2d7c7ea6653867d7440a8ade6ee6
2016-07-20 20:30:04 +00:00
Jenkins 06471dfde0 Merge "Remove unused GnuPG keyring" 2016-07-01 13:42:18 +00:00
Paul Belanger 868a8ec5c5
Add systemd scripts for cgroups
This is needed for Ubuntu Xenial.

Change-Id: Ibe7d18f10aa48222b8bc08fd6f56cc9cd2790232
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-06-29 10:14:29 -04:00
Jeremy Stanley fbed50c66f Remove unused GnuPG keyring
This was added by commit de7975c--Gerrit change 7--so old it
predates Change-Id headers in the repo (and, apparently, commit
messages). Today it seems to be completely unused. The pubring.gpg
contained just this one key:

    pub   2048R/32EE128C 2010-08-15
    uid                  OpenStack Hudson <hudson@openstack.org>
    sub   2048R/92E212FC 2010-08-15

Based on discussion in IRC, Monty vaguely recalls this might have
been related to DEB package building once upon a time (something we
no longer do and wouldn't configure from this module anyway when
eventually want to start doing again).

Change-Id: I70c3b82185681ee64791cda653360c26a93bd466
2016-06-23 18:11:51 +00:00
Philip Marc Schwartz 6a399aa1ce Upodate pip provider to use openstack_pip provider
Change-Id: I7f70d22cda3d0e174217ce0205b702bf07fb602b
Signed-off-by: Philip Marc Schwartz <philip@progmad.com>
2016-06-16 08:59:43 -04:00
ZhongShengping 8515b90dc0 Fix syntax error
'True' becomes a string in puppet3 and is a syntax error
in puppet4

Change-Id: Ic692bae15e847a2375ba8229f732feb36baa76f9
2016-05-24 11:16:26 +08:00
Artem Silenkov 16ef3f015e Fix incorrect directory permissions in jenkinsuser.pp
Directory .ssh lacks execute permission

Change-Id: I42a6f461c44c031a7f5109579c54faea543fde51
2016-05-12 13:54:12 +03:00
Paul Belanger ea7e530fe0 Don't update-java-alternatives on ubuntu-xenial
As we are using openjdk-8-jre by default.

Change-Id: I57e27498fea13276086b1145603220e9244b9bc6
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-31 18:43:45 -04:00
Paul Belanger e821923057 Ubuntu xenial supports openjdk-8-jdk
For more information:
https://bugs.launchpad.net/ubuntu/+source/openjdk-7/+bug/1563986

Change-Id: I6cba549fc51a704a57798db15d3ad88dcdc0a4d9
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-31 09:53:29 -04:00
Paul Belanger 44b28463f4 Add support for ubuntu xenial
Change-Id: If3693594c2b02c28e47302158e1303176d282a5d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2016-03-26 13:48:21 -04:00
Jenkins 52717b6b26 Merge "Use default ruby packages for Xenial" 2016-03-11 11:06:29 +00:00
Jenkins 574e673064 Merge "Increase timeout for yum install of development tools" 2016-03-02 21:13:08 +00:00
Mikhail S Medvedev 20d3c7b309 Use default ruby packages for Xenial
In I4a5a8352388de46e9e7713fa11951fcde27eaad9 Debian was added as
exception to use default ruby for jenkins::slave. The non-default
ruby1.9.1 also does not exist on Xenial. So add Xenial to the exception
list.

Some alternatives that should be considered:

* Use default ruby packages by default, and add exceptions for distros
where default ruby breaks things. But that can lead to regressions.

* Allow overriding all the default parameters by inheriting from
params.pp, e.g. I8accb1442c6e8a9f1cec5b195d08e96a9b47a9bd.  Which would
make it easier to reuse puppet-jenkins outside of OpenStack infra.

Change-Id: Icac1dafc31b6b2c30860bafe09ca631ff00dd0b1
2016-02-05 10:07:36 -06:00
Igor Belikov 82b6cefbab Use 'ruby' instead of 'ruby1.9.1' for Debian
Use 'ruby' instead of 'ruby1.9.1' for Debian, since 'ruby1.9.1' is not
present in Debian starting from Jessie.
This fixes jenkins::slave on Debian hosts.

Change-Id: I4a5a8352388de46e9e7713fa11951fcde27eaad9
2016-02-03 16:09:28 +03:00
Yolanda Robla 32d1466741 Increase timeout for yum install of development tools
This command has proved to take more than puppet default
timeout to install, causing to be aborted and following errors
on puppet installing packages.
Increase to 1800 to give more room for command to be
completed.

Change-Id: I774ec74541797b279b380e0337a6114c80912447
2016-01-29 15:40:34 +01:00
Jenkins 948560241a Merge "Add cli manifest to Jenkins" 2016-01-04 23:55:47 +00:00
Ricardo Carrillo Cruz 121b7b4982 Add cli manifest to Jenkins
This allows to download the Jenkins CLI, it can be handy for scripts
leveraging it instead of python-jenkins

Change-Id: I5e29c46173bce004f649ed58f545fe511262a81a
2015-12-05 08:48:05 +01:00
Jenkins ee6b1a46b5 Merge "Properly setup of jenkins keys" 2015-12-04 19:38:17 +00:00
Jenkins 7b229ad86e Merge "Add the ability to set your own plugin url" 2015-11-25 14:49:51 +00:00
Jenkins bc61fdc06d Merge "Fix race condition in httpd install and config" 2015-11-23 12:28:35 +00:00
Ramy Asselin 62c2056266 Add the ability to set your own plugin url
Using your own url is an equivalent to
Manage Jenkins -> Manage Plugins -> Advanced -> Upload Plugin option.

Change-Id: Iac6d2cd1b679443f631bf174e5d3322d7574687a
2015-11-20 11:29:42 -08:00
Jenkins 3501262d49 Merge "Populate query_plugins_info setting" 2015-11-15 14:42:14 +00:00
Glauco Oliveira 9c6b9c0e1d Fix race condition in httpd install and config
Replaces httpd_mod with httpd::mod to create a relationship with the
httpd service, and only apply the configurations after the modules have
been installed.

This prevents the server to start with an improper configuration and
break the apply.

Change-Id: I0b72a962adfb125caaad5905774114a971c2e4b9
Co-Authored-By: Bruno Tavares <btavare@thoughtworks.com>
Co-Authored-By: Danilo Ramalho <dramalho@thoughtworks.com>
2015-11-11 11:37:34 -02:00
Yolanda Robla a22f8d8500 Properly setup of jenkins keys
Stop using ssh_authorized_key with a fixed name,
and move key generation to a template. It will accept
an ssh_key parameter, that can accept either an array
or a single string. And it will populate these keys on the
.ssh/authorized_keys properly.
Doing that we allow to rotate keys properly, and avoid
some of the races that could be originated using a
single key using the ssh_authorized_key way.

Change-Id: I572b7a18186329c4277a3f460fc05e6eb30c63b7
2015-11-10 09:03:37 +01:00
Jeremy Stanley 760ea2c501 Mitigate SECURITY-218 by disabling the CLI
Jenkins masters will need a restart after applying this change, or
it will have to be separately pasted into the Script Console.

Change-Id: I427d6e1a72fbe2144f3d9d9306c1cc918730e0cd
2015-11-07 02:25:36 +00:00
Jenkins 74bf1d94fa Merge "Add creation of user in jjb" 2015-10-09 13:42:42 +00:00
Jenkins a1affc5118 Merge "Allow to specify a different jenkins default" 2015-10-09 13:39:57 +00:00
Clark Boylan 2df3683358 Ensure latest version of python-jenkins
For JJB and the safe shutdown script we want to ensure the latest
version of python jenkins. This is necessary to pull in new features and
it is what we test against so makes sense to have installed.

Change-Id: I135faa6eef4b2de6303b49f598d6fc9d44031642
2015-10-05 14:11:51 -07:00
Jenkins 830cdd23d9 Merge "Add utility script for safe master shutdown" 2015-10-05 20:09:15 +00:00
Clark Boylan c61d0588f1 Add utility script for safe master shutdown
This adds a script that will put the jenkins master in shutdown mode,
wait for all jobs to finish running, then optionally delete any offline
slaves. Once this is complete you can restart the jenkins master in
whatever fashion you choose safely.

Change-Id: I0cb858665de0e733267b5f45b071b076167ee63a
2015-09-25 13:35:19 -07:00
Yolanda Robla 9c72ef9cbf Allow to specify a different jenkins default
This is specially useful for downstream consumption,
to be able to tune the java settings. It will be very
difficult to move it into a template, so adding the
ability to configure the file source is a good
possibility.

Change-Id: I2cb33fd71f6a1894e6f171dce62e62d504a1693a
2015-09-17 09:39:08 +02:00
Jenkins accc28cfac Merge "Fix puppet-lint errors" 2015-09-15 12:36:51 +00:00
Yolanda Robla fb65f118d6 Populate query_plugins_info setting
There is a setting in jjb to enable/disable jenkins
querying plugins. Set this var on the template, defaulting
to True, that means Jenkins will always query plugins
by default.

Change-Id: Ie39090fce4ec01edde0cc99a35e1e9e1991cac98
2015-09-14 12:37:45 +02:00
Glauco Oliveira 7958315674 Fix puppet-lint errors
Make necessary changes to not get any error from puppet-lint.

Change-Id: I064d03bbc9a8f5023eb6856d8f66c4471669b914
Co-Authored-By: Bruno Tavares <btavare@thoughtworks.com>
2015-09-01 18:15:50 -03:00
Paul Belanger 0a56cb3638 Bump puppetlabs-apt to 2.1.0
This is needed for the puppet-grafana module, so we need to do it here
since all dependencies come from system-config.

Change-Id: I431a41ff40678cf5b86815fcbadf5e3f43e2dbb6
Depends-On: Iaee167602523bc497515a31fdbea74728e94c55d
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-21 16:54:35 -04:00
Yolanda Robla 93d7476af6 Add creation of user in jjb
This feature is useful when using unix authentication system on
jenkins. We rely on this user on the ini template, but manifest
is not creating it. So ensure that this user exists or create if
not.

As jenkins may use another types of authentication, this is
not useful in all cases. So adding a flag to allow to parameterize
it , and not creating the user by default.

Change-Id: I2a007307218a838f90c4df59ea85ad2f23c47175
2015-08-20 09:18:38 +02:00
Ricardo Carrillo Cruz 137c06acbc Add sane defaults for SSL certificates
Other modules like puppet-gerrit default to snakeoil, that's useful
for non-production or testing.

Change-Id: I56b4eab83effb1ff941f5c5c509152ec8bc29234
2015-08-12 11:56:38 +02:00
Ian Wienand 0798386517 User versioncmp to compare strings
Use versioncmp, otherwise with puppet 4 (as on Fedora 22) you get "A
String is not comparable to a non String".

We also inverted the versioncmp check for the version variable, the
main reason for this was to reduce complexity of the versioncmp code.

Additionally, defining 0 to be the latest version didn't really make
sense.  So, changing it to use 'latest' means better code readability.

Change-Id: Ic8b0fd2a19cbb90e1d57e3025a3d2513ebada2e2
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-10 10:06:20 -04:00
Paul Belanger 3651901d10 Require ssh_key, username, password and url
Default these values to '' does provide any real value. We should
force the user to setup something other then an empty string.

Change-Id: I04da6afae5d39a20f9601b0dbd834e97d280d028
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2015-08-07 16:30:57 -04:00