From c009700ca4f9b07ddb6497d221b6ed346ea89ad2 Mon Sep 17 00:00:00 2001 From: "James E. Blair" Date: Wed, 20 Jan 2016 15:11:24 -0800 Subject: [PATCH] Add mirror..openstack.org This patch creates a new manifest for unified infra mirrors, which will act as read-only AFS nodes that host our mirror data. These mirrors will, once validated and provisioned, replace the existing pypi mirrors in infra under a new, more generic, hostname. This patch is only intended to create the AFS read-only slave. Apache hosting will be added in subsequent patches. Change-Id: I9a2bf596cf47bffad5d6a5fd0da3c571fa266013 --- doc/source/static.rst | 2 +- manifests/site.pp | 19 ++++++++++++++++++- modules/openstack_project/manifests/mirror.pp | 9 +++++++++ 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 modules/openstack_project/manifests/mirror.pp diff --git a/doc/source/static.rst b/doc/source/static.rst index c04380ec65..571a7a9f7a 100644 --- a/doc/source/static.rst +++ b/doc/source/static.rst @@ -15,7 +15,7 @@ At a Glance * http://logs.openstack.org * http://docs-draft.openstack.org * http://status.openstack.org - * http://pypi.openstack.org + * http://mirror.openstack.org * http://specs.openstack.org :Puppet: * :file:`modules/openstack_project/manifests/static.pp` diff --git a/manifests/site.pp b/manifests/site.pp index ac95cd8963..14dd32f7c3 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -535,7 +535,24 @@ node 'mirror-update.openstack.org' { } } -# Machines in each region to run PyPI mirrors. +# Machines in each region to serve AFS mirrors. +# Node-OS: trusty +node /^mirror\..*\.openstack\.org$/ { + $group = "mirror" + + class { 'openstack_project::server': + iptables_public_tcp_ports => [22, 80], + sysadmins => hiera('sysadmins', []), + afs => true, + } + + class { 'openstack_project::mirror': + vhost_name => $::fqdn, + require => Class['Openstack_project::Server'], + } +} + +# Legacy machines in each region to run pypi package mirrors. # Node-OS: precise node /^pypi\..*\.openstack\.org$/ { $group = "pypi" diff --git a/modules/openstack_project/manifests/mirror.pp b/modules/openstack_project/manifests/mirror.pp new file mode 100644 index 0000000000..647941e4d3 --- /dev/null +++ b/modules/openstack_project/manifests/mirror.pp @@ -0,0 +1,9 @@ +# == Class: openstack_project::mirror +# +class openstack_project::mirror ( + $vhost_name = $::fqdn, +) { + + $mirror_root = '/afs/openstack.org/mirror' + +}