This document describes the test plan for Harmony's package release using standard packaging system, RPM and Deb packages.
Standard packaging system has many benefits, like extensive tooling, documentation, portability, and complete design to handle different situation.
The RPM/Deb packages will install the following files/binary in your system.
- /usr/sbin/harmony
- /usr/sbin/harmony-setup.sh
- /usr/sbin/harmony-rclone.sh
- /etc/harmony/harmony.conf
- /etc/harmony/rclone.conf
- /etc/systemd/system/harmony.service
- /etc/sysctl.d/99-harmony.conf
The package will create harmony
group and harmony
user on your system.
The harmony process will be run as harmony
user.
The default blockchain DBs are stored in /home/harmony/harmony_db_?
directory.
The configuration of harmony process is in /etc/harmony/harmony.conf
.
Please take sometime to learn about the rpm
/dpkg
commands used on Redhat/Debian based distributions.
There are many other package managers can be used to manage rpm/deb packages like [Apt]https://en.wikipedia.org/wiki/APT_(software), or [Yum]https://www.redhat.com/sysadmin/how-manage-packages
You just need to do the setup of testing harmony repo once on a new host. Noted: those repo are for development/testing purpose only. Official production repo will be different.
RPM is supported on Redhat, Fedora, Amazon Linux distributions.
# do the following once to add the development repo
curl -LsSf http://haochen-harmony-pub.s3.amazonaws.com/pub/yum/harmony-dev.repo | sudo tee -a /etc/yum.repos.d/harmony-dev.repo
sudo rpm --import https://raw.githubusercontent.com/harmony-one/harmony-open/master/harmony-release/harmony-pub.key
Deb is supported on Debian, Ubuntu Linux distributionis.
# do the following once to add the development repo
curl -LsSf https://raw.githubusercontent.com/harmony-one/harmony-open/master/harmony-release/harmony-pub.key | sudo apt-key add
echo "deb http://haochen-harmony-pub.s3.amazonaws.com/pub/repo bionic main" | sudo tee -a /etc/apt/sources.list
# debian/ubuntu: latest version
sudo apt-get update
sudo apt-get install harmony
# fedora/amazon linux: latest version
sudo yum install harmony
# debian/ubuntu
# list all versions
apt-cache madison harmony
# install specific version
sudo apt-get install harmony=2.3.4-37
# fedora/amazon linux
# list all versions:
yum --showduplicates list harmony
# install specific version
sudo yum install harmony-2.3.4-37
# dpkg-reconfigure harmony (TODO)
sudo systemctl start harmony
# debian/ubuntu
sudo apt-get remove harmony
# fedora/amazon linux
sudo yum remove harmony
# debian/ubuntu
sudo apt-get update
sudo apt-get upgrade
# fedora/amazon linux
sudo yum update --refresh
remove and install
# debian/ubuntu
curl -LO https://downloads.rclone.org/v1.52.3/rclone-v1.52.3-linux-amd64.deb
sudo dpkg -i rclone-v1.52.3-linux-amd64.deb
# fedora/amazon linux
curl -LO https://downloads.rclone.org/v1.52.3/rclone-v1.52.3-linux-amd64.rpm
sudo rpm -ivh rclone-v1.52.3-linux-amd64.rpm
# validator runs on shard1
sudo -u harmony harmony-rclone.sh /home/harmony 0
sudo -u harmony harmony-rclone.sh /home/harmony 1
# explorer node
sudo -u harmony harmony-rclone.sh -a /home/harmony 0
To setup an explorer node (non-validating) node, please run the harmony-setup.sh
at first.
sudo /usr/sbin/harmony-setup.sh -t explorer -s 0
to setup the node as an explorer node w/o blskey setup.
Please copy your blskey to /home/harmony/.hmy/blskeys
directory, and start the node.
The default configuration is for validators on mainnet. No need to run harmony-setup.sh
script.
systemctl start harmony
to start nodesystemctl stop harmony
to stop nodesystemctl status harmony
to check status of node
The node configuration file is in /etc/harmony/harmony.conf
. Please edit the file as you needed.
sudo vim /etc/harmony/harmony.conf
Please leave your comments here or added to the github issue. harmony-one/harmony#3305
that was already a brand new node i was testing.