diff --git a/cookbooks/mezuro/recipes/kalibro_configurations.rb b/cookbooks/mezuro/recipes/kalibro_configurations.rb index 8574031..0a80718 100644 --- a/cookbooks/mezuro/recipes/kalibro_configurations.rb +++ b/cookbooks/mezuro/recipes/kalibro_configurations.rb @@ -1,3 +1,5 @@ +include_recipe 'mezuro::service' + # TODO: remove before define main repo execute 'download:mezuro' do command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo' @@ -7,10 +9,6 @@ end package 'kalibro-configurations' -service 'kalibro-configurations.target' do - action [:enable, :start] -end - template '/etc/mezuro/kalibro-configurations/database.yml' do source 'kalibro_configurations/database.yml.erb' owner 'kalibro_configurations' diff --git a/cookbooks/mezuro/recipes/kalibro_processor.rb b/cookbooks/mezuro/recipes/kalibro_processor.rb index 1a405ed..6848bd9 100644 --- a/cookbooks/mezuro/recipes/kalibro_processor.rb +++ b/cookbooks/mezuro/recipes/kalibro_processor.rb @@ -1,3 +1,5 @@ +include_recipe 'mezuro::service' + execute 'download:mezuro' do command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo' cwd '/etc/yum.repos.d' @@ -6,10 +8,6 @@ end package 'kalibro-processor' -service 'kalibro-processor.target' do - action [:enable, :start] -end - template '/etc/mezuro/kalibro-processor/database.yml' do source 'kalibro_processor/database.yml.erb' owner 'kalibro_processor' diff --git a/cookbooks/mezuro/recipes/prezento.rb b/cookbooks/mezuro/recipes/prezento.rb index 74d997a..2faaa22 100644 --- a/cookbooks/mezuro/recipes/prezento.rb +++ b/cookbooks/mezuro/recipes/prezento.rb @@ -1,4 +1,6 @@ -# change this to COPR repo +include_recipe 'mezuro::service' + +# change this to COPR repo when gets ready execute 'download:mezuro' do command 'wget https://bintray.com/mezurometrics/rpm/rpm -O bintray-mezurometrics-rpm.repo' cwd '/etc/yum.repos.d' @@ -7,14 +9,6 @@ end package 'prezento-spb' -service 'prezento.target' do - action [:enable, :start] -end - -service 'nginx' do - action [:enable, :start] -end - template '/etc/mezuro/prezento/database.yml' do source 'prezento/database.yml.erb' owner 'prezento' diff --git a/cookbooks/mezuro/recipes/service.rb b/cookbooks/mezuro/recipes/service.rb new file mode 100644 index 0000000..e63ef96 --- /dev/null +++ b/cookbooks/mezuro/recipes/service.rb @@ -0,0 +1,6 @@ +# This recipes contains all services to run in the machine + +service 'kalibro-configurations.target' +service 'kalibro-processor.target' +service 'prezento.target' +service 'nginx' -- libgit2 0.21.2