You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+86-35Lines changed: 86 additions & 35 deletions
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,19 @@ This CLI is implemented based on the scripts generated by the community, with th
9
9
[Documentation to get started in the tool](https://orelvis15.github.io/cvm/)
10
10
11
11
## Support
12
+
- Compiled download support is provided by IOK, the download is done from the hydra.iohk.io pages themselves, they only provide support for (Ubuntu 18.04 LTS, 20.04 LTS; Mint 19.3, 20; Debian 10.3).
13
+
- Compilation support is provided by CVM, compilation is done on the local server, we are working on supporting RedHat based versions.
To start running the cardano node we need to decide how we want to manage the node versions.
33
40
41
+
#### We have two options
42
+
- Download the executables published by IOK
43
+
- Compile cardano locally
44
+
45
+
---
34
46
## Prepare Pool
35
47
36
48
Prepare the server to be able to run cardano-node.
37
49
38
-
* Install all necessary dependencies.
39
-
* Create the community-proposed folder structure in [prepare.sh](https://github.com/cardano-community/guild-operators/blob/alpha/scripts/cnode-helper-scripts/prereqs.sh#L427) and other extras.
40
-
* Download all the configuration files depending on the network we select (mainnet by default)
41
-
* Download all the [scripts](https://github.com/cardano-community/guild-operators/tree/alpha/scripts/cnode-helper-scripts) that the community offers us
50
+
#### 1: Using the binary download (**Default**)
42
51
43
-
### Prepare pool for mainnet
52
+
This is the default option, we just need to run:
44
53
45
54
`cvm init`
46
-
or
47
-
`cvm init mainnet`
48
55
49
-
### Prepare pool for testnet
56
+
what happens now?
57
+
58
+
- It will be verified that the user has write permissions in the `/opt` directory
59
+
- All necessary dependencies will be installed
60
+
- The project folder structure will be created in `/opt/cardano`
61
+
- All scripts and configuration files needed for cardano node to work will be downloaded
62
+
63
+
#### 2: Compiling locally
64
+
65
+
For this case it is only necessary to add the `-b` option
66
+
67
+
`cvm init -b`
50
68
51
-
`cvm init testnet`
69
+
what happens now?
52
70
71
+
- Same steps as executed with `cvm init`
72
+
- Ghcup, Cabal and Ghc dependency is installed
73
+
- The libsecp256k1 library is installed (compiled locally)
74
+
75
+
#### If you want to configure the server for testnet just add `testnet` to the command
76
+
77
+
`cvm init testnet` | `cvm init -b testnet`
78
+
79
+
In this case, instead of downloading the configuration files for the mainnet, those corresponding to the testnet would be downloaded.
80
+
81
+
----
53
82
## Install cardano node
54
83
55
-
Build the version of cardano node passed by parameters, by default the latest version is built.
84
+
To install the cardano node binaries on the server we also have two options, it all depends on how you have prepared the server, to download the binaries or to compile them.
56
85
57
-
###build the x.x.x version
86
+
#### 1: Using the binary download (**Default**)
58
87
59
-
`
60
-
cvm install x.x.x
61
-
`
88
+
`cvm install x.x.x`
62
89
63
-
### build last version
90
+
what happens now?
64
91
65
-
`
66
-
cvm install
67
-
`
92
+
- The binaries corresponding to version x.x.x are downloaded if they exist from the page [Hydra](https://hydra.iohk.io/)
68
93
94
+
#### 2: Compiling locally
95
+
96
+
It is mandatory to prepare the server to compile cardano, otherwise this process would fail due to lack of dependencies.
97
+
98
+
`cvm install -b x.x.x`
99
+
100
+
what happens now?
101
+
102
+
- Changes corresponding to the x.x.x version of the [cardano-node](https://github.com/input-output-hk/cardano-node) repository are compiled locally
103
+
104
+
#### Extra!!
105
+
If we leave the version field blank, cvm will look for the latest release published by IOK.
106
+
107
+
`cvm install` o `cvm install -b`
108
+
109
+
---
69
110
## List install versions
70
111
71
112
List all version installed.
72
113
73
114
`
74
-
cvm list
115
+
cvm ls
75
116
`
76
-
or
77
-
`
78
-
cvm -l
79
-
`
80
-
117
+
---
81
118
## Use versions
82
119
83
-
Start using the version passed by parameters.
84
-
This command creates the relevant services for the operation of the cardano node
120
+
Point the cardano-node service to the version passed by parameters.
85
121
86
122
`
87
123
cvm use x.x.x
88
124
`
89
125
126
+
what happens now?
127
+
- The service is created, in case it does not exist or it is updated in case there are any updates.
128
+
- The new version is changed to the current folder where the cnode.services service points.
129
+
- The systemctl daemon is restarted.
130
+
131
+
---
90
132
## Remove version
91
133
Delete the specified version
92
134
93
135
`
94
136
cvm remove x.x.x
95
137
`
96
138
139
+
---
97
140
## Start or Stop node
98
141
99
142
To start or stop the cardano node use
143
+
100
144
`
101
145
cvm start
102
146
`
@@ -105,6 +149,11 @@ or
105
149
cvm stop
106
150
`
107
151
152
+
The start command does not set the cardano node service to start automatically, in case of a system reboot you will need to start it manually. If you want to set it to start automatically when the system boots run
153
+
154
+
`systemctl enable cnode.service`
155
+
156
+
---
108
157
## Update cvm
109
158
Update CLI to the latest version
110
159
@@ -118,14 +167,16 @@ If you want to force the update of all configuration files and scripts
118
167
cvm config update -f
119
168
`
120
169
170
+
---
121
171
## Clear cache
122
172
123
-
Clear cache files of cabal, ghc and cardano build
173
+
Clear cache files of cabal, ghc, cardano build and .cvm/tmp
0 commit comments