Add role to do HF on spec changes
This commit is contained in:
parent
8de52019b8
commit
1984be7db8
|
@ -6,3 +6,7 @@ access_key: "KEY_NAME"
|
||||||
secret_key: "KEY_SECRET"
|
secret_key: "KEY_SECRET"
|
||||||
|
|
||||||
s3_bucket: "BUCKET_NAME"
|
s3_bucket: "BUCKET_NAME"
|
||||||
|
|
||||||
|
#For HFs
|
||||||
|
MAIN_REPO_FETCH: "poanetwork"
|
||||||
|
GENESIS_BRANCH: "sokol"
|
||||||
|
|
|
@ -1,2 +1,5 @@
|
||||||
[backup]
|
[backup]
|
||||||
INSERT_HERE_SERVERS_HOSTNAME_OR_IPs
|
INSERT_HERE_SERVERS_HOSTNAME_OR_IPs
|
||||||
|
|
||||||
|
[hf-spec-change]
|
||||||
|
INSERT_HERE_SERVERS_HOSTNAME_OR_IPs
|
||||||
|
|
|
@ -0,0 +1,23 @@
|
||||||
|
---
|
||||||
|
- name: Shutdown poa-netstats service
|
||||||
|
service: name=poa-netstats state=stopped
|
||||||
|
|
||||||
|
- name: Shutdown poa-parity service
|
||||||
|
service: name=poa-parity state=stopped
|
||||||
|
|
||||||
|
- name: Create directory for spec backups
|
||||||
|
file: path={{ home }}/spec-hfs state=directory
|
||||||
|
|
||||||
|
- name: Create previous spec backup
|
||||||
|
command: cp {{ home }}/spec.json {{ home }}/spec-hfs/spec-hf-{{ date }}.json
|
||||||
|
|
||||||
|
- name: Download new spec
|
||||||
|
get_url: url={{ item }} dest={{ home }}/ mode=0644
|
||||||
|
with_items:
|
||||||
|
- "https://raw.githubusercontent.com/{{ MAIN_REPO_FETCH }}/poa-chain-spec/{{ GENESIS_BRANCH }}/spec.json"
|
||||||
|
|
||||||
|
- name: Launch poa-parity service
|
||||||
|
service: name=poa-parity state=started
|
||||||
|
|
||||||
|
- name: Launch poa-netstats service
|
||||||
|
service: name=poa-netstats state=started
|
Loading…
Reference in New Issue