upd-parity-version for 1.10
This commit is contained in:
parent
7d4154879b
commit
869b4e3503
|
@ -19,3 +19,4 @@ logs/old/*.log
|
||||||
logs/old/*.gz
|
logs/old/*.gz
|
||||||
|
|
||||||
*.todo
|
*.todo
|
||||||
|
all
|
||||||
|
|
|
@ -3,8 +3,12 @@
|
||||||
poa_role: "bootnode"
|
poa_role: "bootnode"
|
||||||
|
|
||||||
# repo to fetch new binaries from
|
# repo to fetch new binaries from
|
||||||
PARITY_BIN_LOC: "http://d1h4xl4cr1h0mo.cloudfront.net/v1.9.2/x86_64-unknown-linux-gnu/parity"
|
PARITY_BIN_LOC_UBUNTU: "http://d1h4xl4cr1h0mo.cloudfront.net/v1.10.0/x86_64-unknown-linux-gnu/parity"
|
||||||
PARITY_BIN_SHA256: "3604a030388cd2c22ebe687787413522106c697610426e09b3c5da4fe70bbd33"
|
PARITY_BIN_SHA256_UBUNTU: "3871bae2760050316c9c1131750a2dc3fd11e1b79cd5f7a1e09015264d4c5ea0"
|
||||||
|
PARITY_BIN_LOC_CENTOS: "http://d1h4xl4cr1h0mo.cloudfront.net/v1.10.0/x86_64-unknown-centos-gnu/parity"
|
||||||
|
PARITY_BIN_SHA256_CENTOS: "fd21f563a1bbce6fb5f995403946ad5dd8506d4781bddac12b26ba3249af4fe9"
|
||||||
|
|
||||||
|
PARITY_VERSION_CHECK: "1.10.0"
|
||||||
|
|
||||||
# backup options
|
# backup options
|
||||||
backup_parity_data: "on"
|
backup_parity_data: "on"
|
||||||
|
@ -13,15 +17,13 @@ backup_parity_data: "on"
|
||||||
resync: "off"
|
resync: "off"
|
||||||
|
|
||||||
# strings to remove from node.toml
|
# strings to remove from node.toml
|
||||||
bootnode_node_toml_lines_to_remove:
|
bootnode_node_toml_lines_to_remove: []
|
||||||
- section: "rpc"
|
|
||||||
option: "threads"
|
|
||||||
|
|
||||||
# strings to add in node.toml
|
# strings to add in node.toml
|
||||||
bootnode_node_toml_lines_to_add:
|
bootnode_node_toml_lines_to_add:
|
||||||
- section: "rpc"
|
- section: "ui"
|
||||||
option: "processing_threads"
|
option: "disable"
|
||||||
value: 4
|
value: "true"
|
||||||
- section: "rpc"
|
- section: "dapps"
|
||||||
option: "cors"
|
option: "disable"
|
||||||
value: ['all']
|
value: "true"
|
||||||
|
|
|
@ -10,6 +10,22 @@
|
||||||
path: /etc/systemd/system/poa-netstats.service
|
path: /etc/systemd/system/poa-netstats.service
|
||||||
register: netstats_service_file
|
register: netstats_service_file
|
||||||
|
|
||||||
|
### checks for PARITY_VERSION_CHECK
|
||||||
|
- name: Check if previous backups are present
|
||||||
|
stat: path="{{ home }}/backups-version/BEFORE-{{ PARITY_VERSION_CHECK }}"
|
||||||
|
register: bkp_version
|
||||||
|
|
||||||
|
- name: Remove previous version backups
|
||||||
|
file: path="{{ home }}/backups-version" state=absent
|
||||||
|
when: bkp_version.stat.exists == False
|
||||||
|
|
||||||
|
- name: Create directory for parity-version backups
|
||||||
|
file: path="{{ backups_folder }}" state=directory
|
||||||
|
|
||||||
|
- name: Create backups version file
|
||||||
|
file: path="{{ home }}/backups-version/BEFORE-{{ PARITY_VERSION_CHECK }}" state=touch
|
||||||
|
|
||||||
|
### actual upgrade
|
||||||
- name: Shutdown poa-netstats service
|
- name: Shutdown poa-netstats service
|
||||||
service: name=poa-netstats state=stopped
|
service: name=poa-netstats state=stopped
|
||||||
when: netstats_service_file.stat.exists
|
when: netstats_service_file.stat.exists
|
||||||
|
@ -17,9 +33,6 @@
|
||||||
- name: Shutdown poa-parity service
|
- name: Shutdown poa-parity service
|
||||||
service: name=poa-parity state=stopped
|
service: name=poa-parity state=stopped
|
||||||
|
|
||||||
- name: Create directory for parity-version backups
|
|
||||||
file: path="{{ backups_folder }}" state=directory
|
|
||||||
|
|
||||||
- name: Backup parity binary
|
- name: Backup parity binary
|
||||||
command: cp -a {{ home }}/parity {{ backups_folder }}/parity
|
command: cp -a {{ home }}/parity {{ backups_folder }}/parity
|
||||||
|
|
||||||
|
@ -30,10 +43,15 @@
|
||||||
- name: Backup node.toml
|
- name: Backup node.toml
|
||||||
command: cp -a "{{ home }}/node.toml" {{ backups_folder }}/node.toml
|
command: cp -a "{{ home }}/node.toml" {{ backups_folder }}/node.toml
|
||||||
|
|
||||||
- name: Download new parity binary version
|
- name: Download new parity binary version (Debian-like)
|
||||||
get_url: url="{{ PARITY_BIN_LOC }}" dest="{{ home }}/parity" mode=0755 checksum="sha256:{{ PARITY_BIN_SHA256 }}"
|
get_url: url="{{ PARITY_BIN_LOC_UBUNTU }}" dest="{{ home }}/parity" mode=0755 checksum="sha256:{{ PARITY_BIN_SHA256_UBUNTU }}"
|
||||||
|
when: ansible_os_family == "Debian"
|
||||||
|
|
||||||
- name: Remove lines from node.toml (bootnode)
|
- name: Download new parity binary version (RedHat-like)
|
||||||
|
get_url: url="{{ PARITY_BIN_LOC_CENTOS }}" dest="{{ home }}/parity" mode=0755 checksum="sha256:{{ PARITY_BIN_SHA256_CENTOS }}"
|
||||||
|
when: ansible_os_family == "RedHat"
|
||||||
|
|
||||||
|
- name: Remove lines from node.toml (bootnode only)
|
||||||
ini_file:
|
ini_file:
|
||||||
path: "{{ home }}/node.toml"
|
path: "{{ home }}/node.toml"
|
||||||
section: "{{ item['section'] }}"
|
section: "{{ item['section'] }}"
|
||||||
|
@ -42,7 +60,7 @@
|
||||||
with_items: "{{ bootnode_node_toml_lines_to_remove }}"
|
with_items: "{{ bootnode_node_toml_lines_to_remove }}"
|
||||||
when: poa_role == "bootnode"
|
when: poa_role == "bootnode"
|
||||||
|
|
||||||
- name: Add lines to node.toml (bootnode)
|
- name: Add lines to node.toml (bootnode only)
|
||||||
ini_file:
|
ini_file:
|
||||||
path: "{{ home }}/node.toml"
|
path: "{{ home }}/node.toml"
|
||||||
value: "{{ item['value'] }}"
|
value: "{{ item['value'] }}"
|
||||||
|
|
Loading…
Reference in New Issue