File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55- hosts : charon
66- hosts : rabbitmq
77- hosts : redis
8+ - hosts : swarm-manager
89
910- hosts : api
1011 vars_files :
Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ pg_database: astral
4545# charon
4646charon_port : 53
4747
48+ # consul
49+ consul_host_address : " {{ hostvars[groups['consul'][0]]['ansible_default_ipv4']['address'] }}"
50+ consul_api_port : 8500
51+
4852# datadog
4953datadog_api_key : 6488896fe0c811965ef233b96809d70d
5054datadog_host_address : " {{ ansible_default_ipv4.address }}"
@@ -103,6 +107,7 @@ shiva_port: 3000
103107
104108# swarm
105109swarm_master_port : 2375
110+ swarm_host_address : " {{ hostvars[groups['swarm-manager'][0]]['ansible_default_ipv4']['address'] }}"
106111
107112# navi/link
108113navi_mongo_database : navi
Original file line number Diff line number Diff line change @@ -50,6 +50,7 @@ container_envs: >
5050 -e S3_CONTEXT_RESOURCE_BUCKET={{ api_s3_context_bucket }}
5151 -e USER_CONTENT_DOMAIN={{ user_content_domain }}
5252 -e DOCKER_IMAGE_BUILDER_WEAVE_PATH={{ weave_path }}
53+ -e SWARM_HOST=http://{{ swarm_host_address }}:{{ swarm_master_port }}
5354
5455container_run_opts : >
5556 -h {{ name }}
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ container_run_opts: >
2121 -p {{ ansible_default_ipv4.address }}:8302:8302
2222 -p {{ ansible_default_ipv4.address }}:8302:8302/udp
2323 -p {{ ansible_default_ipv4.address }}:8400:8400
24- -p {{ ansible_default_ipv4.address }}:8500 :8500
24+ -p {{ ansible_default_ipv4.address }}:{{ consul_api_port }} :8500
2525 --restart=always
2626
2727container_run_args : >
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: "swarm-deamon"
22
33# container_kill_start settings
44container_image : swarm
5- container_tag : 0.4 .0
5+ container_tag : 1.0 .0
66
77# container_kill_start vars
88log_driver : json-file
@@ -13,4 +13,4 @@ container_run_opts: >
1313container_run_args : >
1414 join
1515 --addr={{ ansible_default_ipv4.address }}:{{ docker_port }}
16- token ://{{ swarm_token }}
16+ consul ://{{ consul_host_address }}:{{ consul_api_port }}/swarm
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: "swarm-manager"
22
33# container_kill_start settings
44container_image : swarm
5- container_tag : 0.4 .0
5+ container_tag : 1.0 .0
66
77# container_kill_start vars
88log_driver : json-file
@@ -18,4 +18,4 @@ container_run_args: >
1818 --tlscacert={{ docker_ca_path }}
1919 --tlscert={{ docker_cert_path }}
2020 --tlskey={{ docker_key_path }}
21- token ://{{ swarm_token }}
21+ consul ://{{ consul_host_address }}:{{ consul_api_port }}/swarm
Original file line number Diff line number Diff line change @@ -46,6 +46,7 @@ container_envs: >
4646 -e S3_CONTEXT_RESOURCE_BUCKET={{ api_s3_context_bucket }}
4747 -e USER_CONTENT_DOMAIN={{ user_content_domain }}
4848 -e DOCKER_IMAGE_BUILDER_WEAVE_PATH={{ weave_path }}
49+ -e SWARM_HOST=http://{{ swarm_host_address }}:{{ swarm_master_port }}
4950
5051container_run_opts : >
5152 -h {{ name }}
Original file line number Diff line number Diff line change 11---
22- name : change core dump path
33 sudo : yes
4+ when : docker_config == "runnable"
45 tags : coreDump
56 sysctl :
67 name=kernel.core_pattern
3940
4041- name : copy docker config file
4142 sudo : yes
43+ when : docker_config == "runnable"
4244 template :
4345 src={{ docker_config }}
4446 dest=/etc/default/docker
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11---
2+ - hosts : consul
3+
24- hosts : docks
35 vars_files :
46 - " group_vars/alpha-swarm-deamon.yml"
You can’t perform that action at this time.
0 commit comments