-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from dearing/runit
Runit
- Loading branch information
Showing
56 changed files
with
657 additions
and
1,874 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
--- | ||
driver_plugin: vagrant | ||
#driver: | ||
# name: docker | ||
# dockerfile: test/Dockerfile-centos66 | ||
# provision_command: curl -L http://www.chef.io/chef/install.sh | bash | ||
|
||
driver_config: | ||
publish_all: true | ||
|
||
platforms: | ||
- name: centos-6.6 | ||
|
||
provisioner: | ||
name: chef_zero | ||
require_chef_omnibus: '12.4.0' | ||
require_chef_omnibus: '12.4.1' | ||
data_bags_path: 'test/integration/data_bags' | ||
|
||
suites: | ||
- name: default | ||
run_list: | ||
- recipe[elktest] | ||
- recipe[elktest] |
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,3 +1,8 @@ | ||
source 'https://rubygems.org' | ||
|
||
gem 'berkshelf' | ||
|
||
group :integration do | ||
gem 'test-kitchen' | ||
gem 'kitchen-docker' | ||
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,21 +1,6 @@ | ||
require 'chef' | ||
|
||
module Elasticsearch | ||
module Helpers | ||
end | ||
end | ||
|
||
module Logstash | ||
module Helpers | ||
end | ||
end | ||
|
||
module LogstashForwarder | ||
module Helpers | ||
end | ||
end | ||
|
||
module Kibana | ||
module ELK | ||
module Helpers | ||
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 |
---|---|---|
@@ -0,0 +1,82 @@ | ||
class Chef | ||
class Provider | ||
class Elasticsearch < Chef::Provider::LWRPBase | ||
include ELK::Helpers | ||
|
||
use_inline_resources if defined?(use_inline_resources) | ||
|
||
provides :elasticsearch | ||
|
||
service_name = 'elasticsearch' | ||
|
||
action :install do | ||
home_dir = "#{new_resource.path}/elasticsearch-#{new_resource.version}" | ||
|
||
user new_resource.user | ||
group new_resource.group | ||
|
||
ark service_name do | ||
checksum new_resource.checksum | ||
group new_resource.group | ||
has_binaries new_resource.has_binaries | ||
owner new_resource.user | ||
prefix_root new_resource.path | ||
url new_resource.url | ||
version new_resource.version | ||
end | ||
|
||
runit_service service_name do | ||
default_logger true | ||
owner new_resource.user | ||
group new_resource.group | ||
cookbook new_resource.source | ||
env new_resource.runit_env | ||
options new_resource.runit_options.merge( | ||
'home_dir' => home_dir, | ||
'user' => new_resource.user, | ||
'group' => new_resource.group | ||
) | ||
action [:create, :enable] | ||
end | ||
end | ||
|
||
action :remove do | ||
service service_name do | ||
action :stop | ||
end | ||
end | ||
|
||
## SERVICES | ||
|
||
action :enable do | ||
service service_name do | ||
action :enable | ||
end | ||
end | ||
|
||
action :disable do | ||
service service_name do | ||
action :disable | ||
end | ||
end | ||
|
||
action :start do | ||
service service_name do | ||
action :start | ||
end | ||
end | ||
|
||
action :stop do | ||
service service_name do | ||
action :stop | ||
end | ||
end | ||
|
||
action :restart do | ||
service service_name do | ||
action :restart | ||
end | ||
end | ||
end | ||
end | ||
end |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.