File tree Expand file tree Collapse file tree
container_kill_start/tasks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,3 +2,6 @@ node_modules
22ca-key.pem
33pass
44hellorunnable
5+ dump.rdb
6+ erl_crash.dump
7+ npm-debug.log
Original file line number Diff line number Diff line change 2020[api]
2121beta-api
2222
23+ [consul]
24+ beta-services
25+ beta-api
26+ beta-web
27+
28+ [vault]
29+ beta-services
30+
2331[worker]
2432beta-api
2533
2634[eru]
2735beta-services
2836
2937[navi]
30- beta-services
38+ beta-navi
3139
3240[charon]
3341beta-services
Original file line number Diff line number Diff line change 1+ ---
2+ - hosts : " {{ target }}"
3+ tasks :
4+ - name : make sure `jq` is present
5+ apt :
6+ name=jq
7+ state=present
8+
9+ - name : get versions in ansible
10+ script : getVersions {{ ansible_default_ipv4.address }}
11+ register : versions_result
12+
13+ - name : print versions to stdout
14+ debug :
15+ msg="Versions in Consul\n{{ versions_result.stdout }}"
Original file line number Diff line number Diff line change 1+ ---
2+ - hosts : consul
3+ serial : 1
4+ vars_files :
5+ - group_vars/alpha-consul.yml
6+ roles :
7+ - { role: notify, tags: notify }
8+ - { role: database }
9+ - { role: container_kill_start, tags: deploy }
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ var params = {
1414 // Only search for docks in the cluster security group
1515 {
1616 Name : 'instance.group-id' ,
17- Values : [ 'sg-87ca04e3 ' ]
17+ Values : [ 'sg-577a0d33 ' ]
1818 } ,
1919 // Only fetch instances that are tagged as docks
2020 {
Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ domain=runnable-gamma.com
5353new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead
5454node_env=production-gamma
5555pg_host=gamma-infrastructure-db.cnksgdqarobf.us-west-2.rds.amazonaws.com
56- pg_pass=QBjSpAXVYwmGHu4Y
56+ pg_pass=e9G7zYRCxYmxG9HQ8J9x2BDB
5757rabbit_password=wKK7g7NWKpQXEeSzyWB7mIpxZIL8H2mDSf3Q6czR3Vk
5858rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
5959registry_host=10.4.4.82
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ consul=localhost:8500/v1
4+
5+ if [[ $1 != " " ]]; then
6+ consul=$1 :8500/v1
7+ fi
8+
9+ kv=$consul /kv
10+
11+ echo NODE_ENV: $( curl -s $kv /node/env | jq -r ' .[0].Value' | base64 -d)
12+
13+ echo image-builder: $( curl -s $kv /image-builder/version | jq -r ' .[0].Value' | base64 -d)
14+ echo docker-listener: $( curl -s $kv /docker-listener/version | jq -r ' .[0].Value' | base64 -d)
15+ echo filibuster: $( curl -s $kv /filibuster/version | jq -r ' .[0].Value' | base64 -d)
16+ echo krain: $( curl -s $kv /krain/version | jq -r ' .[0].Value' | base64 -d)
17+ echo sauron: $( curl -s $kv /sauron/version | jq -r ' .[0].Value' | base64 -d)
18+ echo charon: $( curl -s $kv /charon/version | jq -r ' .[0].Value' | base64 -d)
Original file line number Diff line number Diff line change 1+ name : consul
2+
3+ # for database role
4+ db_path : /etc/consul.d
5+
6+ # for container_kill_start
7+ pause_length_minutes : 3
8+
9+ container_image : progrium/consul
10+ container_tag : latest
11+
12+ container_run_opts : >
13+ -d
14+ -h {{ inventory_hostname }}
15+ -v /consul:/data
16+ -v /etc/consul.d:/etc/consul.d:ro
17+ -p {{ ansible_default_ipv4.address }}:8300:8300
18+ -p {{ ansible_default_ipv4.address }}:8301:8301
19+ -p {{ ansible_default_ipv4.address }}:8301:8301/udp
20+ -p {{ ansible_default_ipv4.address }}:8302:8302
21+ -p {{ ansible_default_ipv4.address }}:8302:8302/udp
22+ -p {{ ansible_default_ipv4.address }}:8400:8400
23+ -p {{ ansible_default_ipv4.address }}:8500:8500
24+ --restart=always
25+
26+ container_run_args : >
27+ -server
28+ -node {{ inventory_hostname }}
29+ -advertise {{ ansible_default_ipv4.address }}
30+ -config-dir /etc/consul.d
31+ {% if hostvars[groups['consul'][0]]['ansible_default_ipv4']['address'] == ansible_default_ipv4.address %}-bootstrap-expect {{ groups['consul'] | length }}{% endif %}
32+ -data-dir /data
33+ {% if hostvars[groups['consul'][0]]['ansible_default_ipv4']['address'] == ansible_default_ipv4.address %}-ui-dir /ui{% endif %}
34+ {% if hostvars[groups['consul'][0]]['ansible_default_ipv4']['address'] != ansible_default_ipv4.address %}-retry-join {{ hostvars[groups['consul'][0]]['ansible_default_ipv4']['address'] }}{% endif %}
Original file line number Diff line number Diff line change @@ -21,5 +21,6 @@ container_envs: >
2121 -e NODE_ENV={{ node_env }}
2222 -e REDIS_IPADDRESS={{redis_host}}
2323 -e LOG_LEVEL_STDOUT=trace
24+ -e CLUSTER_WORKERS=20
2425
2526container_run_opts : " -d -p {{hosted_ports[0]}}:{{hosted_ports[0]}} {{container_envs}}"
Original file line number Diff line number Diff line change 1+ name : vault
2+
3+ # for database role
4+ db_path : /opt/runnable/vault
5+
6+ container_image : runnable/vault
7+ container_tag : v0.3.1
8+
9+ container_run_opts : >
10+ -d
11+ -h {{ inventory_hostname }}
12+ -v /opt/runnable/vault/vault.hcl:/vault.hcl:ro
13+ -p {{ ansible_default_ipv4.address }}:8200:8200
14+ --cap-add IPC_LOCK
15+ --restart=always
16+
17+ container_run_args : >
18+ server
19+ -log-level=warn
20+ -config=/vault.hcl
You can’t perform that action at this time.
0 commit comments