Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
malvads committed Jun 12, 2024
1 parent b08350b commit 2686d89
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion resources/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

# s3
default['redborder']['uploaded_s3'] = false
default["redborder"]["s3"]["s3_hosts"] = []
default['redborder']['s3']['s3_hosts'] = []

# chef-client
default['chef-client']['interval'] = 300
Expand Down
24 changes: 12 additions & 12 deletions resources/recipes/configure.rb
Original file line number Diff line number Diff line change
Expand Up @@ -517,26 +517,26 @@
end

# Allow only s3 onpremise nodes for now..
minio_config "Configure S3 (minio)" do
ipaddress node["ipaddress_sync"]
access_key_id s3_secrets["s3_access_key_id"]
secret_key_id s3_secrets["s3_secret_key_id"]
action ((manager_services["s3"] and external_services["s3"] == "onpremise") ? [:add, :register] : [:remove, :deregister])
minio_config 'Configure S3 (minio)' do
ipaddress node['ipaddress_sync']
access_key_id s3_secrets['s3_access_key_id']
secret_key_id s3_secrets['s3_secret_key_id']
action((manager_services['s3'] && (external_services['s3'] == 'onpremise')) ? [:add, :register] : [:remove, :deregister])
end

# First configure the cert for the service before configuring nginx
if manager_services["s3"]
nginx_config "Configure S3 certs" do
service_name "s3"
cdomain node["redborder"]["cdomain"]
if manager_services['s3']
nginx_config 'Configure S3 certs' do
service_name 's3'
cdomain node['redborder']['cdomain']
action :configure_certs
end
end

# Configure Nginx s3 onpremise nodes for now..
minio_config "Configure Nginx S3 (minio)" do
s3_hosts node["redborder"]["s3"]["s3_hosts"]
action ((manager_services["s3"] and external_services["s3"] == "onpremise") ? [:add_s3_conf_nginx] : :nothing)
minio_config 'Configure Nginx S3 (minio)' do
s3_hosts node['redborder']['s3']['s3_hosts']
action((manager_services['s3'] && (external_services['s3'] == 'onpremise')) ? [:add_s3_conf_nginx] : :nothing)
end

begin
Expand Down
10 changes: 5 additions & 5 deletions resources/recipes/prepare_system.rb
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,12 @@
node.default['redborder']['zookeeper']['zk_hosts'] = "zookeeper.service.#{node['redborder']['cdomain']}:#{node['redborder']['zookeeper']['port']}"

# Set all nodes with s3 configured (nginx load balancer)
s3_hosts = node["redborder"]["managers_per_services"]["s3"].map {|z| "#{z}.node:9000"}
node.default["redborder"]["s3"]["s3_hosts"] = s3_hosts
s3_hosts = node['redborder']['managers_per_services']['s3'].map { |z| "#{z}.node:9000" }
node.default['redborder']['s3']['s3_hosts'] = s3_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)
# 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)
end

# set druid realtime partition id (its needed in cluster mode for druid brokers)
Expand Down

0 comments on commit 2686d89

Please sign in to comment.