make exposed port the same as container service port

Signed-off-by: Jakub Sokołowski <jakub@status.im>
This commit is contained in:
Jakub Sokołowski 2019-11-01 16:05:02 +01:00
parent 0b89c2b666
commit 0e1cac9e4b
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
4 changed files with 7 additions and 9 deletions

View File

@ -9,9 +9,7 @@ beacon_node_cont_name: 'beacon-node-{{ beacon_node_network}}'
beacon_node_discovery_port: 9000
beacon_node_listening_port: 9000
beacon_node_public_tcp_port: 9000
beacon_node_public_udp_port: 9000
beacon_node_public_address: '{{ ansible_hostname }}'
beacon_node_public_address: '{{ ansible_host }}'
beacon_node_cont_vol: '/docker/{{ beacon_node_cont_name }}'

View File

@ -6,13 +6,13 @@
consul_services:
- id: '{{ beacon_node_cont_name }}'
name: 'beacon-node'
port: '{{ beacon_node_public_tcp_port }}'
port: '{{ beacon_node_listening_port }}'
address: '{{ beacon_node_public_address }}'
tags: ['{{ env }}.{{ stage }}', 'beacon', 'nimbus']
checks:
- id: beacon-node-health
type: tcp
tcp: 'localhost:{{ beacon_node_public_tcp_port }}'
tcp: 'localhost:{{ beacon_node_listening_port }}'
- id: '{{ beacon_node_cont_name }}-metrics'
name: 'beacon-node-metrics'

View File

@ -20,8 +20,8 @@
com.centurylinklabs.watchtower.enable: 'true'
ports:
- '{{ beacon_node_metrics_port }}:{{ beacon_node_metrics_port }}/tcp'
- '{{ beacon_node_public_tcp_port }}:{{ beacon_node_listening_port }}/tcp'
- '{{ beacon_node_public_udp_port }}:{{ beacon_node_discovery_port }}/udp'
- '{{ beacon_node_listening_port }}:{{ beacon_node_listening_port }}/tcp'
- '{{ beacon_node_discovery_port }}:{{ beacon_node_discovery_port }}/udp'
command: |
--log-level={{ beacon_node_log_level }}
--tcp-port={{ beacon_node_listening_port }}

View File

@ -9,8 +9,8 @@
protocol: '{{ rule.protocol }}'
destination_port: '{{ rule.port }}'
with_items:
- { protocol: 'tcp', port: '{{ beacon_node_public_tcp_port }}' }
- { protocol: 'udp', port: '{{ beacon_node_public_udp_port }}' }
- { protocol: 'tcp', port: '{{ beacon_node_listening_port }}' }
- { protocol: 'udp', port: '{{ beacon_node_discovery_port }}' }
loop_control:
loop_var: rule
notify: