Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 39a29ab

Browse files
committed
Logs collected, timezone set, though we still need to set it in pg conf, dunno why
1 parent a0dccfa commit 39a29ab

File tree

3 files changed

+31
-6
lines changed

3 files changed

+31
-6
lines changed

devops/logs.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,22 @@
33
---
44
- hosts: nodes
55

6-
environment:
7-
PATH: "{{ pg_dst }}/bin:{{ ansible_env.PATH }}"
8-
96
tasks:
7+
- name: rm -rf logs
8+
local_action: file path=logs state=absent
9+
run_once: true
1010
- name: fetch logs
1111
fetch:
1212
src: "{{ pg_logfile }}"
13-
dest: /tmp
14-
validate_checksum: no # new logs might constantly arrive
13+
dest: logs/{{ inventory_hostname }}.log
14+
validate_checksum: no # new logs might constantly arrive
15+
flat: yes
16+
17+
- hosts: shardlord
18+
19+
tasks:
20+
- name: create symlink to shadlord log
21+
local_action: file
22+
src={{ inventory_hostname }}.log
23+
dest=logs/shardlord.log
24+
state=link

devops/provision.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
CFLAGS: "{{ cflags }}"
99

1010
tasks:
11+
- name: set Moscow timezone
12+
timezone:
13+
name: Europe/Moscow
14+
become: yes
15+
tags:
16+
- tz
17+
1118
- name: update apt cache (Debian)
1219
apt: update_cache=yes
1320
become: yes
@@ -85,3 +92,7 @@
8592
chdir: "{{shardman_src}}"
8693
tags:
8794
- build_shardman
95+
96+
- import_playbook: init.yml
97+
tags:
98+
- init

devops/readme.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ For manually configured nodes:
3535
ansible -i inventory_manual -m ping all
3636
Now you are ready to go.
3737

38-
Ansible cheatsheet:
38+
Short usage guide & Ansible cheatsheet:
3939

4040
Build only PG on ec2:
4141
ansible-playbook -i inventory_ec2 --tags "build_pg"
@@ -52,6 +52,10 @@ ansible-playbook -i inventory_ec2 pg_ctl.yml -e "pg_ctl_action=restart"
5252
Read cmd log on shardlord:
5353
ansible-playbook -i inventory_ec2/ psql.yml --limit 'shardlord' -e "cmd='\'table shardman.cmd_log\''"
5454

55+
Ubuntu images EC2 locator:
56+
https://cloud-images.ubuntu.com/locator/ec2/
57+
We need ami-4199282e.
58+
5559
Things that made me wonder during writing this:
5660
* Reusability of tasks. Playbooks, files with tasks, roles, includes, imports,
5761
old include API...probably working directly from Python would be easier? There

0 commit comments

Comments
 (0)