Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 5cf57bd

Browse files
committed
update scripts to deploy relay signer
1 parent 909219e commit 5cf57bd

File tree

8 files changed

+28
-10
lines changed

8 files changed

+28
-10
lines changed

inventory.example

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
#Current Besu commit sha obtained from: https://github.com/hyperledger/besu/releases
2525
#Tested BESU versions:
26+
# 21.10.6
2627
# 21.7.3
2728
# 21.1.6
2829
# 21.1.3
@@ -49,7 +50,7 @@ bootnode=false
4950
validator=false
5051
first_node=false
5152
install=false
52-
besu_release_version='21.7.3'
53+
besu_release_version='21.10.6'
5354
orion_release_version='1.6.0'
5455
tessera_release_version='21.1.1'
5556
dns_name=lacchain.com
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --permissions-accounts-contract-enabled --permissions-accounts-contract-address=0x0000000000000000000000000000000000008888 --config-file=/root/lacchain/config.toml --bootnodes
3+
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --permissions-accounts-contract-enabled=false --permissions-accounts-contract-address=0x0000000000000000000000000000000000008888 --config-file=/root/lacchain/config.toml --bootnodes
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
---
2+
- name: Checking if rotation validator exists
3+
stat:
4+
path: "/root/lacchain/rotation-validator/client/config.toml"
5+
register: rotation_validator
6+
27
- name: Download rotation validator
38
git:
49
repo: "https://github.com/lacchain/rotation-validator.git"
510
dest: "/root/lacchain/rotation-validator"
11+
when: not rotation_validator.stat.exists
612

713
- name: Generate Rotation Validator configuration file
814
template:
915
src: "rotation-validator-config.j2"
1016
dest: "~/lacchain/rotation-validator/client/config.toml"
11-
mode: 0644
17+
mode: 0644
18+
when: not rotation_validator.stat.exists
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --permissions-accounts-contract-enabled --permissions-accounts-contract-address=0x0000000000000000000000000000000000008888 --config-file=/root/lacchain/config.toml
3+
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --permissions-accounts-contract-enabled=false --permissions-accounts-contract-address=0x0000000000000000000000000000000000008888 --config-file=/root/lacchain/config.toml
Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,41 @@
1+
---
2+
- name: Checking if Relay Signer exists
3+
stat:
4+
path: "/root/lacchain/gas-relay-signer/client/config.toml"
5+
register: relay_signer
6+
17
- name: Download Relay Signer code
28
git:
39
repo: "https://github.com/lacchain/gas-management.git"
4-
dest: "/root/lacchain/gas-relay-signer"
10+
dest: "/root/lacchain/gas-relay-signer"
11+
when: not relay_signer.stat.exists
512

613
- name: Generate Relay Signer configuration file
714
template:
815
src: "relay-signer-config.j2"
916
dest: "~/lacchain/gas-relay-signer/config.toml"
1017
mode: 0644
18+
when: not relay_signer.stat.exists
1119

1220
- name: Get Key
1321
shell: cat ~/lacchain/data/key
1422
register: key
23+
when: not relay_signer.stat.exists
1524

1625
- name: Set WRITER_KEY default
1726
template:
1827
src: writer-key.sh.j2
1928
dest: /etc/profile.d/writer-key.sh
2029
mode: 0644
30+
when: not relay_signer.stat.exists
2131

2232
- name: reset environment
2333
shell: bash -c 'source /etc/profile.d/writer-key.sh'
34+
when: not relay_signer.stat.exists
2435

2536
- name: Copy service file to systemd
2637
copy:
2738
src: "{{ role_path }}/files/relaysigner.service"
2839
dest: /lib/systemd/system/relaysigner.service
29-
mode: 0775
40+
mode: 0775
41+
when: not relay_signer.stat.exists

roles/lacchain-writer-node/tasks/update.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,5 @@
2222
- name: install relay signer
2323
import_tasks: "install-relay-signer.yaml"
2424

25-
#- name: start relay signer
26-
# import_tasks: "start-relay-signer.yaml"
27-
2825
- name: start besu
2926
import_tasks: "start-node.yaml"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/bin/bash
22

3-
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --permissions-accounts-contract-enabled --permissions-accounts-contract-address=0x0000000000000000000000000000000000008888 --config-file=/root/lacchain/config.toml
3+
LOG4J_CONFIGURATION_FILE=/root/lacchain/log.xml pantheon --data-path /root/lacchain/data --genesis-file=/root/lacchain/data/genesis.json --network-id {{net_id}} --permissions-nodes-contract-enabled --permissions-nodes-contract-address=0x0000000000000000000000000000000000009999 --permissions-accounts-contract-enabled=false --permissions-accounts-contract-address=0x0000000000000000000000000000000000008888 --config-file=/root/lacchain/config.toml

site-lacchain-writer.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,5 +47,6 @@
4747
become: yes
4848
vars:
4949
install: true
50+
update: true
5051
roles:
5152
- lacchain-writer-node

0 commit comments

Comments
 (0)