From c7ec9dcc5249b8ad4691326d8f8a5f95e3e55d16 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Thu, 14 Mar 2013 17:51:57 -0700 Subject: [PATCH] Add jenkins ssh private key to devstack-launch. It's needed to perform the test-logins to the new servers. Change-Id: I8fd5cea8dd1b807b42acf508fcd4853bb735150e Reviewed-on: https://review.openstack.org/24497 Reviewed-by: Jeremy Stanley Reviewed-by: Elizabeth Krumbach Approved: James E. Blair Tested-by: Jenkins --- manifests/site.pp | 5 +++-- .../manifests/devstack_launch_slave.pp | 11 ++++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/manifests/site.pp b/manifests/site.pp index 9b8b5c1012..926fac8cca 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -234,8 +234,9 @@ node /^ci-backup-.*\.openstack\.org$/ { 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_api_user => hiera('jenkins_api_user'), + jenkins_api_key => hiera('jenkins_api_key'), + jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents') } } diff --git a/modules/openstack_project/manifests/devstack_launch_slave.pp b/modules/openstack_project/manifests/devstack_launch_slave.pp index 2b1e8b55fa..d082096b2a 100644 --- a/modules/openstack_project/manifests/devstack_launch_slave.pp +++ b/modules/openstack_project/manifests/devstack_launch_slave.pp @@ -16,7 +16,8 @@ class openstack_project::devstack_launch_slave ( $jenkins_api_user, - $jenkins_api_key + $jenkins_api_key, + $jenkins_ssh_private_key, ) { class { 'openstack_project::slave': @@ -46,4 +47,12 @@ class openstack_project::devstack_launch_slave ( content => template('openstack_project/devstack-gate-secure.conf.erb'), require => File['/home/jenkins'], } + + file { '/home/jenkins/.ssh/id_rsa': + owner => 'jenkins', + group => 'jenkins', + mode => '0400', + require => File['/home/jenkins/.ssh'], + content => $jenkins_ssh_private_key, + } }