-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pip install -r requirements.txt Failed on Ubuntu 20.04 #16
Comments
Just a quick update : Python 3 does not work with OmniApi. Also, the documentation is not very clear... I needed to manualy add the logs folder and the websocket.log and apps.log but when I start the Api, I got the following error in the websocket.log :
What I am just trying to achieve is to have the api calls working, Do I need BTC-Armory for this ? |
Hello @ange-black69 |
Hello @achamely thanks you very much for your answer ! At first, I have cloned the omniCore project also, and followed the insctruction to make it. |
@ange-black69 However if all you need to do is pull info for your own use you might be able to stop after step 1. |
Hello @achamely thanks you for your help, Yea I just need to querry my own server because for my Master Project I need to analyse every Omni Transaction that appear in the BTC BlockChain and I need to have a really good throughput like 100 to 200 transactions / seconds if possible, without overheating the current api.omnixplorer.info |
@ange-black69 you wouldn't use the api, You'd just interact with omnicore's rpc commands natively: https://github.com/OmniLayer/omnicore/blob/master/src/omnicore/doc/rpc-api.md If you're going to be analyzing Omni Transactions you'll want to use a combination of Once your OC is fully synced, you can basically fire off your queries at it as fast as your machine can process them. You can either use some bash scripting to interact with the RPC via command line |
ok ! that seems way more clear for me ! EDITED : |
OmniApi is a web api interface that is used to serve up OmniLayer info from a database in a more reliable fashion for multiuse Omni enabled Products (Web Wallet, Block explorer etc..)
Not sure what you are asking exactly?
Then you need to setup the full stack of all the Omni Layer infrastructure components we mentioned previously (Omnicore, OmniEngine, Postgress Database, OmniApi)
OmniApi acts as an in-between interface to the data in OmniCore. OmniCore itself is not suited for/nor able to handle being queried directly by hundreds/thousands of people from a website. So the data is extracted from OmniCore by OmniEngine and stored in a postgress database, then OmniApi is able to query the data from postgress database and serve it up for public use.
yes,
This is the standard bitcoin.conf file in your data directory. OmniCore will, on first launch, create the data directory and default config file (on a linux machine this will be in ~/.bitcoin/ directory) so you can update/edit this config file after its created |
OK ! Thank you very very much it's really more clear for me right now ! |
In theory it should be possible to build for windows as its python based however I've only ever done it on linux so i have no idea what possible issues that may present |
@ange-black69 here's a complete guide for installation for omnilite (the litecoin version of omnicore) - just make sure to change these references and they should work. I tested with WSL2 running Ubuntu and on DO Ubuntu 20 LTS: WSL Ubuntu 20 LTS$ apt update
$ apt upgrade Install OmniLiteBuild or install OmniLite. Let it sync fully. Create litecoin config file: $ nano ~/.litecoin/litecoin.conf Use config as shown below. Replace rpcuser and rpcpass.
Install omniliteEngineomniliteEngine injects data into the postgresql db used by omni-api. Install python2 $ sudo apt install python2 Install pip2. $ curl https://bootstrap.pypa.io/pip/2.7/get-pip.py --output get-pip.py
$ sudo python2 get-pip.py
$ sudo apt install libcurl4-openssl-dev libssl-dev python-dev libpq-dev
Install postgresql. $ sudo apt install postgresql postgresql-contrib
$ sudo pg_ctlcluster 13 main start # start cluster using given output
$ sudo adduser omniliteengine
$ sudo usermod -aG sudo omniliteengine Add new user to psql: $ sudo - postgres
$ createuser --interactive --pwprompt # follow the prompt. y to superuser
$ createdb root # replace root with username/account name
$ exit Add postgresql config: $ mkdir ~/.omni
$ nano ~/.omni/sql.conf
sqluser=omniliteengine
sqlport=5432
sqlconnect=localhost
sqldatabase=omniwallet
sqlpassword=poopybutthole Install Redis: $ sudo apt install redis-server
$ sudo nano /etc/redis/redis.conf
supervised systemd # replace replace to use systemd
$ sudo systemctl restart redis.service Test Redis $ sudo service redis-server status
● redis-server.service - Advanced key-value store
Loaded: loaded (/lib/systemd/system/redis-server.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-29 01:25:04 UTC; 3s ago
$ redis-cli
127.0.0.1:6379> ping
PONG # expected response if everything is working
127.0.0.1:6379> exit Clone & setup omniliteEngine. $ git clone https://github.com/OmniLite/omniliteEngine.git
$ cd omniliteEngine
$ pip2 install python-crontab
$ pip2 install -r requirements.txt
$ cd database/scripts
# export db username/passwords etc.
# replace passwords
$ OMNIDB_DATABASE=omniwallet OMNIDB_ENGINE_USER=omniliteengine OMNIDB_ENGINE_PASSWORD=poopybutthole OMNIDB_WWW_USER=omniwww OMNIDB_WWW_PASSWORD=poopybutthole ./db-init.sh
$ cd ../../ Test everything is working... $ cd ~/omniliteEngine/
$ python omniEngine.py If you see lots and lots of text going across, populating the DB, then you're ready to continue. Next setup OmniEngine as a cronjob. $ cd ~/install/
$ python installOmniEngineCronJob.py
Adding job.
Writing job:
* * * * * python /root/omniliteEngine/omniEngine.py >> /root/omniliteEngine/logs/omniEngine.log Install omniliteapi$ git clone https://github.com/OmniLite/omniliteapi.git
$ cd omniliteapi
$ sudo apt-get install libpq-dev
$ pip install -r requirements.txt Copy $ cp api/config.py.example api/config.py
$ nano api/config.py Copy $ mkdir ~/.litecoin
$ mkdir ~/.omni
$ cp /root/.litecoin/litecoin.conf ~/
$ cp /root/.omni/sql.conf ~/ Setup Nginx$ cd ~/
$ sudo apt install nginx
$ sudo service nginx status
● nginx.service - A high performance web server and a reverse proxy server
Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled)
Active: active (running) since Thu 2021-07-29 01:56:05 UTC; 37s ago
$ sudo rm /etc/nginx/sites-available/default
// loshan copy and modify from repo instead of this
$ sudo nano /etc/nginx/sites-available/default $ apt install nginx
$ ufw allow 'Nginx Full'
$ systemctl status nginx |
Hello,
I am struggling to compile the omni api from source.
My goal is to have the API hosted in my own server that way it can serve easily my requests.
I have cloned the depo as usual and followed the install instruction, however, at the pip install requirements, I got the Following errors either for psycopg2 and gevent :
I managed to find the issues :
-> changed the version of psycopg2 from 2.x to 2.8.6
-> changed the version of gevent from 1.2.. to 21.2.2
Seems that the version not supported by python 3.8 !
Ubuntu 20.04 : kernel 5.8.0
Python 3.8
The text was updated successfully, but these errors were encountered: