Skip to content

Commit 06b49dd

Browse files
author
Christopher M. Neill
committed
New hosts for Gamma
1 parent a59f1a6 commit 06b49dd

5 files changed

Lines changed: 473 additions & 72 deletions

File tree

ansible/gamma-hosts/docks.js

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
#!/usr/bin/env node
2+
3+
'use strict';
4+
5+
var aws = require('aws-sdk');
6+
var ec2 = new aws.EC2({
7+
accessKeyId: 'AKIAJ3RCYU6FCULAJP2Q',
8+
secretAccessKey: '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',
9+
region: 'us-west-2'
10+
});
11+
12+
var params = {
13+
Filters: [
14+
// Only search for docks in the cluster security group
15+
{
16+
Name: 'instance.group-id',
17+
Values: ['sg-87ca04e3']
18+
},
19+
// Only fetch instances that are tagged as docks
20+
{
21+
Name: 'tag:role',
22+
Values: ['dock']
23+
},
24+
// Only fetch running instances
25+
{
26+
Name: 'instance-state-name',
27+
Values: ['running']
28+
}
29+
]
30+
};
31+
32+
ec2.describeInstances(params, function (err, data) {
33+
if (err) {
34+
console.error("An error occurred: ", err);
35+
process.exit(1);
36+
}
37+
38+
// Get a set of instances from the describe response
39+
var instances = [];
40+
data.Reservations.forEach(function (res) {
41+
res.Instances.forEach(function (instance) {
42+
instances.push(instance);
43+
});
44+
});
45+
46+
// Map the instances to their private ip addresses
47+
// NOTE This will work locally because of the wilcard ssh proxy in the config
48+
var hosts = instances.map(function (instance) {
49+
return instance.PrivateIpAddress;
50+
});
51+
52+
var hostVars = {};
53+
instances.forEach(function (instance) {
54+
for (var i = 0; i < instance.Tags.length; i++) {
55+
if (instance.Tags[i].Key === 'org') {
56+
hostVars[instance.PrivateIpAddress] = {
57+
host_tags: instance.Tags[i].Value + ',build,run'
58+
};
59+
}
60+
}
61+
});
62+
63+
// Output the resulting JSON
64+
// NOTE http://docs.ansible.com/ansible/developing_inventory.html
65+
console.log(JSON.stringify(
66+
{
67+
docks: {
68+
hosts: hosts
69+
},
70+
_meta : {
71+
hostvars : hostVars
72+
}
73+
}
74+
));
75+
});

ansible/gamma-hosts/hosts

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
[bastion]
2+
beta-bastion
3+
4+
[hipache]
5+
beta-hipache httpsCheckForBackend80=false prependIncomingPort=true subDomainDepth=4
6+
beta-userland-hipache domain=runnablecloud.com httpsCheckForBackend80=true prependIncomingPort=true subDomainDepth=3
7+
8+
[mongodb]
9+
beta-mongodb01
10+
beta-mongodb02
11+
beta-mongodb03
12+
13+
[neo4j]
14+
beta-neo4j
15+
16+
[api_group:children]
17+
worker
18+
api
19+
20+
[api]
21+
beta-api
22+
23+
[worker]
24+
beta-api
25+
26+
[eru]
27+
beta-services
28+
29+
[navi]
30+
beta-services
31+
32+
[charon]
33+
beta-services
34+
35+
[khronos]
36+
beta-services
37+
38+
[mavis]
39+
beta-services
40+
41+
[optimus]
42+
beta-services
43+
44+
[detention]
45+
beta-services
46+
47+
[palantiri]
48+
beta-services
49+
50+
[rabbitmq]
51+
beta-rabbit
52+
53+
[web]
54+
beta-web
55+
56+
[redis]
57+
beta-redis
58+
59+
[redis-slave]
60+
beta-redis-slave
61+
62+
[shiva]
63+
beta-services
64+
65+
[registry]
66+
beta-registry
67+
68+
[swarm-manager]
69+
beta-services
70+
71+
[docks]
72+
73+
[beta:children]
74+
bastion
75+
hipache
76+
mongodb
77+
api
78+
web
79+
redis
80+
redis-slave
81+
docks
82+
registry
83+
neo4j
84+
navi
85+
charon
86+
khronos
87+
mavis
88+
optimus
89+
rabbitmq
90+
eru
91+
shiva
92+
swarm-manager
93+
94+
[targets]
95+
localhost ansible_connection=local bastion_name=beta-bastion

