Skip to content

Commit ee047bb

Browse files
committed
Merge pull request #170 from CodeNow/swarm
Swarm Manager Deploy
2 parents aeb9bbd + 55815d8 commit ee047bb

22 files changed

Lines changed: 245 additions & 30 deletions

File tree

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
node_modules
1+
node_modules
2+
ca-key.pem
3+
pass
4+
hellorunnable

ansible/beta-hosts/hosts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,9 @@ beta-services
6565
[registry]
6666
beta-registry
6767

68+
[swarm-manager]
69+
beta-services
70+
6871
[docks]
6972

7073
[beta:children]
@@ -86,6 +89,7 @@ optimus
8689
rabbitmq
8790
eru
8891
shiva
92+
swarm-manager
8993

9094
[targets]
9195
localhost ansible_connection=local bastion_name=beta-bastion

ansible/beta-hosts/variables

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,17 @@ api_aws_secret_access_key=A6XOpeEElvvIulfAzVLohqKtpKij5ZE8h0FFx0Jn
44
api_github_client_id=baa5c868b6d17d7ae002
55
api_github_client_secret=ad4f8527ae98d7eea15a32ee5abbead5c9a25abc
66
api_github_deploy_keys_bucket=runnable.deploykeys.production-beta
7-
api_github_hook_secret=3V3RYTHINGisAW3S0ME!
87
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
9-
api_loggly_token=f673760d-e0b3-4a93-a15e-2862ea074f91
108
api_mixpanel_app_id=c41affa4b08818443365c526cbb51606
119
api_mongo_auth=api:oW4c7x9Wiv28oiNBy2Bc
1210
api_mongo_database=beta
1311
api_mongo_replset_name=beta
1412
api_neo4j_auth=neo4j:oqGlRV1KTpaqbHDkdlJz
15-
api_neo4j_port=7474
16-
api_neo4j_protocol=http://
1713
api_new_relic_app_name=beta-api-production
1814
api_rollbar_key=a90d9c262c7c48cfabbd32fd0a1bc61c
1915
api_s3_context_bucket=runnable.context.resources.production-beta
2016

2117
[eru:vars]
22-
eru_api_host=api.{{ domain }}
2318
eru_github_id=8abb08f83f6d1c52bd1a
2419
eru_github_secret=74a23ee56486d57b14f292283cb04625f600917c
2520

@@ -50,17 +45,14 @@ shiva_rollbar_key=0526a90faec845d796e1ef5361a00526
5045
[beta:vars]
5146
ansible_ssh_private_key_file=~/.ssh/oregon.pem
5247
datadog_host=10.20.1.59
53-
datadog_port=8125
5448
datadog_tags=env:beta
5549
domain=runnable-beta.com
5650
new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead
5751
node_env=production-beta
58-
pg_database=astral
5952
pg_host=beta-infrastructure-db.cnksgdqarobf.us-west-2.rds.amazonaws.com
6053
pg_pass=QBjSpAXVYwmGHu4Y
61-
pg_user=shiva
6254
rabbit_password=wKK7g7NWKpQXEeSzyWB7mIpxZIL8H2mDSf3Q6czR3Vk
63-
rabbit_port=54321
6455
rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
6556
registry_host=10.20.1.55
57+
swarm_token=d363b783f03a845a2c82b081bfe8443e
6658
user_content_domain=runnablecloud.com

ansible/group_vars/all.yml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,38 @@ slack_channels: [ '#ops' ]
2525

2626
loggly_token: f673760d-e0b3-4a93-a15e-2862ea074f91
2727
loggly_password: TebejAcutHeH_Ch0tR9ru4anaT6CRu*3
28-
loggly_account_name: sandboxes
2928
loggly_username: ops
3029

31-
# datadog key
30+
##
31+
## shared application configs
32+
##
33+
34+
# api
35+
api_github_hook_secret: 3V3RYTHINGisAW3S0ME!
36+
api_neo4j_port: 7474
37+
api_neo4j_protocol: http://
38+
39+
# datadog
40+
datadog_port: 8125
3241
datadog_api_key: 6488896fe0c811965ef233b96809d70d
42+
43+
# docker
44+
docker_port: 4242
45+
docker_cert_path: /etc/ssl/docker/cert.pem
46+
docker_key_path: /etc/ssl/docker/key.pem
47+
docker_ca_path: /etc/ssl/docker/ca.pem
48+
49+
# eru
50+
eru_api_host: api.{{ domain }}
51+
52+
# rabbit
53+
rabbit_port: 54321
54+
55+
# astral
56+
pg_database: astral
57+
58+
# shiva
59+
pg_user: shiva
60+
61+
# swarm
62+
swarm_master_port: 2375

ansible/group_vars/alpha-api.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,5 @@ container_envs: >
6060
container_run_opts: >
6161
-d
6262
-P
63-
-v /opt/ssl/docker:/etc/ssl/docker:ro
63+
-v /opt/ssl/docker/{{ name }}:/etc/ssl/docker:ro
6464
{{ container_envs }}

ansible/group_vars/alpha-docker-listener.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ redis_host: "{{ hostvars[groups['redis'][0]]['ansible_default_ipv4']['address']
88
redis_port: 6379
99

1010
enviroment_vars:
11-
DOCKER_CERT_PATH: "/opt/ssl/docker"
11+
DOCKER_CERT_PATH: "/opt/ssl/docker/{{ name }}"
1212
HOST_TAGS: "{{ host_tags | default('default') }}"
1313
LOGGLY_TOKEN: "{{ loggly_token }}"
1414
RABBITMQ_HOSTNAME: "{% if rabbit_host is defined %}{{ rabbit_host }}{% else %}{{ hostvars[groups['rabbitmq'][0]]['ansible_default_ipv4']['address'] }}{% endif %}"

ansible/group_vars/alpha-khronos.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ container_envs: >
1818
1919
container_run_opts: >
2020
-d
21-
-v /opt/ssl/docker:/etc/ssl/docker:ro
21+
-v /opt/ssl/docker/{{ name }}:/etc/ssl/docker:ro
2222
{{container_envs}}

ansible/group_vars/alpha-palantiri.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,5 @@ container_envs: >
2626
container_run_opts: >
2727
-d
2828
--restart=always
29-
-v /opt/ssl/docker:/etc/ssl/docker:ro
29+
-v /opt/ssl/docker/{{ name }}:/etc/ssl/docker:ro
3030
{{ container_envs }}
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: "swarm-manager"
2+
3+
# container_kill_start settings
4+
container_image: swarm
5+
container_tag: 0.4.0
6+
7+
# container_kill_start vars
8+
log_driver: json-file
9+
10+
container_run_opts: >
11+
-d
12+
-p {{ swarm_master_port }}:2375
13+
-v /opt/ssl/docker/{{ name }}:/etc/ssl/docker:ro
14+
--restart=always
15+
16+
container_run_args: >
17+
manage
18+
--tlsverify
19+
--tlscacert={{ docker_ca_path }}
20+
--tlscert={{ docker_cert_path }}
21+
--tlskey={{ docker_key_path }}
22+
token://{{ swarm_token }}

ansible/group_vars/alpha-workers.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,6 @@ container_envs: >
5656
5757
container_run_opts: >
5858
-d
59-
-v /opt/ssl/docker:/etc/ssl/docker:ro
59+
-v /opt/ssl/docker/{{ name }}:/etc/ssl/docker:ro
6060
--restart=always
6161
{{ container_envs }}

0 commit comments

Comments
 (0)