From 73c94f4c86ef83847ec104e807132d2e8279b671 Mon Sep 17 00:00:00 2001
From: Monty Taylor <mordred@inaugust.com>
Date: Sat, 28 Jun 2014 11:07:05 -0700
Subject: [PATCH] Remove the mirror slaves

Now that we're using bandersnatch and cron, we do not need the
mirror slaves any longer.

Change-Id: I637dd7f32580c59ca00ff20f29ebba4d4bcf8e94
---
 manifests/site.pp                             | 31 -------
 .../manifests/mirror26_slave.pp               | 26 ------
 .../manifests/mirror27_slave.pp               | 26 ------
 .../manifests/mirror33_slave.pp               | 27 ------
 .../manifests/mirror_slave.pp                 | 93 -------------------
 5 files changed, 203 deletions(-)
 delete mode 100644 modules/openstack_project/manifests/mirror26_slave.pp
 delete mode 100644 modules/openstack_project/manifests/mirror27_slave.pp
 delete mode 100644 modules/openstack_project/manifests/mirror33_slave.pp
 delete mode 100644 modules/openstack_project/manifests/mirror_slave.pp

diff --git a/manifests/site.pp b/manifests/site.pp
index 6a77340661..1169b2f47f 100644
--- a/manifests/site.pp
+++ b/manifests/site.pp
@@ -584,37 +584,6 @@ node /^ci-backup-.*\.openstack\.org$/ {
   include openstack_project::backup_server
 }
 
