This repository has been archived by the owner on Sep 7, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsynctest.yml
75 lines (75 loc) · 3.91 KB
/
synctest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
---
- hosts: localhost
gather_facts: true
vars_files:
- vars/active_scenario.yml
- vars/OS/{{ ansible_facts.os_family }}.yml
- vars/chia.yml
- vars/ansible.yml
vars:
# Read Local configuration files
TESTCASES: "{{ lookup('file', 'vars/active_testcases.json') | from_json }}"
SYNC_MODES: "{{ lookup('file', 'vars/active_sync_mode.json') | from_json }}"
SCENARIO_CONFIG: "{{ lookup('file', 'vars/scenario_definition.json') | from_json }}"
BENCHMARK_CONFIG: "{{ lookup('file', 'vars/testcase_definition.json') | from_json }}"
vars_prompt:
- name: ansible_become_pass
prompt: "Enter sudo password"
confirm: yes
private: yes
- name: confirmation
prompt: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||
This script will
- Stop all chia processes of user "{{ CHIA_OS_GROUP }}"
- Replace any existing chia SW installation at "{{ CHIA_SW_PATH }}" with branch/tag "{{ CHIA_BRANCH }}"
- Remove chia db "{{ BLOCKCHAIN_DB_PATH }}/{{ BLOCKCHAIN_DB_NAME }}" and related -shm, -journal, -wal files
- If not already available, download the required database file for scenario "{{ ACTIVE_SCENARIO }}"
For scenarios other than FULLSYNC:
The prepared database files are vacuumed and all relevant indexes are droped.
- Local configuration files are located at "{{ ANSIBLE_HOME_PATH }}/config"
- Run the following testcases:
{{ TESTCASES.ACTIVE_TESTCASES }}
Check file "config/testcase_definition.json" for further information regarding testcases.
- Logfiles will be written to:
.) chia
debug.log in "{{ ANSIBLE_LOG_PATH }}/current/chia"
.) sar
raw data in "{{ ANSIBLE_LOG_PATH }}/current/sa"
csv export "{{ ANSIBLE_LOG_PATH }}/current/*.sa.csv"
svg reports "{{ ANSIBLE_LOG_PATH }}/current/*.sa.svg"
.) testcase
run info "{{ ANSIBLE_LOG_PATH }}/current/*_ansible_run.csv"
.) ansible
playbook log "{{ ANSIBLE_LOG_PATH }}/ansible_playbook.log"
- Depending on the hosts hardware, selected scenario and testcases, the scripts execution can last from a few minutes to several days.
|||||||||||||||||||||||||||||||||||||||||||||||||||||
Proceed? (yes/no)
private: no
pre_tasks:
- name: "Fail if no confirmation was given"
when: "confirmation|lower != 'yes'"
fail:
msg: "No confirmation given ... aborting."
- name: "Get timestamp for execution"
register: timestamp_started
ansible.builtin.shell: |
date +%Y-%m-%d_%H:%M:%S
- name: "Set ansible facts"
import_tasks: vars/set_facts/set_ansible_facts.yml
- name: "Set chia facts"
import_tasks: vars/set_facts/set_chia_facts.yml
- name: "Set os facts"
import_tasks: vars/set_facts/set_os_facts.yml
- name: "Set testrun facts"
import_tasks: vars/set_facts/set_testrun_facts.yml
- name: "Do testrun preparation, create directories, ..."
import_tasks: tasks/prepare_for_testrun.yml
- name: "Download sqlite file for scenario"
when: "'CHIA_FULLSYNC_BENCHMARK' not in ACTIVE_SCENARIO"
import_tasks: tasks/download_sqlite_for_scenario.yml
roles:
# Add get device from blockchain, dir is known, use lsblk
# Get smartinfo
# Add write smart info out
- role: loop_over_testcases