96230945a7
This patch adds the openstack-registry-hooks project, which will check the current update sequence of the mirror after every package has been downloaded, and exit the process cleanly if the update sequence matches the latest sequence from the registry. This will effectively de-daemonize the registry-static script, assuming that it can update in a reasonable amount of time. Note: When this lands, the index of the registry should be cleaned, and the entire index should be rebuilt. This should not impact the tarballs, only the json files, as shasums are checked before downloading. Change-Id: Ia94187f1f1d60ad2cbb3e71f76502bec75e228ae
62 lines
1.2 KiB
Puppet
62 lines
1.2 KiB
Puppet
# == Class: openstack_project::npm_mirror
|
|
#
|
|
class openstack_project::npm_mirror (
|
|
$uri_rewrite,
|
|
$data_directory,
|
|
) {
|
|
|
|
file { $data_directory:
|
|
ensure => directory,
|
|
owner => 'root',
|
|
group => 'root',
|
|
}
|
|
|
|
class { '::nodejs':
|
|
repo_url_suffix => 'node_4.x',
|
|
}
|
|
|
|
# See: https://github.com/davglass/registry-static/pull/45
|
|
package { 'patch-package-json':
|
|
ensure => '0.0.4',
|
|
provider => 'npm',
|
|
require => Class['nodejs'],
|
|
}
|
|
|
|
package { 'follow-registry':
|
|
ensure => '2.0.0',
|
|
provider => 'npm',
|
|
require => [
|
|
Class['nodejs'],
|
|
]
|
|
}
|
|
|
|
# The registry mirroring script.
|
|
package { 'registry-static':
|
|
ensure => '2.2.0',
|
|
provider => 'npm',
|
|
require => [
|
|
Class['nodejs'],
|
|
Package['follow-registry'],
|
|
Package['patch-package-json'],
|
|
]
|
|
}
|
|
|
|
# The afs-blob-store file structure rewriter.
|
|
package { 'afs-blob-store':
|
|
ensure => '1.0.1',
|
|
provider => 'npm',
|
|
require => [
|
|
Class['nodejs'],
|
|
]
|
|
}
|
|
|
|
# Common registry hooks
|
|
package { 'openstack-registry-hooks':
|
|
ensure => '1.1.0',
|
|
provider => 'npm',
|
|
require => [
|
|
Class['nodejs'],
|
|
]
|
|
}
|
|
}
|