-#
-# Jenkins slaves:
-#
-
-# Node-OS: centos6
-node 'mirror26.slave.openstack.org' {
-  include openstack_project
-  class { 'openstack_project::mirror26_slave':
-    jenkins_ssh_public_key  => $openstack_project::jenkins_ssh_key,
-    jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents', 'XXX')
-  }
-}
-
-# Node-OS: precise
-node 'mirror27.slave.openstack.org' {
-  include openstack_project
-  class { 'openstack_project::mirror27_slave':
-    jenkins_ssh_public_key  => $openstack_project::jenkins_ssh_key,
-    jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents', 'XXX')
-  }
-}
-
-# Node-OS: precise
-node 'mirror33.slave.openstack.org' {
-  include openstack_project
-  class { 'openstack_project::mirror33_slave':
-    jenkins_ssh_public_key  => $openstack_project::jenkins_ssh_key,
-    jenkins_ssh_private_key => hiera('jenkins_ssh_private_key_contents', 'XXX')
-  }
-}
-
 # Node-OS: precise
 node 'proposal.slave.openstack.org' {
   include openstack_project
diff --git a/modules/openstack_project/manifests/mirror26_slave.pp b/modules/openstack_project/manifests/mirror26_slave.pp
deleted file mode 100644
index 1e7075708b..0000000000
--- a/modules/openstack_project/manifests/mirror26_slave.pp
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2013  OpenStack Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# Install a python26 mirror building slave.
-
-class openstack_project::mirror26_slave (
-  $jenkins_ssh_public_key,
-  $jenkins_ssh_private_key,
-) {
-
-  class { 'openstack_project::mirror_slave':
-    jenkins_ssh_public_key  => $jenkins_ssh_public_key,
-    jenkins_ssh_private_key => $jenkins_ssh_private_key,
-  }
-}
diff --git a/modules/openstack_project/manifests/mirror27_slave.pp b/modules/openstack_project/manifests/mirror27_slave.pp
deleted file mode 100644
index 47da9f26ea..0000000000
--- a/modules/openstack_project/manifests/mirror27_slave.pp
+++ /dev/null
@@ -1,26 +0,0 @@
-# Copyright 2013  OpenStack Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# Install a python27 mirror building slave.
-
-class openstack_project::mirror27_slave (
-  $jenkins_ssh_public_key,
-  $jenkins_ssh_private_key,
-) {
-
-  class { 'openstack_project::mirror_slave':
-    jenkins_ssh_public_key  => $jenkins_ssh_public_key,
-    jenkins_ssh_private_key => $jenkins_ssh_private_key,
-  }
-}
diff --git a/modules/openstack_project/manifests/mirror33_slave.pp b/modules/openstack_project/manifests/mirror33_slave.pp
deleted file mode 100644
index 073d083775..0000000000
--- a/modules/openstack_project/manifests/mirror33_slave.pp
+++ /dev/null
@@ -1,27 +0,0 @@
-# Copyright 2013  OpenStack Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# Install a python33 mirror building slave.
-
-class openstack_project::mirror33_slave (
-  $jenkins_ssh_public_key,
-  $jenkins_ssh_private_key,
-) {
-
-  class { 'openstack_project::mirror_slave':
-    jenkins_ssh_public_key  => $jenkins_ssh_public_key,
-    jenkins_ssh_private_key => $jenkins_ssh_private_key,
-    python3                 => true,
-  }
-}
diff --git a/modules/openstack_project/manifests/mirror_slave.pp b/modules/openstack_project/manifests/mirror_slave.pp
deleted file mode 100644
index 9e72aa9949..0000000000
--- a/modules/openstack_project/manifests/mirror_slave.pp
+++ /dev/null
@@ -1,93 +0,0 @@
-# Copyright 2013  OpenStack Foundation
-#
-# Licensed under the Apache License, Version 2.0 (the "License"); you may
-# not use this file except in compliance with the License. You may obtain
-# a copy of the License at
-#
-#      http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
-# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
-# License for the specific language governing permissions and limitations
-# under the License.
-#
-# Install a python mirror building slave.
-
-class openstack_project::mirror_slave (
-  $jenkins_ssh_public_key,
-  $jenkins_ssh_private_key,
-  $python3=false,
-) {
-
-  class { 'openstack_project::slave':
-    ssh_key => $jenkins_ssh_public_key,
-    python3 => $python3,
-  }
-
-  file { '/home/jenkins/.ssh/id_rsa':
-    owner   => 'jenkins',
-    group   => 'jenkins',
-    mode    => '0400',
-    require => File['/home/jenkins/.ssh'],
-    content => $jenkins_ssh_private_key,
-  }
-
-  file { '/home/jenkins/pypimirror':
-    ensure  => directory,
-    mode    => '0755',
-    owner   => 'jenkins',
-    group   => 'jenkins',
-    require => User['jenkins'],
-  }
-
-  file { '/home/jenkins/pypimirror/etc':
-    ensure  => directory,
-    mode    => '0755',
-    owner   => 'jenkins',
-    group   => 'jenkins',
-    require => File['/home/jenkins/pypimirror'],
-  }
-
-  file { '/home/jenkins/pypimirror/cache':
-    ensure  => directory,
-    mode    => '0755',
-    owner   => 'jenkins',
-    group   => 'jenkins',
-    require => File['/home/jenkins/pypimirror'],
-  }
-
-  file { '/home/jenkins/pypimirror/mirror':
-    ensure  => directory,
-    mode    => '0755',
-    owner   => 'jenkins',
-    group   => 'jenkins',
-    require => File['/home/jenkins/pypimirror'],
-  }
-
-  file { '/home/jenkins/pypimirror/etc/pypi-mirror.yaml':
-    ensure  => present,
-    source  => 'puppet:///modules/openstack_project/jenkins-pypi-mirror.yaml',
-    require => File['/home/jenkins/pypimirror/etc'],
-  }
-
-  file { '/opt/jeepyb':
-    ensure => absent,
-  }
-
-  vcsrepo { '/opt/pypi-mirror':
-    ensure   => latest,
-    provider => git,
-    revision => 'master',
-    source   => 'https://git.openstack.org/openstack-infra/pypi-mirror',
-  }
-
-  exec { 'install_pypi_mirror' :
-    command     => 'pip install .',
-    cwd         => '/opt/pypi-mirror',
-    path        => '/usr/local/bin:/bin:/usr/bin',
-    refreshonly => true,
-    subscribe   => Vcsrepo['/opt/pypi-mirror'],
-  }
-
-}