Skip to content

Commit

Permalink
drop rsync from web
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Jun 6, 2024
1 parent 801376a commit 9fba5ed
Show file tree
Hide file tree
Showing 14 changed files with 4 additions and 143 deletions.
3 changes: 0 additions & 3 deletions puppet/Puppetfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,8 @@ mod 'puppetlabs/mailalias_core', '1.2.0'
mod 'puppetlabs/mount_providers', '2.0.1'
mod 'puppetlabs/ntp', '10.1.0'
mod 'puppetlabs/postgresql', '10.3.0'
# released version doesn't allow puppetlabs/concat 9.x & puppetlabs/stdlib 9.x
mod 'puppetlabs/rsync', :git => 'https://github.com/ekohl/puppetlabs-rsync', :branch => 'compatible-with-latest'
mod 'puppetlabs/stdlib', '9.6.0'
mod 'puppetlabs/vcsrepo', '6.1.0'
mod 'puppetlabs/xinetd', '3.4.1'
mod 'richardc/datacat', '0.6.2'
mod 'saz/sudo', '8.0.0'
mod 'theforeman/foreman', '25.0.0'
Expand Down
12 changes: 0 additions & 12 deletions puppet/modules/foreman_debug_rsync/Modulefile

This file was deleted.

3 changes: 0 additions & 3 deletions puppet/modules/foreman_debug_rsync/README

This file was deleted.

14 changes: 0 additions & 14 deletions puppet/modules/foreman_debug_rsync/files/rsync_debug.te

This file was deleted.

32 changes: 0 additions & 32 deletions puppet/modules/foreman_debug_rsync/manifests/config.pp

This file was deleted.

10 changes: 0 additions & 10 deletions puppet/modules/foreman_debug_rsync/manifests/cron.pp

This file was deleted.

15 changes: 0 additions & 15 deletions puppet/modules/foreman_debug_rsync/manifests/init.pp

This file was deleted.

2 changes: 0 additions & 2 deletions puppet/modules/freight/manifests/uploader.pp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@
String $user,
Stdlib::Absolutepath $workspace,
) {
include rsync

secure_ssh::rsync::uploader_key { 'freight':
user => $user,
dir => "${workspace}/deb_key",
Expand Down
12 changes: 0 additions & 12 deletions puppet/modules/freight/manifests/user.pp
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,6 @@
directories => $directory_config,
}

include rsync::server
rsync::server::module { $vhost:
path => $webdir,
list => true,
read_only => true,
comment => "${vhost}.theforeman.org",
require => File[$webdir],
uid => 'nobody',
gid => 'nobody',
max_connections => 5,
exclude => ['/dists/*/.refs/'],
}
file { "${webdir}/HEADER.html":
ensure => file,
owner => 'root',
Expand Down
3 changes: 1 addition & 2 deletions puppet/modules/jenkins_node/manifests/packaging/rpm.pp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
]
$foreman_rel_eng_packages = [
'python3-pyyaml',
'rsync',
]

stdlib::ensure_packages($obal_packages + $foreman_rel_eng_packages)
Expand All @@ -47,8 +48,6 @@
manage_dir => true,
}

include rsync

secure_ssh::rsync::uploader_key { 'yumstage':
ensure => 'absent',
user => $user,
Expand Down
15 changes: 2 additions & 13 deletions puppet/modules/profiles/manifests/web.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,13 @@
# Whether to enable HTTPS. This is typically wanted but can only be enabled
# in a 2 pass setup. First Apache needs to run for Letsencrypt to function.
# Then Letsencrypt can be enabled. Also useful to turn off in test setups.
#
# @param rsync_max_connections
# Maximum connection per rsync target. Using a small value to try and reduce
# server load
class profiles::web (
String[1] $stable = '3.10',
Hash[String, Hash] $debugs_htpasswds = {},
Boolean $https = true,
Integer[0] $rsync_max_connections = 10,
) {
contain awstats

contain foreman_debug_rsync

class { 'web':
https => $https,
}
Expand All @@ -34,13 +27,10 @@
contain web::vhost::deb

class { 'web::vhost::debugs':
htpasswds => $debugs_htpasswds,
htpasswds => $debugs_htpasswds,
}
contain web::vhost::debugs

class { 'web::vhost::downloads':
rsync_max_connections => $rsync_max_connections,
}
contain web::vhost::downloads

contain web::vhost::stagingdeb
Expand All @@ -51,8 +41,7 @@
contain web::vhost::web

class { 'web::vhost::yum':
stable => $stable,
rsync_max_connections => $rsync_max_connections,
stable => $stable,
}
contain web::vhost::yum

Expand Down
2 changes: 1 addition & 1 deletion puppet/modules/utility/manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
stdlib::ensure_packages(['htop', 'iftop', 'screen'])
}

# TODO: rsync package is managed by puppetlabs-rsync
ensure_packages(['rsync'])

mailalias { 'sysadmins':
ensure => present,
Expand Down
12 changes: 0 additions & 12 deletions puppet/modules/web/manifests/vhost/downloads.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# @api private
class web::vhost::downloads (
Stdlib::Absolutepath $downloads_directory = '/var/www/vhosts/downloads/htdocs',
Integer[0] $rsync_max_connections = 5,
String $user = 'downloads',
) {
$downloads_directory_config = [
Expand Down Expand Up @@ -32,17 +31,6 @@
directories => $downloads_directory_config,
}

include rsync::server
rsync::server::module { 'downloads':
path => $downloads_directory,
list => true,
read_only => true,
comment => 'downloads.theforeman.org',
uid => 'nobody',
gid => 'nobody',
max_connections => $rsync_max_connections,
}

file { "${downloads_directory}/HEADER.html":
ensure => file,
owner => 'root',
Expand Down
12 changes: 0 additions & 12 deletions puppet/modules/web/manifests/vhost/yum.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
# @api private
class web::vhost::yum (
String[1] $stable,
Integer[0] $rsync_max_connections = 5,
Stdlib::Fqdn $servername = 'yum.theforeman.org',
Stdlib::Absolutepath $yum_directory = '/var/www/vhosts/yum/htdocs',
String $user = 'yumrepo',
Expand Down Expand Up @@ -43,17 +42,6 @@
directories => $yum_directory_config,
}

include rsync::server
rsync::server::module { 'yum':
path => $yum_directory,
list => true,
read_only => true,
comment => $servername,
uid => 'nobody',
gid => 'nobody',
max_connections => $rsync_max_connections,
}

if $facts['os']['family'] == 'RedHat' {
package { 'createrepo':
ensure => present,
Expand Down

0 comments on commit 9fba5ed

Please sign in to comment.