Commit 769af1d38e64e3b26e61076550ecc542e9fab553

Authored by Paulo Tada
1 parent 5e7a4025
Exists in mezuro_cookbook

Adding the kalibro configurations for prezento

Signed-off-by: Diego Araújo <diegoamc90@gmail.com>
cookbooks/mezuro/recipes/prezento.rb
@@ -5,6 +5,12 @@ execute &#39;download:mezuro&#39; do @@ -5,6 +5,12 @@ execute &#39;download:mezuro&#39; do
5 user 'root' 5 user 'root'
6 end 6 end
7 7
  8 +package 'prezento'
  9 +
  10 +service 'prezento.target' do
  11 + action [:enable, :start]
  12 +end
  13 +
8 template '/etc/mezuro/prezento/database.yml' do 14 template '/etc/mezuro/prezento/database.yml' do
9 source 'prezento/database.yml.erb' 15 source 'prezento/database.yml.erb'
10 owner 'prezento' 16 owner 'prezento'
@@ -13,12 +19,6 @@ template &#39;/etc/mezuro/prezento/database.yml&#39; do @@ -13,12 +19,6 @@ template &#39;/etc/mezuro/prezento/database.yml&#39; do
13 notifies :restart, 'service[prezento.target]' 19 notifies :restart, 'service[prezento.target]'
14 end 20 end
15 21
16 -package 'prezento'  
17 -  
18 -service 'prezento.target' do  
19 - action [:enable, :start]  
20 -end  
21 -  
22 PREZENTO_DIR='/usr/share/mezuro/prezento' 22 PREZENTO_DIR='/usr/share/mezuro/prezento'
23 23
24 execute 'prezento:schema' do 24 execute 'prezento:schema' do
@@ -34,11 +34,23 @@ execute &#39;prezento:migrate&#39; do @@ -34,11 +34,23 @@ execute &#39;prezento:migrate&#39; do
34 notifies :restart, 'service[prezento.target]' 34 notifies :restart, 'service[prezento.target]'
35 end 35 end
36 36
  37 +template PREZENTO_DIR + '/config/kalibro.yml' do
  38 + source 'prezento/kalibro.yml.erb'
  39 + owner 'prezento'
  40 + group 'prezento'
  41 + mode '0644'
  42 + notifies :restart, 'service[prezento.target]'
  43 +end
  44 +
37 ############################################################################# 45 #############################################################################
38 # The next lines install the mezuro plugin for colab intergration # 46 # The next lines install the mezuro plugin for colab intergration #
39 # This shold be removed when the plugin were install thought pkg colab-deps # 47 # This shold be removed when the plugin were install thought pkg colab-deps #
40 ############################################################################# 48 #############################################################################
41 49
  50 +service 'colab' do
  51 + action [:enable, :start]
  52 +end
  53 +
42 git '/home/vagrant/colab-mezuro-plugin' do 54 git '/home/vagrant/colab-mezuro-plugin' do
43 repository 'https://github.com/colab/colab-mezuro-plugin.git' 55 repository 'https://github.com/colab/colab-mezuro-plugin.git'
44 revision 'master' 56 revision 'master'
@@ -48,4 +60,6 @@ execute &#39;pip:install:plugin&#39; do @@ -48,4 +60,6 @@ execute &#39;pip:install:plugin&#39; do
48 command '/usr/lib/colab/bin/pip install .' 60 command '/usr/lib/colab/bin/pip install .'
49 cwd '/home/vagrant/colab-mezuro-plugin' 61 cwd '/home/vagrant/colab-mezuro-plugin'
50 user 'root' 62 user 'root'
  63 + notifies :restart, 'service[colab]'
51 end 64 end
  65 +
cookbooks/mezuro/templates/prezento/kalibro.yml.erb 0 → 100644
@@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
  1 +processor_address: http://<%= node['peers']['mezuro'] %>:82/
  2 +configurations_address: http://<%= node['peers']['mezuro'] %>:83/