Installation instructions and problem solutions for @yabamatt's new price feed publisher

in #witness-category6 years ago (edited)

Capture.PNG
Source

OK, I lied yesterday when I published my last witness update. I claimed I would wait until I upgraded my server to 64GB before trying out @yabapmatt's new price feed publishing tool. Maintaining an up to date price feed is one of the obligations for a witness and, like most witnesses, I have been using steemfeed-js. Unfortunately this week I have experienced problems with it failing to update regularly. This happened again this morning - GINAbot notifies me if it hasn't updated.

So, I bit the bullet and attempted to set up the new publishing tool, following the instructions given on Github. Unfortunately it didn't work, so I got in touch with @yabapmatt and we quickly discovered the problem - I wasn't installing npm in the correct directory. The instructions have since been updated, but for reference here is how I set it up.

I didn't have nodejs or npm set up, so had to install them. In my root directory I did the following:

sudo apt-get update
curl -sL https://deb.nodesource.com/setup_9.x | sudo -E bash -
sudo apt-get install -y nodejs

Once nodejs was installed, I got the following message:

## Run apt-get install nodejs (as root) to install Node.js v9.x and npm

So, still in root, I did:

apt-get install nodejs

instead of:

sudo apt-get install npm

as I kept getting errors with unmet dependencies. That installed fine so I continued with:

sudo apt-get install nodejs-legacy

Again, this was fine, so I continued with the given instructions.

git clone https://github.com/MattyIce/pricefeed.git pricefeed

Next I changed directory:

cd pricefeed

and then

npm install

This time it worked, so I carried on with:

npm install pm2 -g

Next I edited the config file by typing

nano config.json

and adding my witness name and private active key. I then started the feed with:

pm2 start feed.js

and finally ran the log feed.

pm2 logs feed

Capture.PNG
Much Success!

I then removed steemfeed-js.

As you can see, it has published my price feed for the past four hours without fail. There is also the piece of mind that if one node fails, the tool will fall back to the next one in the list to use, rather than simply stop working.

Thanks @yabapmatt for this new tool and for your assistance earlier today. People, please do as I do and vote for his witness.



gmuxxxx.png
Banner by @hoschitrooper


Like what I do? Vote for my witness by clicking THIS LINK. Thanks for your support.

Are you a writer or keen to learn? Do you wish to join a community of like-minded individuals who can help hone your writing skills in the fields of fiction, non-fiction, technical, poetry, or songwriting? Join us at The Writers' Block by clicking the logo below.

Sort:  

You are top notch. A cut above the rest. You sir, are a bonus to the organization. Carry on. F4F

Eek! v4v?

I did have a good mentor Sir.

So, mind me asking, what does this mean in layman terms? haha :D

A price feed is basically the SBD to Steem ratio and the Steem blockchain uses it to calculate how many SBD your author rewards are worth. It's also used determine the $ USD shown in your wallet.

Cool so it's also resposible for the new SBD & SP preview on each post? Very helpful :D

Coin Marketplace

STEEM 0.30
TRX 0.12
JST 0.033
BTC 63897.91
ETH 3131.06
USDT 1.00
SBD 3.87