Skip to content

Commit 8994b99

Browse files
committed
Debugging Infrastructure
1 parent 4215f71 commit 8994b99

File tree

7 files changed

+48
-17
lines changed

7 files changed

+48
-17
lines changed

Makefile

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,17 @@ run:
1616

1717
# Test Application
1818
test:
19-
ansible-playbook ./test.yml --inventory ./local/vagrant_ansible_inventory
2019
vagrant rsync meteor
2120
vagrant ssh meteor --command "cd /tuxlab-sync && /usr/local/bin/meteor npm install && /usr/local/bin/meteor npm test";
2221

22+
# Access Various Containers
23+
meteor:
24+
vagrant ssh meteor; exit 0;
25+
dswarm:
26+
vagrant ssh dswarm; exit 0;
27+
dhost:
28+
ssh -i ~/.vagrant.d/insecure_private_key -p 2222 -o UserKnownHostsFile=/dev/null [email protected]; exit 0;
29+
2330
# Down Vagrantfile
2431
destroy:
2532
vagrant destroy --force;

local/vagrant_network_conf.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
22
# For some unknown reason, this fixes network bugs.
3+
/bin/sleep 5;
34
sudo systemctl restart network || true;
45
/bin/sleep 5;

roles/ssl/tasks/main.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@
104104
-config /etc/pki/tls/openssl.cnf
105105
register: CSR
106106

107+
- name: Convert PKCS8 to PKCS1 Alternative
108+
become: true
109+
shell: openssl rsa -in /etc/ssl/local/host.pem -out /etc/ssl/local/host.key
110+
107111
###############################
108112
# SIGN CSR #
109113
###############################

roles/tuxlab-app/tasks/production.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
verify_host: no
2323

2424
# INSTALL FOREVER
25-
- name: install forvever
25+
- name: install forever
2626
become: yes
2727
shell: meteor npm install -g forever
2828

roles/tuxlab-proxy/tasks/main.yml

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,27 @@
11
---
2+
3+
- name: create tuxlab settings directory
4+
become: yes
5+
file:
6+
path: /etc/tuxlab-proxy/
7+
state: directory
8+
mode: 0755
9+
210
- name: copy tuxlab-proxy settings
311
become: yes
4-
template: src=settings.json.j2 dest=/root/tuxlab-proxy-settings.json owner=root group=root mode=0644
12+
template:
13+
src: settings.json.j2
14+
dest: /etc/tuxlab-proxy/settings.json
15+
mode: 0755
16+
17+
- name: update permissions
18+
become: true
19+
shell: chmod +rwx {{item}}
20+
with_items:
21+
- /etc/ssl/local/
22+
- /etc/tuxlab-proxy/
523

6-
#TODO https://github.com/ansible/ansible-modules-core/issues/5515
24+
#TODO https://github.com/ansible/ansible-mod ~/tuxlab-proxy-settings.json~/tuxlab-proxy-settings.json~/tuxlab-proxy-settings.jsonules-core/issues/5515
725
- name: pull ssh-proxy image
826
become: yes
927
shell: docker pull tuxlab/ssh-proxy
@@ -14,8 +32,8 @@
1432
name: host-proxy
1533
image: tuxlab/ssh-proxy
1634
state: started
17-
restart_policy: on-failure
35+
restart_policy: always
1836
network_mode: host
1937
volumes:
20-
- /root/tuxlab-proxy-settings.json:/settings.json:ro
21-
- /etc/ssl/local:/ssl:ro
38+
- /etc/tuxlab-proxy/settings.json:/usr/lib/tuxlab/settings.json:ro
39+
- /etc/ssl/local/:/usr/lib/tuxlab/ssl/:ro
Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,27 @@
11
{
22
"etcd_conf" : {
3-
"etcd_hosts" : ["172.17.0.1:2379"],
3+
"etcd_hosts" : ["https://{{ ansible_host }}:2379"],
44
"etcd_conn_opts" : {
5-
"cert" : "/ssl/cert.pem",
6-
"key" : "/ssl/key.pem",
7-
"cacert" : "/ssl/ca.pem"
5+
"cert" : "/usr/lib/tuxlab/ssl/cert.pem",
6+
"key" : "/usr/lib/tuxlab/ssl/host.pem",
7+
"cacert" : "/usr/lib/tuxlab/ssl/ca.pem"
88
}
99
},
1010
"docker_conf" : {
1111
"docker_url" : "tcp://{{ ansible_host }}:2375",
1212
"docker_args" : {
13-
"cert" : "/ssl/cert.pem",
14-
"key" : "/ssl/key.pem",
15-
"cacert" : "/ssl/ca.pem"
13+
"cert" : "/usr/lib/tuxlab/ssl/cert.pem",
14+
"key" : "/usr/lib/tuxlab/ssl/host.pem",
15+
"cacert" : "/usr/lib/tuxlab/ssl/ca.pem"
1616
}
1717
},
18-
"wetty_conf" : {
18+
"xterm_conf" : {
1919
"host" : "0.0.0.0",
2020
"port" : 80
2121
},
2222
"ssh_conf" : {
2323
"host" : "0.0.0.0",
24-
"port" : 22
24+
"port" : 22,
25+
"key" : "/usr/lib/tuxlab/ssl/host.key"
2526
}
2627
}

0 commit comments

Comments
 (0)