Skip to content

Commit

Permalink
Merge pull request #5 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.0.4
  • Loading branch information
malvads authored Apr 26, 2024
2 parents 8071f22 + c1f3826 commit 6e8a6e5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 10 deletions.
14 changes: 7 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
cookbook-example CHANGELOG
==========================
cookbook-minio CHANGELOG
===============

This file is used to list changes made in each version of the example cookbook.
## 0.0.4

- David Vanhoucke
- [7854ac8] add ipaddress sync

0.0.1
-----
- [your_name]
- COMMIT_REF Initial release of cookbook example
This file is used to list changes made in each version of the example cookbook.

- - -
Check the [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) for help with Markdown.
Expand Down
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@
license 'AGPLv3'
description 'Installs/Configures Minio'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '0.0.3'
version '0.0.4'
4 changes: 3 additions & 1 deletion resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,15 @@
end
end
action :register do
ipaddress = new_resource.ipaddress

begin
consul_servers = system('serf members -tag consul=ready | grep consul=ready &> /dev/null')
if consul_servers and !node["minio"]["registered"]
query = {}
query["ID"] = "s3-#{node["hostname"]}"
query["Name"] = "s3"
query["Address"] = "#{node["ipaddress"]}"
query["Address"] = ipaddress
query["Port"] = node["minio"]["port"]
json_query = Chef::JSONCompat.to_json(query)

Expand Down
4 changes: 3 additions & 1 deletion resources/resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,6 @@

attribute :user, :kind_of => String, :default => "minio"
attribute :group, :kind_of => String, :default => "minio"
attribute :port, :kind_of => Fixnum, :default => 9000
attribute :port, :kind_of => Fixnum, :default => 9000

attribute :ipaddress, :kind_of => String, :default => "127.0.0.1"

0 comments on commit 6e8a6e5

Please sign in to comment.