File tree Expand file tree Collapse file tree
roles/container_start/handlers Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -112,7 +112,6 @@ gamma-app-services
112112
113113[gamma:children]
114114api
115- api
116115bastion
117116charon
118117consul
@@ -140,7 +139,6 @@ socket-server
140139socket-server-proxy
141140swarm-manager
142141web
143- web
144142worker
145143
146144[local]
Original file line number Diff line number Diff line change @@ -74,6 +74,11 @@ registry_s3_region=us-east-1
7474aws_access_key_id=AKIAJ3RCYU6FCULAJP2Q
7575aws_secret_access_key=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
7676
77+ [swarm-manager:vars]
78+ aws_access_key=AKIAIB5W3E6HR6Q52HEQ
79+ aws_secret_key=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
80+ environment_name=gamma
81+
7782[vault:vars]
7883vault_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
7984vault_aws_access_key_id=AKIAJ7R4UIM45KH2WGWQ
Original file line number Diff line number Diff line change 1+ ---
2+ name : swarm-cloudwatch-reporter
3+
4+ repo : git@github.com:CodeNow/furry-cactus.git
5+ container_image : registry.runnable.com/runnable/{{ name }}
6+ container_tag : " {{ git_branch }}"
7+ node_version : lts
8+ npm_version : 3
9+ do_not_push : true
10+
11+ log_driver : json-file
12+
13+ dockerfile_pre_install_commands :
14+ - npm config set progress false
15+
16+ container_run_opts : >-
17+ --log-driver={{ log_driver }}
18+ -e AWS_ACCESS_KEY={{ aws_access_key }}
19+ -e AWS_SECRET_KEY={{ aws_secret_key }}
20+ -e DOCKER_CERT_PATH=/opt/ssl/docker/swarm-manager
21+ -e ENVIRONMENT={{ environment_name }}
22+ -e SWARM_HOSTNAME={{ ansible_default_ipv4.address }}
23+ -e SWARM_PORT={{ swarm_master_port }}
24+ -v /opt/runnable/get-info.js:/get-info.js:ro
25+ -v /opt/ssl/docker/swarm-manager:/opt/ssl/docker/swarm-manager:ro
26+ -v /var/log:/var/log
27+
28+ container_run_args : npm start >> /var/log/{{ name }}.log 2>&1
Original file line number Diff line number Diff line change 2222
2323- name : stop old containers
2424 tags : deploy
25- command : sudo docker stop --time={{ stop_time }} {{ item }}
25+ become : yes
26+ command : docker stop --time={{ stop_time }} {{ item }}
2627 with_items : " {{ old_containers_ids.stdout_lines }}"
Original file line number Diff line number Diff line change 1+ ---
2+ - hosts : swarm-manager
3+ vars_files :
4+ - group_vars/alpha-swarm-manager-metrics.yml
5+ roles :
6+ - role : builder
7+ tags : [ build ]
8+ tasks :
9+ - name : run container
10+ tags : test_swarm_stats
11+ when : test_swarm_stats is defined
12+ become : yes
13+ shell : >-
14+ docker run
15+ -e DRY_RUN=true
16+ {{ container_run_opts }}
17+ {{ container_image }}:{{ container_tag }}
18+ {{ container_run_args }}
19+
20+ - name : put script into cron
21+ tags : [ deploy ]
22+ become : yes
23+ cron :
24+ name : swarm-cloudwatch-reporter
25+ cron_file : 10-swarm-cloudwatch
26+ user : root
27+ state : present
28+ job : >-
29+ docker run
30+ --rm
31+ {{ container_run_opts }}
32+ {{ container_image }}:{{ container_tag }}
33+ {{ container_run_args }}
You can’t perform that action at this time.
0 commit comments