2013-03-06 13:12:20 -08:00
|
|
|
# Copyright 2013 OpenStack Foundation
|
2013-02-19 15:56:22 -08:00
|
|
|
#
|
2013-03-06 13:12:20 -08:00
|
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
|
|
# not use this file except in compliance with the License. You may obtain
|
|
|
|
# a copy of the License at
|
|
|
|
#
|
|
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
#
|
|
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
|
|
# License for the specific language governing permissions and limitations
|
|
|
|
# under the License.
|
|
|
|
#
|
|
|
|
# Install a host that manages the devstack node pool.
|
|
|
|
|
2013-02-19 15:56:22 -08:00
|
|
|
class openstack_project::devstack_launch_slave (
|
2013-03-06 13:12:20 -08:00
|
|
|
$jenkins_api_user,
|
2013-03-14 17:51:57 -07:00
|
|
|
$jenkins_api_key,
|
2013-06-01 19:40:07 -07:00
|
|
|
$jenkins_ssh_public_key,
|
2013-03-14 17:51:57 -07:00
|
|
|
$jenkins_ssh_private_key,
|
2013-02-19 15:56:22 -08:00
|
|
|
) {
|
|
|
|
|
|
|
|
class { 'openstack_project::slave':
|
2013-06-01 19:40:07 -07:00
|
|
|
bare => true,
|
|
|
|
ssh_key => $jenkins_ssh_public_key,
|
2013-02-19 15:56:22 -08:00
|
|
|
}
|
|
|
|
|
2013-03-14 16:14:12 -07:00
|
|
|
package { [ 'python-novaclient',
|
2013-03-14 17:39:21 -07:00
|
|
|
'python-jenkins',
|
2013-03-14 16:14:12 -07:00
|
|
|
'rackspace-auth-openstack',
|
|
|
|
'statsd',
|
|
|
|
'paramiko']:
|
2013-02-19 15:56:22 -08:00
|
|
|
ensure => latest,
|
|
|
|
provider => pip,
|
|
|
|
require => Class['pip'],
|
|
|
|
}
|
2013-03-06 13:12:20 -08:00
|
|
|
|
2013-03-14 16:14:12 -07:00
|
|
|
package { [ 'python-sqlalchemy',
|
|
|
|
'sqlite3']:
|
2013-03-14 14:57:01 -07:00
|
|
|
ensure => present,
|
|
|
|
}
|
|
|
|
|
2013-03-06 13:12:20 -08:00
|
|
|
file { '/home/jenkins/devstack-gate-secure.conf':
|
|
|
|
ensure => present,
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0600',
|
2013-03-14 14:06:49 -07:00
|
|
|
content => template('openstack_project/devstack-gate-secure.conf.erb'),
|
2013-03-06 13:12:20 -08:00
|
|
|
require => File['/home/jenkins'],
|
|
|
|
}
|
2013-03-14 17:51:57 -07:00
|
|
|
|
|
|
|
file { '/home/jenkins/.ssh/id_rsa':
|
|
|
|
owner => 'jenkins',
|
|
|
|
group => 'jenkins',
|
|
|
|
mode => '0400',
|
|
|
|
require => File['/home/jenkins/.ssh'],
|
|
|
|
content => $jenkins_ssh_private_key,
|
|
|
|
}
|
2013-02-19 15:56:22 -08:00
|
|
|
}
|