ansible/gamma-hosts/variables

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
[api_group:vars]
2+
api_aws_access_key_id=AKIAIDC4WVMTCGV7KRVQ
3+
api_aws_secret_access_key=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
4+
api_github_client_id=baa5c868b6d17d7ae002
5+
api_github_client_secret=ad4f8527ae98d7eea15a32ee5abbead5c9a25abc
6+
api_github_deploy_keys_bucket=runnable.deploykeys.production-beta
7+
api_hello_runnable_github_token=88ddc423c2312d02a8bbcaad76dd4c374a30e4af
8+
api_mixpanel_app_id=c41affa4b08818443365c526cbb51606
9+
api_mongo_auth=api:oW4c7x9Wiv28oiNBy2Bc
10+
api_mongo_database=beta
11+
api_mongo_replset_name=beta
12+
api_neo4j_auth=neo4j:oqGlRV1KTpaqbHDkdlJz
13+
api_new_relic_app_name=beta-api-production
14+
api_rollbar_key=a90d9c262c7c48cfabbd32fd0a1bc61c
15+
api_s3_context_bucket=runnable.context.resources.production-beta
16+
17+
[docks:vars]
18+
docker_config=docks
19+
20+
[eru:vars]
21+
eru_github_id=8abb08f83f6d1c52bd1a
22+
eru_github_secret=74a23ee56486d57b14f292283cb04625f600917c
23+
24+
[khronos:vars]
25+
khronos_mongo_auth=api:oW4c7x9Wiv28oiNBy2Bc
26+
khronos_mongo_database=beta
27+
khronos_mongo_replset_name=beta
28+
29+
[optimus:vars]
30+
optimus_aws_access_id=AKIAJPA2ZYSVVA5V7XXQ
31+
optimus_aws_secret_id=5V70AUxfIyHeLvlYZe0xaYevDAdgTOWOn5G7nHlt
32+
optimus_github_deploy_keys_bucket=runnable.deploykeys.production-beta
33+
34+
[palantiri:vars]
35+
palantiri_rollbar_key=f675e9090d6f483ca4e742af2c7f2f83
36+
37+
[registry:vars]
38+
registry_s3_access_key=AKIAJK5EN7W6E62A3C3Q
39+
registry_s3_bucket=runnableimages.beta
40+
registry_s3_secret_key=ZFLePZdrHUNhTzuV4Ir/NgwPWOnU41Ur9DbH6UAp
41+
registry_s3_region=us-east-1
42+
43+
[shiva:vars]
44+
aws_access_key_id=AKIAJ3RCYU6FCULAJP2Q
45+
aws_secret_access_key=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
46+
shiva_rollbar_key=0526a90faec845d796e1ef5361a00526
47+
48+
[beta:vars]
49+
ansible_ssh_private_key_file=~/.ssh/oregon.pem
50+
datadog_host=10.20.1.59
51+
datadog_tags=env:beta
52+
domain=runnable-beta.com
53+
new_relic_license_key=338516e0826451c297d44dc60aeaf0a0ca4bfead
54+
node_env=production-beta
55+
pg_host=beta-infrastructure-db.cnksgdqarobf.us-west-2.rds.amazonaws.com
56+
pg_pass=QBjSpAXVYwmGHu4Y
57+
rabbit_password=wKK7g7NWKpQXEeSzyWB7mIpxZIL8H2mDSf3Q6czR3Vk
58+
rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
59+
registry_host=10.20.1.55
60+
swarm_token=d363b783f03a845a2c82b081bfe8443e
61+
user_content_domain=runnablecloud.com

