Skip to content

Commit

Permalink
Merge pull request #3 from redBorder/development
Browse files Browse the repository at this point in the history
Release 0.0.2
  • Loading branch information
manegron authored Aug 29, 2024
2 parents 74d6120 + c87a441 commit 9471f4f
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cookbook-rb-ai CHANGELOG
===============

## 0.0.2

- Pablo Pérez
- [8c2bbf4] Check to use sync ip or management ip
- [a982f08] Consul port fixed

## 0.0.1

- Pablo Pérez
- [58b1a43] First version
2 changes: 1 addition & 1 deletion resources/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
maintainer_email 'git@redborder.com'
license 'AGPL-3.0'
description 'Installs/Configures cookbook-rb-ai'
version '0.0.1'
version '0.0.2'
8 changes: 5 additions & 3 deletions resources/providers/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -103,12 +103,14 @@

action :register do
begin
ipaddress = new_resource.ipaddress

unless node['redborder-ai']['registered']
query = {}
query['ID'] = "redborder-ai-#{node['hostname']}"
query['Name'] = 'redborder-ai'
query['Address'] = "#{node['ipaddress']}"
query['Port'] = 5000
query['Address'] = ipaddress
query['Port'] = 50505
json_query = Chef::JSONCompat.to_json(query)

execute 'Register service in consul' do
Expand All @@ -119,7 +121,7 @@
node.normal['redborder-ai']['registered'] = true
Chef::Log.info('redborder-ai service has been registered to consul')
end
rescue => e
rescue StandardError => e
Chef::Log.error(e.message)
end
end
Expand Down
1 change: 1 addition & 0 deletions resources/resources/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@
attribute :user, kind_of: String, default: 'redborder-ai'
attribute :cdomain, kind_of: String, default: 'redborder.cluster'
attribute :ai_selected_model, kind_of: String
attribute :ipaddress, kind_of: String, default: '127.0.0.1'

0 comments on commit 9471f4f

Please sign in to comment.