diff --git a/modules/openstack_project/files/reprepro/debian-ceph-luminous-updates b/modules/openstack_project/files/reprepro/debian-ceph-luminous-updates new file mode 100644 index 0000000000..48394c6a7f --- /dev/null +++ b/modules/openstack_project/files/reprepro/debian-ceph-luminous-updates @@ -0,0 +1,7 @@ +Name: debian-ceph-luminous +Method: http://download.ceph.com/debian-luminous/ +Components: main +UDebComponents: main +Architectures: amd64 +GetInRelease: no +VerifyRelease: 460f3994 diff --git a/modules/openstack_project/manifests/mirror.pp b/modules/openstack_project/manifests/mirror.pp index f0591daa64..ccdb79a6d1 100644 --- a/modules/openstack_project/manifests/mirror.pp +++ b/modules/openstack_project/manifests/mirror.pp @@ -20,6 +20,7 @@ class openstack_project::mirror ( $npm_root = "${mirror_root}/npm" $ceph_deb_hammer_root = "${mirror_root}/ceph-deb-hammer" $ceph_deb_jewel_root = "${mirror_root}/ceph-deb-jewel" + $ceph_deb_luminous_root = "${mirror_root}/ceph-deb-luminous" $gem_root = "${mirror_root}/gem" $www_base = '/var/www' @@ -178,6 +179,17 @@ class openstack_project::mirror ( ] } + # Create the symlink to ceph-deb-luminous. + file { "${www_root}/ceph-deb-luminous": + ensure => link, + target => "${ceph_deb_luminous_root}", + owner => root, + group => root, + require => [ + File["${www_root}"], + ] + } + # Create the symlink to Ubuntu Cloud Archive. file { "${www_root}/ubuntu-cloud-archive": ensure => link, diff --git a/modules/openstack_project/manifests/mirror_update.pp b/modules/openstack_project/manifests/mirror_update.pp index 9ee732d4ec..52ba9dc1e7 100644 --- a/modules/openstack_project/manifests/mirror_update.pp +++ b/modules/openstack_project/manifests/mirror_update.pp @@ -248,6 +248,28 @@ class openstack_project::mirror_update ( ] } + ::openstack_project::reprepro { 'debian-ceph-luminous-reprepro-mirror': + confdir => '/etc/reprepro/debian-ceph-luminous', + basedir => '/afs/.openstack.org/mirror/ceph-deb-luminous', + distributions => 'openstack_project/reprepro/distributions.debian-ceph-luminous.erb', + updates_file => 'puppet:///modules/openstack_project/reprepro/debian-ceph-luminous-updates', + releases => ['xenial'], + } + + cron { 'reprepro debian ceph luminous': + user => $user, + hour => '*/2', + minute => '0', + command => 'flock -n /var/run/reprepro/debian-ceph-luminous.lock reprepro-mirror-update /etc/reprepro/debian-ceph-luminous mirror.deb-luminous >>/var/log/reprepro/debian-ceph-luminous-mirror.log 2>&1', + environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', + require => [ + File['/usr/local/bin/reprepro-mirror-update'], + File['/etc/afsadmin.keytab'], + File['/etc/reprepro.keytab'], + ::Openstack_project::Reprepro['debian-ceph-luminous-reprepro-mirror'], + ] + } + gnupg_key { 'Ceph Archive': ensure => present, # 08B7 3419 AC32 B4E9 66C1 A330 E84A C2C0 460F 3994 diff --git a/modules/openstack_project/templates/reprepro/distributions.debian-ceph-luminous.erb b/modules/openstack_project/templates/reprepro/distributions.debian-ceph-luminous.erb new file mode 100644 index 0000000000..90bc85e4c4 --- /dev/null +++ b/modules/openstack_project/templates/reprepro/distributions.debian-ceph-luminous.erb @@ -0,0 +1,11 @@ +<% @releases.each do |release| -%> +Origin: Ceph Luminous +Codename: <%= release %> +Description: OpenStack Debian Ceph Luminous <%= release.capitalize %> mirror +Architectures: amd64 +Components: main +Contents: .gz +Update: debian-ceph-luminous +Log: <%= @logdir %>/debian-ceph-luminous-<%= release %>.log + +<% end -%>