Pass Jenkins' SSH pub key to special slaves.

The openstack_project::slave refactor defaulted the Jenkins' SSH pub key
to an empty string. This erased the authorized keys file for the Jenkins
user on our specialized slaves. Restore that file's contents.

Change-Id: I28067017ec2dc36feef9df076099813abf820ee9
Reviewed-on: https://review.openstack.org/31419
Reviewed-by: Jeremy Stanley <fungi@yuggoth.org>
Reviewed-by: James E. Blair <corvus@inaugust.com>
Approved: Clark Boylan <clark.boylan@gmail.com>
Tested-by: Jenkins
This commit is contained in:
Clark Boylan 2013-06-01 19:40:07 -07:00 committed by Jenkins
parent 6881008de0
commit b51d23a3cd
7 changed files with 31 additions and 9 deletions

View File

@ -304,12 +304,14 @@ node /^ci-backup-.*\.openstack\.org$/ {
node 'mirror26.slave.openstack.org' {
class { 'openstack_project::mirror26_slave':
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents')
}
}
node 'mirror27.slave.openstack.org' {
class { 'openstack_project::mirror27_slave':
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents')
}
}
@ -318,21 +320,24 @@ node 'devstack-launch.slave.openstack.org' {
class { 'openstack_project::devstack_launch_slave':
jenkins_api_user => hiera('jenkins_api_user'),
jenkins_api_key => hiera('jenkins_api_key'),
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents')
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents'),
}
}
node 'tx.slave.openstack.org' {
class { 'openstack_project::translation_slave':
transifex_username => 'openstackjenkins',
transifex_password => hiera('transifex_password')
transifex_username => 'openstackjenkins',
transifex_password => hiera('transifex_password'),
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
}
}
node 'pypi.slave.openstack.org' {
class { 'openstack_project::pypi_slave':
pypi_username => 'openstackci',
pypi_password => hiera('pypi_password')
pypi_username => 'openstackci',
pypi_password => hiera('pypi_password'),
jenkins_ssh_public_key => $openstack_project::jenkins_ssh_key,
}
}

View File

@ -17,11 +17,13 @@
class openstack_project::devstack_launch_slave (
$jenkins_api_user,
$jenkins_api_key,
$jenkins_ssh_public_key,
$jenkins_ssh_private_key,
) {
class { 'openstack_project::slave':
bare => true,
bare => true,
ssh_key => $jenkins_ssh_public_key,
}
package { [ 'python-novaclient',

View File

@ -15,10 +15,12 @@
# Install a python26 mirror building slave.
class openstack_project::mirror26_slave (
$jenkins_ssh_public_key,
$jenkins_ssh_private_key,
) {
class { 'openstack_project::mirror_slave':
jenkins_ssh_public_key => $jenkins_ssh_public_key,
jenkins_ssh_private_key => $jenkins_ssh_private_key,
}
}

View File

@ -15,10 +15,12 @@
# Install a python27 mirror building slave.
class openstack_project::mirror27_slave (
$jenkins_ssh_public_key,
$jenkins_ssh_private_key,
) {
class { 'openstack_project::mirror_slave':
jenkins_ssh_public_key => $jenkins_ssh_public_key,
jenkins_ssh_private_key => $jenkins_ssh_private_key,
}
}

View File

@ -15,10 +15,14 @@
# Install a python mirror building slave.
class openstack_project::mirror_slave (
$jenkins_ssh_public_key,
$jenkins_ssh_private_key,
) {
include openstack_project::slave
class { 'openstack_project::slave':
ssh_key => $jenkins_ssh_public_key,
}
include jeepyb
file { '/home/jenkins/.ssh/id_rsa':

View File

@ -16,9 +16,13 @@
#
class openstack_project::pypi_slave (
$pypi_password,
$jenkins_ssh_public_key,
$pypi_username = 'openstackci'
) {
include openstack_project::slave
class { 'openstack_project::slave':
ssh_key => $jenkins_ssh_public_key,
}
include pip
package { 'pkginfo':

View File

@ -1,11 +1,14 @@
# == Class: openstack_project::translation_slave
#
class openstack_project::translation_slave (
$jenkins_ssh_public_key,
$transifex_password = '',
$transifex_username = 'openstackci',
) {
include openstack_project::slave
class { 'openstack_project::slave':
ssh_key => $jenkins_ssh_public_key,
}
package { ['transifex-client', 'Babel']:
ensure => latest,