Skip to content

Commit

Permalink
Add hosts in node data
Browse files Browse the repository at this point in the history
  • Loading branch information
malvads committed Jun 10, 2024
1 parent fd63ad2 commit 292288d
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

#webui
default["redborder"]["webui"]["port"] = 8001
default["redborder"]["webui"]["hosts"] = []

#memcached
default["redborder"]["memcached"]["elasticache"] = false
Expand Down
1 change: 1 addition & 0 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@
end

webui_config "Configure Nginx WebUI" do
hosts node["redborder"]["webui"]["webui_hosts"]
cdomain node["redborder"]["cdomain"]
port node["redborder"]["webui"]["port"]
action ((manager_services["webui"] and manager_services["nginx"]) ? [:configure_certs, :add_webui_conf_nginx] : :nothing)
Expand Down
5 changes: 5 additions & 0 deletions resources/recipes/prepare_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,11 @@
s3_hosts = node["redborder"]["managers_per_services"]["s3"].map {|z| "#{z}.node:9000"}
node.default["redborder"]["s3"]["s3_hosts"] = s3_hosts

# set webui hosts
webui_hosts = node["redborder"]["managers_per_services"]["webui"].map {|z| "#{z}.node"}
node.default["redborder"]["webui"]["webui_hosts"] = webui_hosts


#set kafka host index if kafka is enabled in this host
if node["redborder"]["managers_per_services"]["kafka"].include?(node.name)
node.default["redborder"]["kafka"]["host_index"] = node["redborder"]["managers_per_services"]["kafka"].index(node.name)
Expand Down

0 comments on commit 292288d

Please sign in to comment.