-
Notifications
You must be signed in to change notification settings - Fork 65
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 passthrough pulp mode #372
Closed
+57
−1
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,10 @@ | |
String $maximum_object_size = '5 GB', | ||
String $maximum_object_size_in_memory = '100 MB', | ||
Stdlib::Absolutepath $cache_dir = '/var/spool/squid', | ||
Boolean $passthrough_pulp_enabled = false, | ||
Stdlib::Port $passthrough_pulp_http_port = 3129, | ||
String $passthrough_pulp_allowed_net = '0.0.0.0/0', | ||
Stdlib::Host $passthrough_pulp_master_host = 'unset.domain', | ||
) { | ||
class { 'squid': | ||
maximum_object_size_in_memory => $maximum_object_size_in_memory, | ||
|
@@ -22,6 +26,26 @@ | |
options => "accel defaultsite=${streamer_host}:${streamer_port}", | ||
} | ||
|
||
if $passthrough_pulp_enabled { | ||
squid::http_port { 'passthrough to pulp master port': | ||
port => $passthrough_pulp_http_port, | ||
} | ||
|
||
squid::acl { 'passthrough_pulp_allowed_net': | ||
type => 'src', | ||
entries => [$passthrough_pulp_allowed_net], | ||
} | ||
|
||
squid::acl { 'passthrough_pulp_master_host': | ||
type => 'dstdomain', | ||
entries => [$passthrough_pulp_master_host], | ||
} | ||
|
||
squid::http_access { 'passthrough_pulp_allowed_net passthrough_pulp_master_host': | ||
action => 'allow', | ||
} | ||
} | ||
|
||
squid::http_access { 'localhost': | ||
action => 'allow', | ||
} | ||
|
@@ -47,7 +71,7 @@ | |
order => '60', | ||
config_entries => { | ||
'cache_peer' => "${streamer_host} parent ${streamer_port} 0 no-digest no-query originserver name=PulpStreamer", | ||
'cache_peer_access' => 'PulpStreamer allow all', | ||
'cache_peer_access' => 'PulpStreamer allow localhost', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This looks like a general thing that can be applied to all installations, correct? Only Apache/Pulp connect to squid. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes. I think so. |
||
'range_offset_limit' => 'none', | ||
'maximum_object_size' => $maximum_object_size, | ||
'minimum_object_size' => '0 kB', | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can enforce the data type with https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/REFERENCE.md#stdlibipaddressv4cidr. You may want to consider https://github.com/puppetlabs/puppetlabs-stdlib/blob/master/REFERENCE.md#stdlibipaddressv6cidr as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ekohl See #372 (comment) regarding your answer about "full pulp instance deployment".