Backup Server

Configuring backup server to run multiple nodes nodes

So from a dedicated service provider you can rent a rescue image and here is how you can set up ubuntu OS on to the system.

installimage

  1. once you select ubuntu there will be blue screen with some disk configs this is important .. we have to make some changes there

  2. select ubuntu 2004 3rd one

Touchbar on mac click on server window, fn then f2 save then f10 exit.

Continue with YES. Once system will be deployed you can see with

If you need to re-do ssh key you need to remove the IP of server the known host from known_hosts so it can write the server again

nano /users/local/.ssh/known_hosts

input SSH password again

Log back in to Service, should now see the hostname implemented

Update system

install Firewall

Now configure some basic rules to allow only ssh and outgoing traffic.

Enable must be the last one, so all rules will be added and firewall enabled.

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

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

at the moment you will not see those 2TB disks yet

Once you have folders created then we can mount volumes

Check they are mounted

We need to make sure that linux will mount them each time it will start

Add few lines to etc/fstab

What we have did so far.

  1. Installed custom ubuntu 20.04

  2. Created RAID1 volume (Mirror) for operating system during installation (2x 512GB)

  3. Once operating system ready partitions were created on 2TB disks (fdisk)

  4. Partitions were formatted then with ext4 filesystem (mkfs.ext4)

  5. Newly created partitions mounted in /mnt/volX

  6. Both new partitions added to /etc/fstab, so they will be automatically mounted when system starts

once system is back you can check if partitions are mounted with

Update box.

Install GO

Lets see whats in home

Prepare for Chain build

  1. move /home/comdex folder to data volume

  2. create link in /home to data volume

  3. change context to comdex user

  4. build cosmovisor

  5. build comdex binaries

move folder

Tooling

Deploy cosmovisor

  1. Cosmovisor build

Get the binary in place

2. Cosmovisor binaries

mv cosmovisor to it's destination folder

(FOR COMDEX ONLY)

follow repo and up grade to .4

Cosmovisor prep

Now it's time to place proper genesis in config folder, so node will be in proper chain

Peers & Seeds

add peers & seeds from instructions

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.

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

You can check all ports and which process uses which port

Summary

  1. home folder moved

  2. cosmovisor built

  3. binaries built and placed

  4. config adjusted for statesync

  5. config adusted with new port numbers

What's left?

  1. define service

  2. Spin this bitch !!!

Service file

and then we define service

Once chain is syncd make sure storage is evenly spread

How to show running services

Last updated