Skip to content

Commit

Permalink
Refs #14698 - create default directory for repo exports (#123)
Browse files Browse the repository at this point in the history
Previously, there was no default location for repository exports. This meant
that users had to "leave" Katello and hop into the command line prior to
creating their first repo export.

This commit creates a `/var/lib/pulp/katello-export` directory as part of the
install. Users may optionally point this elsewhere via installer parameter if
needed.

The `/var/lib/pulp/katello-export` directory was chosen since users already
expect that `/var/lib/pulp` and its child dirs may have large disk space
requirements.
  • Loading branch information
beav authored and ehelms committed May 12, 2016
1 parent f18f34d commit 3c6a646
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
15 changes: 15 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,20 @@
mode => '0755',
}

# NB: we define this here to avoid a dependency cycle. It is not a problem if
# this dir exists before the pulp RPMs are installed.
file { '/var/lib/pulp':
ensure => directory,
owner => 'apache',
group => 'apache',
mode => '0755',
}

file { $katello::repo_export_dir:
ensure => directory,
owner => $katello::user,
group => $katello::group,
mode => '0755',
}

}
5 changes: 5 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
# on the virtualHost for port 443.
# type: integer
#
# $repo_export_dir:: Directory to create for repository exports
#
class katello (

$user = $katello::params::user,
Expand All @@ -69,9 +71,12 @@
$package_names = $katello::params::package_names,
$enable_ostree = $katello::params::enable_ostree,
$max_keep_alive = $katello::params::max_keep_alive,

$repo_export_dir = $katello::params::repo_export_dir,
) inherits katello::params {
validate_bool($enable_ostree)
validate_integer($max_keep_alive)
validate_absolute_path($repo_export_dir)

Class['certs'] ~>
class { '::certs::apache': } ~>
Expand Down
1 change: 1 addition & 0 deletions manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
$user_groups = 'foreman'
$config_dir = '/etc/foreman/plugins'
$log_dir = '/var/log/foreman/plugins'
$repo_export_dir = '/var/lib/pulp/katello-export'

# OAUTH settings
$oauth_key = 'katello'
Expand Down

0 comments on commit 3c6a646

Please sign in to comment.