Re-Architecting Network Setup on all containers

This commit is contained in:
Mike Reeves
2018-06-20 13:22:57 -04:00
parent 55736efe7f
commit 93916ba358
7 changed files with 24 additions and 22 deletions

View File

@@ -66,9 +66,9 @@ docker:
# - driver: bridge
# dockernet work around
dockernet:
cmd.script:
- source: salt://common/scripts/dockernet.sh
#dockernet:
# cmd.script:
# - source: salt://common/scripts/dockernet.sh
# Snag the so-core docker
@@ -118,7 +118,6 @@ so-core:
- /opt/so/log/nginx/:/var/log/nginx:rw
- /opt/so/tmp/nginx/:/var/lib/nginx:rw
- /opt/so/tmp/nginx/:/run:rw
- network_mode: so-elastic-net
- cap_add: NET_BIND_SERVICE
- port_bindings:
- 80:80

View File

@@ -98,7 +98,7 @@ so-elasticsearch:
- /opt/so/conf/elasticsearch/log4j2.properties:/usr/share/elasticsearch/config/log4j2.properties:ro
- /nsm/elasticsearch:/usr/share/elasticsearch/data:rw
- /opt/so/log/elasticsearch:/var/log/elasticsearch:rw
- network_mode: so-elastic-net
# See if Freqserver is enabled
{% if freq == 1 %}
@@ -132,7 +132,7 @@ so-freq:
- user: freqserver
- binds:
- /opt/so/log/freq_server:/var/log/freq_server:rw
- network_mode: so-elastic-net
{% endif %}
@@ -168,7 +168,7 @@ so-domainstats:
- user: domainstats
- binds:
- /opt/so/log/domainstats:/var/log/domain_stats
- network_mode: so-elastic-net
{% endif %}
@@ -237,7 +237,7 @@ so-curator:
- /opt/so/conf/curator/curator.yml:/etc/curator/config/curator.yml:ro
- /opt/so/conf/curator/action/:/etc/curator/action:ro
- /opt/so/log/curator:/var/log/curator
- network_mode: so-elastic-net
# Begin Curator Cron Jobs

View File

@@ -53,4 +53,4 @@ so-filebeat:
- /opt/so/conf/filebeat/etc/pki/filebeat.crt:/usr/share/filebeat/filebeat.crt:ro
- /opt/so/conf/filebeat/etc/pki/filebeat.key:/usr/share/filebeat/filebeat.key:ro
- /etc/ssl/certs/intca.crt:/usr/share/filebeat/intraca.crt:ro
- network_mode: so-elastic-net

View File

@@ -62,16 +62,6 @@ del_return_rule:
# Make it so all the minions can talk to salt and update etc.
{% for ip in pillar.get('minions') %}
enable_salt_minions_3142_{{ip}}:
iptables.append:
- table: filter
- chain: INPUT
- jump: ACCEPT
- proto: tcp
- source: {{ ip }}
- dport: 3142
- save: True
enable_salt_minions_4505_{{ip}}:
iptables.append:
- table: filter
@@ -114,8 +104,22 @@ enable_salt_minions_3142_{{ip}}:
- position: 1
- save: True
enable_salt_minions_5044_{{ip}}:
iptables.insert:
- table: filter
- chain: DOCKER-USER
- jump: ACCEPT
- proto: tcp
- source: {{ ip }}
- dport: 5044
- position: 1
- save: True
{% endfor %}
# Rules for storage nodes connecting to master
{% endif %}
# Rules if you are a Storage Node

View File

@@ -54,6 +54,5 @@ so-kibana:
- /opt/so/log/kibana:/var/log/kibana:rw
- /opt/so/conf/kibana/custdashboards/:/usr/share/kibana/custdashboards/:ro
- /sys/fs/cgroup:/sys/fs/cgroup:ro
- network_mode: so-elastic-net
- port_bindings:
- 127.0.0.1:5601:5601

View File

@@ -136,4 +136,4 @@ so-logstash:
- /etc/pki/filebeat.crt:/usr/share/logstash/filebeat.crt:ro
- /etc/pki/filebeat.key:/usr/share/logstash/filebeat.key:ro
- /etc/pki/ca.crt:/usr/share/filebeat/ca.crt:ro
- network_mode: so-elastic-net

View File

@@ -59,4 +59,4 @@ so-redis:
- /opt/so/conf/redis/etc/redis.conf:/usr/local/etc/redis/redis.conf:ro
- /opt/so/conf/redis/working:/redis:rw
- entrypoint: "redis-server /usr/local/etc/redis/redis.conf"
- network_mode: so-elastic-net