From d1c3803dcbda46b8c3c634b69835847dae9cd976 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Thu, 31 Oct 2013 15:57:54 -0400 Subject: [PATCH] Remove old pypi host cruft We no longer use this, so keeping it in puppet is confusing. Change-Id: I8a5d2a0067063ba762d553f397079deef43fc43f --- manifests/site.pp | 6 - modules/openstack_project/manifests/pypi.pp | 36 ------ modules/pypimirror/manifests/init.pp | 105 ------------------ .../pypimirror/templates/run-mirror.sh.erb | 5 - 4 files changed, 152 deletions(-) delete mode 100644 modules/openstack_project/manifests/pypi.pp delete mode 100644 modules/pypimirror/manifests/init.pp delete mode 100644 modules/pypimirror/templates/run-mirror.sh.erb diff --git a/manifests/site.pp b/manifests/site.pp index fb0205bbdb..bb522d4627 100644 --- a/manifests/site.pp +++ b/manifests/site.pp @@ -192,12 +192,6 @@ node 'eavesdrop.openstack.org' { } } -node 'pypi.openstack.org' { - class { 'openstack_project::pypi': - sysadmins => hiera('sysadmins'), - } -} - node 'etherpad.openstack.org' { class { 'openstack_project::etherpad': ssl_cert_file_contents => hiera('etherpad_ssl_cert_file_contents'), diff --git a/modules/openstack_project/manifests/pypi.pp b/modules/openstack_project/manifests/pypi.pp deleted file mode 100644 index f2eede4267..0000000000 --- a/modules/openstack_project/manifests/pypi.pp +++ /dev/null @@ -1,36 +0,0 @@ -# == Class: openstack_project::pypi -# -class openstack_project::pypi ( - $sysadmins = [] -) { - include openstack_project::tmpcleanup - include openstack_project::automatic_upgrades - - # include jenkins slave so that build deps are there for the pip download - class { 'jenkins::slave': - ssh_key => '', - user => false, - } - - class { 'openstack_project::server': - iptables_public_tcp_ports => [80], - sysadmins => $sysadmins, - } - - class { 'pypimirror': - mirror_config => '/etc/openstackci/pypi-mirror.yaml', - } - - file { '/etc/openstackci': - ensure => directory, - mode => '0755', - owner => 'root', - group => 'root', - } - - file { '/etc/openstackci/pypi-mirror.yaml': - ensure => present, - source => 'puppet:///modules/openstack_project/pypi-mirror.yaml', - } - -} diff --git a/modules/pypimirror/manifests/init.pp b/modules/pypimirror/manifests/init.pp deleted file mode 100644 index 9100e5c39b..0000000000 --- a/modules/pypimirror/manifests/init.pp +++ /dev/null @@ -1,105 +0,0 @@ -# == Class: pypimorror -# -class pypimirror( - $vhost_name = $::fqdn, - $mirror_config = '', - $mirror_root = '/var/lib/pypimirror', -) { - - include apache - include pip - include jeepyb - - $log_root = '/var/log/pypimirror/' - $log_filename = "${log_root}/pypimirror.log" - $cache_root = '/var/cache/pypimirror' - - if ! defined(Package['python-yaml']) { - package { 'python-yaml': - ensure => present, - } - } - - user { 'mirror': - ensure => present, - home => '/home/mirror', - shell => '/bin/bash', - gid => 'mirror', - managehome => true, - require => Group['mirror'], - } - - group { 'mirror': - ensure => present, - } - - file { $log_root: - ensure => directory, - mode => '0755', - owner => 'mirror', - group => 'mirror', - require => User['mirror'], - } - - file { $cache_root: - ensure => directory, - mode => '0755', - owner => 'mirror', - group => 'mirror', - require => User['mirror'], - } - - file { $mirror_root: - ensure => directory, - mode => '0755', - owner => 'mirror', - group => 'mirror', - require => User['mirror'], - } - - file { '/usr/local/bin/run-mirror.sh': - ensure => present, - mode => '0755', - owner => 'root', - group => 'root', - content => template('pypimirror/run-mirror.sh.erb'), - } - - # Add cron job to update the mirror - - cron { 'update_mirror': - ensure => absent, - user => 'root', - hour => '0', - command => '/usr/local/bin/run-mirror.sh', - } - - cron { 'update_pypi_mirror': - user => 'mirror', - hour => '0', - command => '/usr/local/bin/run-mirror.sh', - require => File['/usr/local/bin/run-mirror.sh'], - } - - # Rotate the mirror log file - - include logrotate - logrotate::file { 'pypimirror': - log => $log_filename, - options => [ - 'compress', - 'delaycompress', - 'missingok', - 'rotate 7', - 'daily', - 'notifempty', - ], - require => Cron['update_mirror'], - } - - apache::vhost { $vhost_name: - port => 80, - docroot => $mirror_root, - priority => 50, - } -} diff --git a/modules/pypimirror/templates/run-mirror.sh.erb b/modules/pypimirror/templates/run-mirror.sh.erb deleted file mode 100644 index 9f9d04065c..0000000000 --- a/modules/pypimirror/templates/run-mirror.sh.erb +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash -e -# This file is managed by puppet. -# https://git.openstack.org/cgit/openstack-infra/config - -/usr/local/bin/run-mirror -c <%= mirror_config %> >> <%= log_filename %>