system-config/modules/openstack_project/manifests/npm_mirror.pp
Michael Krotscheck 841e7e2f57 Added NPM Mirror to mirror_update
This patch adds a cron job to our mirror_update servers which will
begin mirroring the npm registry into our own AFS mirror directories,
under the /npm path.

It uses two major components: First, the registry-static project,
available here: https://github.com/davglass/registry-static

Secondly, a custom implementation of the fs-blob-store named
afs-blob-store, which creates a virtual filesystem that automatically
translates paths to accomodate AFS' folder size limit. This project
is currently still hosted on github, however will be added to
OpenStack soon: https://github.com/krotscheck/js-afs-blob-store

This will require creating ACL's as well as the AFS principal before
this can be landed.

Change-Id: Ib78852fc5cde4fb04fe6439e01a591ca2781ce21
2016-04-11 17:34:30 +00:00

53 lines
1015 B
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'],
]
}
}