diff --git a/modules/openstack_project/manifests/release_slave.pp b/modules/openstack_project/manifests/release_slave.pp index 1879fc584b..6280ae8535 100644 --- a/modules/openstack_project/manifests/release_slave.pp +++ b/modules/openstack_project/manifests/release_slave.pp @@ -32,6 +32,7 @@ class openstack_project::release_slave ( $npm_userpassword, $npm_userurl, $admin_keytab = '', + $packaging_keytab = '', ) { class { 'openstack_project::slave': ssh_key => $jenkins_ssh_public_key, @@ -105,4 +106,20 @@ class openstack_project::release_slave ( require => File['/home/jenkins'], } + include ::openstack_project::reprepro_mirror + + file { '/etc/packaging.keytab': + owner => 'root', + group => 'root', + mode => '0400', + content => $packaging_keytab, + } + + ### Debian Openstack Packages ### + ::openstack_project::reprepro { 'debian-openstack-reprepro': + confdir => '/etc/reprepro/debian-openstack', + basedir => '/afs/.openstack.org/mirror/debian-openstack', + distributions => 'openstack_project/reprepro/distributions.debian-openstack.erb', + releases => ['jessie'], + } } diff --git a/modules/openstack_project/manifests/reprepro.pp b/modules/openstack_project/manifests/reprepro.pp index 65d8d843b8..72f4a81d18 100644 --- a/modules/openstack_project/manifests/reprepro.pp +++ b/modules/openstack_project/manifests/reprepro.pp @@ -5,7 +5,7 @@ define openstack_project::reprepro ( $basedir, $distributions, $logdir = '/var/log/reprepro', - $updates_file, + $updates_file = undef, $options_template = 'openstack_project/reprepro/options.erb', $releases = [], ) { @@ -13,12 +13,14 @@ define openstack_project::reprepro ( ensure => directory, } - file { "${confdir}/updates": - ensure => present, - owner => 'root', - group => 'root', - mode => '0755', - source => $updates_file, + if $updates_file != undef { + file { "${confdir}/updates": + ensure => present, + owner => 'root', + group => 'root', + mode => '0755', + source => $updates_file, + } } file { "${confdir}/options": diff --git a/modules/openstack_project/templates/reprepro/distributions.debian-openstack.erb b/modules/openstack_project/templates/reprepro/distributions.debian-openstack.erb new file mode 100644 index 0000000000..d738981d44 --- /dev/null +++ b/modules/openstack_project/templates/reprepro/distributions.debian-openstack.erb @@ -0,0 +1,7 @@ +<% @releases.each do |release| -%> +Codename: <%= release %> +Description: Debian OpenStack <%= release.capitalize %> packages +Architectures: amd64 i386 source +Components: main + +<% end -%>