@@ -5,12 +5,14 @@ Export the environment variables:
5
5
``` bash
6
6
export MITHRIL_VM=** MITHRIL_VM**
7
7
export CARDANO_NETWORK=** CARDANO_NETWORK**
8
+ export MITHRIL_DISTRIBUTION_LINUX_PKG=** MITHRIL_DISTRIBUTION_LINUX_PKG**
8
9
```
9
10
10
11
Here is an exmaple for the ` release-mainnet ` network:
11
12
``` bash
12
13
export MITHRIL_VM=aggregator.release-mainnet.api.mithril.network
13
14
export CARDANO_NETWORK=mainnet
15
+ export MITHRIL_DISTRIBUTION_LINUX_PKG=https://github.com/input-output-hk/mithril/releases/download/2342.0/mithril-2342.0-linux-x64.tar.gz
14
16
```
15
17
16
18
## Make a backup of the aggregator database
@@ -30,29 +32,64 @@ And copy the SQLite database file `aggregator.sqlite3`:
30
32
cp /home/curry/data/$CARDANO_NETWORK /mithril-aggregator/mithril/stores/aggregator.sqlite3 /home/curry/data/$CARDANO_NETWORK /mithril-aggregator/mithril/stores/aggregator.sqlite3.bak.$( date +%Y-%m-%d)
31
33
```
32
34
33
- And connect to the aggregator container:
35
+ ## Create a temp directory
36
+
37
+ Create a temp directory:
34
38
``` bash
35
- docker exec -it mithril-aggregator bash
39
+ rm -rf /home/curry/temp
40
+ mkdir -p /home/curry/temp/config
41
+ cd /home/curry/temp
36
42
```
37
43
38
- Once connected to the aggregator container, recompute the certificates hashes :
44
+ And download the configuration file for tools :
39
45
``` bash
40
- /app/bin/mithril-aggregator -vvvv tools recompute-certificates-hash
46
+ wget https://raw.githubusercontent.com/input-output-hk/mithril/main/docs/runbook/ recompute-certificates-hash/config/tools.json -O /home/curry/temp/config/tools.json
41
47
```
42
48
43
- Then disconnect from the aggregator container:
49
+ ## Download the pre-compiled aggregator binary
50
+
51
+ Download the mithril pre-compiled binaries package:
44
52
``` bash
45
- exit
53
+ wget $MITHRIL_DISTRIBUTION_LINUX_PKG -O mithril-bin.tar.gz
54
+ ```
55
+
56
+ Unpack the mithril aggregator binary:
57
+ ``` bash
58
+ tar xzf mithril-bin.tar.gz mithril-aggregator
59
+ ```
60
+
61
+ Make mithril aggregator binary executable:
62
+ ``` bash
63
+ chmod u+x mithril-aggregator
64
+ ```
65
+
66
+ Make sure you are running the expected version of the aggregator:
67
+ ``` bash
68
+ ./mithril-aggregator --version
69
+ ```
70
+
71
+ ## Stop the aggregator
72
+
73
+ Stop the aggregator container:
74
+ ``` bash
75
+ docker stop mithril-aggregator
76
+ ```
77
+
78
+ ## Run the migration
79
+
80
+ Once connected to the aggregator container, recompute the certificates hashes:
81
+ ``` bash
82
+ DATA_STORES_DIRECTORY=/home/curry/data/$CARDANO_NETWORK /mithril-aggregator/mithril/stores/ ./mithril-aggregator --run-mode tools -vvv tools recompute-certificates-hash
46
83
```
47
84
48
85
## Restart the aggregator
49
86
50
87
Restart the aggregator to make sure that the certificate chain is valid:
51
88
``` bash
52
- docker restart mithril-aggregator
89
+ docker start mithril-aggregator
53
90
```
54
91
55
- Make sure that the certificate chain is valid (wait for the state machiene to go into the state ` READY ` ):
92
+ Make sure that the certificate chain is valid (wait for the state machine to go into the ` READY ` state ):
56
93
``` bash
57
94
docker logs -f --tail 1000 mithril-aggregator
58
95
```
@@ -62,6 +99,13 @@ Then disconnect from the aggregator VM:
62
99
exit
63
100
```
64
101
102
+ ## Cleanup the temp directory
103
+
104
+ Remove the temp directory:
105
+ ``` bash
106
+ rm -rf /home/curry/temp
107
+ ```
108
+
65
109
## Rollback procedure
66
110
67
111
If the recomputation fails, you can rollback the database.
0 commit comments