Skip to content

Commit

Permalink
Merge branch 'testing'
Browse files Browse the repository at this point in the history
  • Loading branch information
mickenordin committed Nov 29, 2024
2 parents 80324cf + 300cf2a commit 2969d04
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions manifests/xrootd.pp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
class sunet::xrootd(
Array[Hash] $cms_allow_hosts,
Array $managers,
String $manager_domain,
String $cms_port = '1213',
String $container_image = 'docker.sunet.se/staas/xrootd-s3-http',
String $container_tag = '0.17.0-1',
Expand Down
14 changes: 12 additions & 2 deletions templates/xrootd/docker-compose.erb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,16 @@ services:
image: <%= @container_image %>:<%= @container_tag %>
dns:
- 89.32.32.32
hostname: <%= @hostname %>
hostname: <%= @hostname.split('.')[0] %>
network_mode: host
extra_hosts:
<%- @cms_allow_hosts.each do |extra_host| -%>
- "<%= extra_host['name'] %>:<%= extra_host['ipv4'] %>"
- "<%= extra_host['name'] %>:<%= extra_host['ipv6'] %>"
<%- if @managers.include?(extra_host['name']) -%>
- "<%= extra_host['name'].split('.')[0] %>:<%= extra_host['ipv4'] %>"
- "<%= extra_host['name'].split('.')[0] %>:<%= extra_host['ipv6'] %>"
<%- end -%>
<%- end -%>
volumes:
- /opt/xrootd/config:/etc/xrootd:ro
Expand All @@ -21,11 +26,16 @@ services:
image: <%= @container_image %>:<%= @container_tag %>
dns:
- 89.32.32.32
hostname: <%= @hostname %>
hostname: <%= @hostname.split('.')[0] %>
network_mode: host
extra_hosts:
<%- @cms_allow_hosts.each do |extra_host| -%>
- "<%= extra_host['name'] %>:<%= extra_host['ipv4'] %>"
- "<%= extra_host['name'] %>:<%= extra_host['ipv6'] %>"
<%- if @managers.include?(extra_host['name']) -%>
- "<%= extra_host['name'].split('.')[0] %>:<%= extra_host['ipv4'] %>"
- "<%= extra_host['name'].split('.')[0] %>:<%= extra_host['ipv6'] %>"
<%- end -%>
<%- end -%>
volumes:
- /opt/xrootd/config:/etc/xrootd:ro
Expand Down
6 changes: 2 additions & 4 deletions templates/xrootd/xrootd-manager.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,12 @@ all.export <%= @export %>
# Set the role to either proxy manager or proxy server
all.adminpath <%= @xrootd_admin_path %>
all.pidpath <%= @xrootd_admin_path %>
<% @managers.each do |manager| -%>
all.manager <%= manager %>:<%= @xrootd_port %>
<% end -%>
all.manager all <%= @manager_domain %>+ <%= @xrootd_port %>
all.role manager

# Tell the cmsd which machines are allowed to connects
<% @cms_allow_hosts.each do |host| -%>
cms.allow host <%= host %>
cms.allow host <%= host['name'] %>
<% end -%>
cms.dfs limit 0 lookup distrib mdhold 0 redirect verify retries 2

Expand Down
4 changes: 1 addition & 3 deletions templates/xrootd/xrootd-server.cfg.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ all.export <%= @export %>
# Set the role to either proxy manager or proxy server
all.adminpath <%= @xrootd_admin_path %>
all.pidpath <%= @xrootd_admin_path %>
<% @managers.each do |manager| -%>
all.manager <%= manager %>:<%= @xrootd_port %>
<% end -%>
all.manager all <%= @manager_domain %>+ <%= @xrootd_port %>
all.role server

# Tell the cmsd which machines are allowed to connects
Expand Down

0 comments on commit 2969d04

Please sign in to comment.