From 7854ac890b41cf9cc31d85ea5c1c1c66ce5da2b1 Mon Sep 17 00:00:00 2001 From: David Vanhoucke Date: Sun, 21 Apr 2024 21:07:50 +0000 Subject: [PATCH 1/2] add ipaddress sync --- resources/providers/config.rb | 4 +++- resources/resources/config.rb | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/resources/providers/config.rb b/resources/providers/config.rb index 3558ba0..9e7a4b6 100644 --- a/resources/providers/config.rb +++ b/resources/providers/config.rb @@ -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) diff --git a/resources/resources/config.rb b/resources/resources/config.rb index 8d33662..30b5972 100644 --- a/resources/resources/config.rb +++ b/resources/resources/config.rb @@ -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 \ No newline at end of file +attribute :port, :kind_of => Fixnum, :default => 9000 + +attribute :ipaddress, :kind_of => String, :default => "127.0.0.1" \ No newline at end of file From c1f3826fc6c7662038911e38c0a98e2e32bd1e74 Mon Sep 17 00:00:00 2001 From: Miguel Alvarez Date: Fri, 26 Apr 2024 11:18:55 +0100 Subject: [PATCH 2/2] bump to 0.0.4 --- CHANGELOG.md | 14 +++++++------- resources/metadata.rb | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bd67323..27879ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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. diff --git a/resources/metadata.rb b/resources/metadata.rb index 1f6f754..0f4b396 100644 --- a/resources/metadata.rb +++ b/resources/metadata.rb @@ -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'