Merge "Refactor mariadb mirror into 2 repos"
This commit is contained in:
commit
887f62310d
@ -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
|
@ -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
|
@ -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
|
21
modules/openstack_project/manifests/mariadb_mirror.pp
Normal file
21
modules/openstack_project/manifests/mariadb_mirror.pp
Normal file
@ -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',
|
||||
}
|
||||
}
|
@ -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'],
|
||||
]
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user