-
-
Notifications
You must be signed in to change notification settings - Fork 244
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the service HWRP and remove the _service recipe.
This building block takes away the need to have a _service recipe.
- Loading branch information
1 parent
41eee88
commit ad41f68
Showing
9 changed files
with
105 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
class Chef::Provider::ConsulServiceSystemd < Chef::Provider::ConsulService | ||
action :start do | ||
runit_service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
action :start | ||
end | ||
end | ||
|
||
action :stop do | ||
runit_service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
action :stop | ||
end | ||
end | ||
|
||
action :restart do | ||
runit_service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
action :restart | ||
end | ||
end | ||
|
||
action :reload do | ||
runit_service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
action :reload | ||
reload_command %Q(#{node['runit']['sv_bin']} hup #{service_name}) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,33 @@ | ||
class Chef::Provider::ConsulServiceSystemd < Chef::Provider::ConsulService | ||
action :create do | ||
action :start do | ||
service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
provider Chef::Provider::Service::Init::Systemd | ||
action [:start, :enable] | ||
end | ||
end | ||
|
||
action :stop do | ||
service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
provider Chef::Provider::Service::Init::Systemd | ||
action :stop | ||
end | ||
end | ||
|
||
action :restart do | ||
service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
provider Chef::Provider::Service::Init::Systemd | ||
action :restart | ||
end | ||
end | ||
|
||
action :reload do | ||
service 'consul' do | ||
supports status: true, restart: true, reload: true | ||
provider Chef::Provider::Service::Init::Systemd | ||
action :reload | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
class Chef::Provider::ConsulServiceSysvinit < Chef::Provider::ConsulService | ||
action :create do | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,2 @@ | ||
class Chef::Provider::ConsulServiceUpstart < Chef::Provider::ConsulService | ||
action :create do | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This should be new_resource.run_user instead of being driven from node attributes