Skip to content

Commit d53bc58

Browse files
committed
staging tweaks
1 parent 1ae04a8 commit d53bc58

File tree

6 files changed

+54
-15
lines changed

6 files changed

+54
-15
lines changed

ansible.cfg

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
[defaults]
2+
callback_whitelist = profile_tasks
3+
internal_poll_interval=0.001
24
inventory = ./inventories/prod.ini
35
log_path = ./lobsters-ansible.log
4-
callback_whitelist = profile_tasks
5-
remote_tmp = /tmp/ansible
6+
timeout = 10
67

78
[ssh_connection]
8-
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey
9+
control_path = /tmp/ansible-ssh-%%h-%%p-%%r
910
pipelining = True
11+
ssh_args = -C -o ControlMaster=auto -o ControlPersist=60s -o PreferredAuthentications=publickey

group_vars/staging.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
db_host: stage01
2-
mx_host: stage01
3-
smtp_host: stage01
4-
www_host: stage01
1+
db_host: stage01.lobste.rs
2+
mx_host: stage01.lobste.rs
3+
smtp_host: stage01.lobste.rs
4+
www_host: stage01.lobste.rs

inventories/stage.ini inventories/staging.ini

+5-5
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ env=staging
33
ps1_fg=red
44

55
[db]
6-
stage01
6+
stage01.lobste.rs
77

88
[mx]
9-
stage01
9+
stage01.lobste.rs
1010

1111
[smtp]
12-
stage01
12+
stage01.lobste.rs
1313

1414
[www]
15-
stage01
15+
stage01.lobste.rs
1616

1717
[www_worker]
18-
stage01
18+
stage01.lobste.rs
1919

2020
#[mockturtle]
2121
#mockturtle.xen.prgmr.com

roles/nginx/files/staging/nginx/sites-available/lobste.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
upstream lobsters_puma_server {
2-
server unix:/srv/lobste.rs/tmp/puma.sock fail_timeout=0;
2+
server unix:/srv/lobste.rs/http/tmp/puma.sock fail_timeout=0;
33
}
44

55
server {
6-
listen :: default_server;
6+
listen 80 default_server;
77
listen [::]:80 default_server;
88
server_name stage01.lobste.rs;
99
access_log /var/log/nginx/lobste.rs.access.log main;

roles/puma/templates/lobsters-puma.service.j2

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ RestartSec=60
1818
StartLimitBurst=5
1919
StartLimitInterval=3600
2020

21-
Environment=RAILS_ENV={{ env }} RUBYOPT='-W:no-deprecated'
21+
Environment=RAILS_ENV=production RUBYOPT='-W:no-deprecated'
2222
# Environment=PUMA_DEBUG=1
2323

2424
# SystemD will not run puma even if it is in your path. You must specify

staging.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
- name: lobsters
3+
tags: lobsters
4+
become: yes
5+
hosts: www_worker
6+
roles:
7+
- { role: lobsters }
8+
9+
- name: puma
10+
tags: puma
11+
become: yes
12+
hosts: www_worker
13+
roles:
14+
- { role: puma }
15+
16+
- name: mariadb
17+
tags: mariadb
18+
become: yes
19+
hosts: www_worker
20+
roles:
21+
- { role: puma }
22+
23+
- name: nginx
24+
tags: nginx
25+
become: yes
26+
hosts: www
27+
roles:
28+
- { role: nginx }
29+
30+
# deliberately no postfix config - don't want staging hassling people
31+
32+
- name: sysadm
33+
tags: sysadm
34+
become: yes
35+
hosts: all
36+
roles:
37+
- { role: sysadm }

0 commit comments

Comments
 (0)