Commit 1cb56acc3aa0d82607452ff2cb265e056bbad6d3
1 parent
e48e1b7b
Exists in
mezuro_cookbook
Enable NGINX to listen on ports 82-84 for Mezuro
Otherwise starting NGINX with Mezuro services configurations would lead to errors and interruption of the converge process.
Showing
3 changed files
with
18 additions
and
0 deletions
Show diff stats
cookbooks/mezuro/recipes/kalibro_configurations.rb
... | ... | @@ -32,6 +32,12 @@ execute 'kalibro-configurations:migrate' do |
32 | 32 | notifies :restart, 'service[kalibro-configurations.target]' |
33 | 33 | end |
34 | 34 | |
35 | +execute 'kalibro-configurations:open_port' do | |
36 | + command 'semanage port -a -t http_port_t -p tcp 83' | |
37 | + user 'root' | |
38 | + only_if '! semanage port -l | grep "^\(http_port_t\)\(.\)\+\(\s83,\)"' | |
39 | +end | |
40 | + | |
35 | 41 | template '/etc/nginx/conf.d/kalibro-configurations.conf' do |
36 | 42 | source 'kalibro_configurations/nginx.conf.erb' |
37 | 43 | owner 'root' | ... | ... |
cookbooks/mezuro/recipes/kalibro_processor.rb
... | ... | @@ -31,6 +31,12 @@ execute 'kalibro-processor:migrate' do |
31 | 31 | notifies :restart, 'service[kalibro-processor.target]' |
32 | 32 | end |
33 | 33 | |
34 | +execute 'kalibro-processor:open_port' do | |
35 | + command 'semanage port -a -t http_port_t -p tcp 82' | |
36 | + user 'root' | |
37 | + only_if '! semanage port -l | grep "^\(http_port_t\)\(.\)\+\(\s82,\)"' | |
38 | +end | |
39 | + | |
34 | 40 | template '/etc/nginx/conf.d/kalibro-processor.conf' do |
35 | 41 | source 'kalibro_processor/nginx.conf.erb' |
36 | 42 | owner 'root' | ... | ... |
cookbooks/mezuro/recipes/prezento.rb
... | ... | @@ -40,6 +40,12 @@ template PREZENTO_DIR + '/config/kalibro.yml' do |
40 | 40 | notifies :restart, 'service[prezento.target]' |
41 | 41 | end |
42 | 42 | |
43 | +execute 'prezento:open_port' do | |
44 | + command 'semanage port -a -t http_port_t -p tcp 84' | |
45 | + user 'root' | |
46 | + only_if '! semanage port -l | grep "^\(http_port_t\)\(.\)\+\(\s84,\)"' | |
47 | +end | |
48 | + | |
43 | 49 | template '/etc/nginx/conf.d/prezento.conf' do |
44 | 50 | source 'prezento/nginx.conf.erb' |
45 | 51 | owner 'root' | ... | ... |