Enable must be the last one, so all rules will be added and firewall enabled.
reboot
The set up for this server is as follows.
2x 512GB - configured in RAID 1 (Mirror) - they contain operating system and if one fails second will handle OS operations
2x 1.92TB - unconfigured. we are about to crate partitions on them and configure those disks for auto-mount
Our usual configured set up is to create /mnt folder so I would suggest we go with
/mnt/vol1 /mnt/vol2
but first let's partition them
fdisk /dev/nvme2n1nP1ENTERENTERw
repeat steps for fdisk /dev/nvme3n1
What we did on those disks... partition defines amount of space on disk dedicated for single file system... we created partition that covers whole disk space on each of 2 disks
now it is time to make this space usable - format disk with file system
///add user to sudousermod -aG sudo <username>su - comdexnano .profile///add these lines to the end of the .profile # add environmental variables for Goif [ -f "/usr/local/go/bin/go" ] ; thenexportGOROOT=/usr/local/goexportGOPATH=${HOME}/goexportGOBIN=$GOPATH/binexportPATH=${PATH}:${GOROOT}/bin:${GOBIN}fi///to savecmd x enter
Lets see whats in home
ls-l/home
Prepare for Chain build
move /home/comdex folder to data volume
create link in /home to data volume
change context to comdex user
build cosmovisor
build comdex binaries
move folder
///move folder to mount storagemv /home/comdex /mnt/vol1///create s-linkln -s /mnt/vol1/comdex /home/comdex///see if link was created ls -l /home///log into usersu - comdex///check to see if GO env variables are goodgo version///back to rootctrl-d
Tooling
apt install build-essential git gcc make///log back in to user
Deploy cosmovisor
Cosmovisor build
cd ${HOME}git clone <https://github.com/cosmos/cosmos-sdk> && cd cosmos-sdk/cosmovisor/make///we make the correct folders mkdir -p ${HOME}/.comdex/cosmovisor/genesis/bin
///find the visor binarysudo find /-name cosmovisor///make directory for visor to livemkdir -p ${HOME}/.local/bin///place visor binary in new locationcp cosmovisor ${HOME}/.local/bin///check to see if its there ls ${HOME}/.local/bin
///Check to see if its in bin..ls ${HOME}/.local/bin
(FOR COMDEX ONLY)
follow repo and up grade to .4
cd ${HOME}/comdexgit fetch --tagsgit checkout v0.0.4make install///initialise the nodecomdex init "{{NODE_NAME}}"--chain-id comdex-1
Cosmovisor prep
///locate binaryls -l ${HOME}/go/bin///mv to cosmosvisor genesis dircp ${HOME}/go/bin/binary ${HOME}/.chain/cosmovisor/genesis/bin
Now it's time to place proper genesis in config folder, so node will be in proper chain
///Add to shellPEERS="$(curl -s "<https://raw.githubusercontent.com/KiFoundation/ki-networks/v0.1/Testnet/kichain-t-4/peers.txt")">///Run the command to impletment to config.tomlsed -i.bak -e "s/^persistent_peers *=.*/persistent_peers = \\"$PEERS\\"/" $HOME/.kid/config/config.tom
Checkout our state-sync intructions by following here.
Ports
in this section we show you a way on running multiple nodes on one server. This not configured properly can cause some flakey behaviour between chains. We reccomened you have a port system for each of you nodes. Here is an example below.
cd ${HOME}/.comdex/config
At the moment we have default ports in configuration. We need to change this as there will be more nodes on same server. We will add and increment of 100 to each port value refer to an excell sheet and run config command by adding 10 to it .
So while you are in ./comdex/config we can then roll all changes
Unit]Description=Comdex Backup Node (Cosmovisor)After=network-online.target[Service]User=comdexGroup=comdexExecStart=/home/user/.local/bin/cosmovisor run startRestart=alwaysRestartSec=3LimitNOFILE=4096Environment="DAEMON_NAME=comdex"Environment="DAEMON_HOME=/home/comdex/.comdex"Environment="DAEMON_ALLOW_DOWNLOAD_BINARIES=false"Environment="DAEMON_RESTART_AFTER_UPGRADE=true"Environment="DAEMON_LOG_BUFFER_SIZE=512"///we skip back ups on main validators just so we get back online faster. ///When it comes to our back-up servers this is where we do take a snapshot ///after any upgrades, incase we need to roll back.Environment="UNSAFE_SKIP_BACKUP=false"[Install]WantedBy=multi-user.target