diff --git a/modules/openstack_project/files/reprepro/ubuntu-mariadb-10.0-updates b/modules/openstack_project/files/reprepro/ubuntu-mariadb-10.0-updates new file mode 100644 index 0000000000..eac033185b --- /dev/null +++ b/modules/openstack_project/files/reprepro/ubuntu-mariadb-10.0-updates @@ -0,0 +1,7 @@ +Name: ubuntu-mariadb +Method: http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu +Components: main +UDebComponents: main +Architectures: amd64 +GetInRelease: no +VerifyRelease: 1BB943DB diff --git a/modules/openstack_project/files/reprepro/ubuntu-mariadb-10.1-updates b/modules/openstack_project/files/reprepro/ubuntu-mariadb-10.1-updates new file mode 100644 index 0000000000..904426e0d9 --- /dev/null +++ b/modules/openstack_project/files/reprepro/ubuntu-mariadb-10.1-updates @@ -0,0 +1,7 @@ +Name: ubuntu-mariadb +Method: http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu +Components: main +UDebComponents: main +Architectures: amd64 +GetInRelease: no +VerifyRelease: 1BB943DB diff --git a/modules/openstack_project/files/reprepro/ubuntu-mariadb-updates b/modules/openstack_project/files/reprepro/ubuntu-mariadb-updates deleted file mode 100644 index 1300dd2272..0000000000 --- a/modules/openstack_project/files/reprepro/ubuntu-mariadb-updates +++ /dev/null @@ -1,15 +0,0 @@ -Name: ubuntu-mariadb-10.0 -Method: http://ftp.osuosl.org/pub/mariadb/repo/10.0/ubuntu -Components: main -UDebComponents: main -Architectures: amd64 -GetInRelease: no -VerifyRelease: 1BB943DB - -Name: ubuntu-mariadb-10.1 -Method: http://ftp.osuosl.org/pub/mariadb/repo/10.1/ubuntu -Components: main -UDebComponents: main -Architectures: amd64 -GetInRelease: no -VerifyRelease: 1BB943DB diff --git a/modules/openstack_project/manifests/mariadb_mirror.pp b/modules/openstack_project/manifests/mariadb_mirror.pp new file mode 100644 index 0000000000..7a3de8f90b --- /dev/null +++ b/modules/openstack_project/manifests/mariadb_mirror.pp @@ -0,0 +1,21 @@ +# == Define: openstack_project::mariadb_mirror +# +define openstack_project::mariadb_mirror ( +) { + ### MariaDB mirror ### + ::openstack_project::reprepro { "ubuntu-mariadb-$name-reprepro-mirror": + confdir => "/etc/reprepro/ubuntu-mariadb-$name", + basedir => "/afs/.openstack.org/mirror/ubuntu-mariadb-$name", + distributions => 'openstack_project/reprepro/distributions.ubuntu-mariadb.erb', + updates_file => "puppet:///modules/openstack_project/reprepro/ubuntu-mariadb-$name-updates", + releases => [ 'trusty', 'xenial' ], + } + + cron { "reprepro ubuntu mariadb $name": + user => $user, + hour => '*/2', + minute => '0', + command => "flock -n /var/run/reprepro/ubuntu-mariadb-$name.lock reprepro-mirror-update /etc/reprepro/ubuntu-mariadab-$name mirror.ubuntu-mariadb-$name >>/var/log/reprepro/ubuntu-mariadb-$name-mirror.log 2>&1", + environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', + } +} diff --git a/modules/openstack_project/manifests/mirror_update.pp b/modules/openstack_project/manifests/mirror_update.pp index 3517d2ccbf..ed7ae8e407 100644 --- a/modules/openstack_project/manifests/mirror_update.pp +++ b/modules/openstack_project/manifests/mirror_update.pp @@ -369,25 +369,18 @@ class openstack_project::mirror_update ( } ### MariaDB mirror ### - ::openstack_project::reprepro { 'ubuntu-mariadb-reprepro-mirror': - confdir => '/etc/reprepro/ubuntu-mariadb', - basedir => '/afs/.openstack.org/mirror/ubuntu-mariadb', - distributions => 'openstack_project/reprepro/distributions.ubuntu-mariadb.erb', - updates_file => 'puppet:///modules/openstack_project/reprepro/ubuntu-mariadb-updates', - releases => [ 'trusty', 'xenial' ], - } - - cron { 'reprepro ubuntu mariadb': - user => $user, - hour => '*/2', - minute => '0', - command => 'flock -n /var/run/reprepro/ubuntu-mariadb.lock reprepro-mirror-update /etc/reprepro/ubuntu-mariadb mirror.ubuntu-mariadb >>/var/log/reprepro/ubuntu-mariadb-mirror.log 2>&1', - environment => 'PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin', - require => [ + ::openstack_project::mariadb_mirror { '10.0': + require => [ + File['/usr/local/bin/reprepro-mirror-update'], + File['/etc/afsadmin.keytab'], + File['/etc/reprepro.keytab'], + ] + } + ::openstack_project::mariadb_mirror { '10.1': + require => [ File['/usr/local/bin/reprepro-mirror-update'], File['/etc/afsadmin.keytab'], File['/etc/reprepro.keytab'], - ::openstack_project::reprepro['ubuntu-mariadb-reprepro-mirror'], ] }