Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docs vhost to web02 #1200

Merged
merged 1 commit into from Dec 12, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 22 additions & 0 deletions puppet/modules/web/manifests/init.pp
Expand Up @@ -33,6 +33,7 @@
'stagingdeb.theforeman.org',
'www.theforeman.org',
'yum.theforeman.org',
'docs.theforeman.org',
],
webroot_paths => [
'/var/www/vhosts/web/htdocs',
Expand All @@ -42,6 +43,7 @@
'/var/www/vhosts/stagingdeb/htdocs',
'/var/www/vhosts/web/htdocs',
'/var/www/vhosts/yum/htdocs',
'/var/www/vhosts/docs/htdocs',
],
}

Expand Down Expand Up @@ -129,6 +131,24 @@
max_connections => $max_rsync_connections,
}

# DOCS
$docs_directory = '/var/www/vhosts/docs/htdocs'
$docs_directory_config = [
{
path => $docs_directory,
options => ['Indexes', 'FollowSymLinks', 'MultiViews'],
expires_active => 'on',
expires_default => 'access plus 4 hours',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it wise to set caching headers? This depends on the build process and probably safer to start without.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copy-pasted from the yum example, do you want me to remove it?

},
]

$docs_attrs = {
servername => 'docs.theforeman.org',
docroot => $docs_directory,
docroot_mode => '2575',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's a weird mode. Why is it writable for the group but not the user? We have a special case with yum, but docs should be more like website. I'd also prefer a specific user that owns the docroot so we don't have to abuse root for it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I picked a really special example. Let me fix it in a new PR.

directories => $docs_directory_config,
}

if $::osfamily == 'RedHat' {
package { 'createrepo':
ensure => present,
Expand Down Expand Up @@ -226,6 +246,7 @@
'downloads' => $downloads_attrs,
'web' => $web_attrs,
'yum' => $yum_attrs,
'docs' => $docs_attrs,
},
{
'port' => '80',
Expand All @@ -240,6 +261,7 @@
'downloads-https' => $downloads_attrs,
'web-https' => $web_attrs,
'yum-https' => $yum_attrs,
'docs-https' => $docs_attrs,
},
{
'port' => '443',
Expand Down