ansible/screenlog.0

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
[?1l>kansible-playbook\ERROR: the playbook: ansible/sauron.yml could not be found
2+
% k..ripts/ansible\]7;file://Christophers-MacBook-Pro.local/Users/cneill/git/devops-scripts/ansible[  1:01AM ]  [ cneill@Christophers-MacBook-Pro:~/git/devops-scripts/ansible(master✗) ]
3+
$ [?1h=ansible-playbook -i ansible/prod-hosts -e stop_time=5 -e git_branch=v0.1.0 ansible/sauron.yml -e name=sauron                [?1l>
4+
kansible-playbook\
5+
PLAY [redis] ******************************************************************
6+
7+
GATHERING FACTS ***************************************************************
8+
fatal: [alpha-redis] => SSH Error: Connection timed out during banner exchange
9+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
10+
11+
PLAY [docks] ******************************************************************
12+
13+
GATHERING FACTS ***************************************************************
14+
fatal: [10.0.228.236] => SSH Error: Connection timed out during banner exchange
15+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
16+
fatal: [10.0.209.251] => SSH Error: Connection timed out during banner exchange
17+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
18+
fatal: [10.0.176.211] => SSH Error: Connection timed out during banner exchange
19+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
20+
fatal: [10.0.178.49] => SSH Error: Connection timed out during banner exchange
21+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
22+
fatal: [10.0.192.107] => SSH Error: Connection timed out during banner exchange
23+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
24+
fatal: [10.0.160.58] => SSH Error: Connection timed out during banner exchange
25+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
26+
fatal: [10.0.141.168] => SSH Error: Connection timed out during banner exchange
27+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
28+
fatal: [10.0.151.155] => SSH Error: Connection timed out during banner exchange
29+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
30+
fatal: [10.0.221.177] => SSH Error: Connection timed out during banner exchange
31+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
32+
fatal: [10.0.148.61] => SSH Error: Connection timed out during banner exchange
33+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
34+
fatal: [10.0.242.213] => SSH Error: Connection timed out during banner exchange
35+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
36+
fatal: [10.0.190.92] => SSH Error: Connection timed out during banner exchange
37+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
38+
fatal: [10.0.233.186] => SSH Error: Connection timed out during banner exchange
39+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
40+
fatal: [10.0.206.60] => SSH Error: Connection timed out during banner exchange
41+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
42+
fatal: [10.0.155.249] => SSH Error: Connection timed out during banner exchange
43+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
44+
fatal: [10.0.141.148] => SSH Error: Connection timed out during banner exchange
45+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
46+
fatal: [10.0.202.22] => SSH Error: Connection timed out during banner exchange
47+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
48+
fatal: [10.0.200.182] => SSH Error: Connection timed out during banner exchange
49+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
50+
fatal: [10.0.209.65] => SSH Error: Connection timed out during banner exchange
51+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
52+
fatal: [10.0.246.239] => SSH Error: Connection timed out during banner exchange
53+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
54+
fatal: [10.0.146.147] => SSH Error: Connection timed out during banner exchange
55+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
56+
fatal: [10.0.179.217] => SSH Error: Connection timed out during banner exchange
57+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
58+
fatal: [10.0.249.26] => SSH Error: Connection timed out during banner exchange
59+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
60+
fatal: [10.0.237.33] => SSH Error: Connection timed out during banner exchange
61+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
62+
fatal: [10.0.164.183] => SSH Error: Connection timed out during banner exchange
63+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
64+
fatal: [10.0.242.120] => SSH Error: Connection timed out during banner exchange
65+
It is sometimes useful to re-run the command using -vvvv, which prints SSH debug output to help diagnose the issue.
66+
67+
TASK: [notify | get the username running the deploy] **************************
68+
FATAL: no hosts matched or all hosts have already failed -- aborting
69+

70+
71+
PLAY RECAP ********************************************************************
72+
to retry, use: --limit @/Users/cneill/sauron.retry
73+
74+
10.0.141.148 : ok=0 changed=0 unreachable=1 failed=0
75+
10.0.141.168 : ok=0 changed=0 unreachable=1 failed=0
76+
10.0.146.147 : ok=0 changed=0 unreachable=1 failed=0
77+
10.0.148.61 : ok=0 changed=0 unreachable=1 failed=0
78+
10.0.151.155 : ok=0 changed=0 unreachable=1 failed=0
79+
10.0.155.249 : ok=0 changed=0 unreachable=1 failed=0
80+
10.0.160.58 : ok=0 changed=0 unreachable=1 failed=0
81+
10.0.164.183 : ok=0 changed=0 unreachable=1 failed=0
82+
10.0.176.211 : ok=0 changed=0 unreachable=1 failed=0
83+
10.0.178.49 : ok=0 changed=0 unreachable=1 failed=0
84+
10.0.179.217 : ok=0 changed=0 unreachable=1 failed=0
85+
10.0.190.92 : ok=0 changed=0 unreachable=1 failed=0
86+
10.0.192.107 : ok=0 changed=0 unreachable=1 failed=0
87+
10.0.200.182 : ok=0 changed=0 unreachable=1 failed=0
88+
10.0.202.22 : ok=0 changed=0 unreachable=1 failed=0
89+
10.0.206.60 : ok=0 changed=0 unreachable=1 failed=0
90+
10.0.209.251 : ok=0 changed=0 unreachable=1 failed=0
91+
10.0.209.65 : ok=0 changed=0 unreachable=1 failed=0
92+
10.0.221.177 : ok=0 changed=0 unreachable=1 failed=0
93+
10.0.228.236 : ok=0 changed=0 unreachable=1 failed=0
94+
10.0.233.186 : ok=0 changed=0 unreachable=1 failed=0
95+
10.0.237.33 : ok=0 changed=0 unreachable=1 failed=0
96+
10.0.242.120 : ok=0 changed=0 unreachable=1 failed=0
97+
10.0.242.213 : ok=0 changed=0 unreachable=1 failed=0
98+
10.0.246.239 : ok=0 changed=0 unreachable=1 failed=0
99+
10.0.249.26 : ok=0 changed=0 unreachable=1 failed=0
100+
alpha-redis : ok=0 changed=0 unreachable=1 failed=0
101+
102+
% k..ripts/ansible\]7;file://Christophers-MacBook-Pro.local/Users/cneill/git/devops-scripts/ansible[  1:05AM ]  [ cneill@Christophers-MacBook-Pro:~/git/devops-scripts/ansible(master✗) ]
103+
$ [?1h=

0 commit comments

Comments
 (0)