Skip to content

orelvis15/cvm

Repository files navigation

CVM - Cardano Version Manager


Sponsor ❤️

If you want to support the development of CVM you can sponsor by delegating in my pool PoolID: pool1wwqqcyr7nu045pnjsaajrxuw3aq45cqxz0jj349w8ttxjh7n5n9


Version Management System for Cardano Pools.

This CLI is implemented based on the scripts generated by the community, with the aim of facilitating a little more the management of changes between versions of cardano node.

Documentation to get started in the tool

Support

  • 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).

  • Compilation support is provided by CVM, compilation is done on the local server, we are working on supporting RedHat based versions.

    OS Download Build
    Ubuntu Yes Yes
    Debian Yes Yes
    Debian Yes Yes
    Mint Yes Not tested
    RedHat - Not tested
    Fedora - Not tested
    Rasbian - Not tested

Install CVM Release

curl https://raw.githubusercontent.com/orelvis15/cvm/master/install.sh -sSf | bash && source "$HOME"/.cvm/env

Install CVM Debug

curl https://raw.githubusercontent.com/orelvis15/cvm/master/install.sh -sSf | bash -s -- debug && source "$HOME"/.cvm/env

Starting

To start running the cardano node we need to decide how we want to manage the node versions.

We have two options

  • Download the executables published by IOK
  • Compile cardano locally

Prepare Pool

Prepare the server to be able to run cardano-node.

1: Using the binary download (Default)

This is the default option, we just need to run:

cvm init

what happens now?

  • It will be verified that the user has write permissions in the /opt directory
  • All necessary dependencies will be installed
  • The project folder structure will be created in /opt/cardano
  • All scripts and configuration files needed for cardano node to work will be downloaded

2: Compiling locally

For this case it is only necessary to add the -b option

cvm init -b

what happens now?

  • Same steps as executed with cvm init
  • Ghcup, Cabal and Ghc dependency is installed
  • The libsecp256k1 library is installed (compiled locally)

If you want to configure the server for testnet just add testnet to the command

cvm init testnet | cvm init -b testnet

In this case, instead of downloading the configuration files for the mainnet, those corresponding to the testnet would be downloaded.


Install cardano node

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.

1: Using the binary download (Default)

cvm install x.x.x

what happens now?

  • The binaries corresponding to version x.x.x are downloaded if they exist from the page Hydra

2: Compiling locally

It is mandatory to prepare the server to compile cardano, otherwise this process would fail due to lack of dependencies.

cvm install -b x.x.x

what happens now?

  • Changes corresponding to the x.x.x version of the cardano-node repository are compiled locally

Extra!!

If we leave the version field blank, cvm will look for the latest release published by IOK.

cvm install o cvm install -b


List install versions

List all version installed.

cvm ls

Use versions

Point the cardano-node service to the version passed by parameters.

cvm use x.x.x

what happens now?

  • The service is created, in case it does not exist or it is updated in case there are any updates.
  • The new version is changed to the current folder where the cnode.services service points.
  • The systemctl daemon is restarted.

Remove version

Delete the specified version

cvm remove x.x.x


Start or Stop node

To start or stop the cardano node use

cvm start or cvm stop

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

systemctl enable cnode.service


Update cvm

Update CLI to the latest version

cvm update

If you want to force the update of all configuration files and scripts

cvm config update -f


Clear cache

Clear cache files of cabal, ghc, cardano build and .cvm/tmp

cvm clean


More info and community

Acknowledgment