DECENTfoundation / DECENT-Network

Blockchain You Can Easily Build On
https://decent.ch/dcore
Other
110 stars 39 forks source link

No binaries, no docker files? #247

Closed jagottsicher closed 6 years ago

jagottsicher commented 6 years ago

compiling is unnessesary complicated, because it is hard to get an adequate environment. you have to setup several tools and compile them like cmake and libboost. This is slowing down the developement.

Why not provide a docker file for a working development enviroment to compile the node?

Also for major linux dists like ubutunu 16.04 it was easy to release precompiled binaries. Are there any?

see also #243

marian-decent-ch commented 6 years ago

Hello,

you could try first prototype of docker image: docker run -it -p 8090:8090 -p 9090:9090 decentnetwork/decentd decentd

More to come...

jagottsicher commented 6 years ago

Thanks, didn't work for me, my current server is to low-level to handle docker conatainer :-/

marian-decent-ch commented 6 years ago

Docker does not need anything special, it works even on Raspberry Pi (not x86 programs). Did you download and install docker? Try this procedure, please: sudo su curl -fsSL https://get.docker.com/ | sh

Or you can try deb package: https://github.com/marian-decent-ch/DevOps/releases/download/latest_decentd_deb/decentd-0.1.0-Linux-x64-master.deb

Then run: sudo dpkg -i decentd-0.1.0-Linux-x64-master.deb && sudo apt install -f && sudo dpkg -i decentd-0.1.0-Linux-x64-master.deb

You can use also blockchain snapshot from last week: https://github.com/marian-decent-ch/DevOps/releases/download/bs_180315_1835/blockchain_snapshot_180315_1935.tar.gz

If it does not work, past me the error please.

jagottsicher commented 6 years ago

I installed via curl, but have an access permission problem. also sudo isn't installed/configured, but I want to let decentd not run as root, but in the userspace. need to put the user in sudoer and then... I'll give it another try.

marian-decent-ch commented 6 years ago

Can you paste the error, maybe docker install script needs to be executable: chmod a+x getdocker.sh

when you add your user to docker group, you can run container from userspace

jagottsicher commented 6 years ago

feedback from the shell:

curl -fsSL https://get.docker.com/ | sh
# Executing docker install script, commit: 02d7c3c
+ sh -c apt-get update -qq >/dev/null
W: The repository 'http://ppa.launchpad.net/masterminds/glide/ubuntu xenial Release' does not have a Release file.
E: Failed to fetch http://ppa.launchpad.net/masterminds/glide/ubuntu/dists/xenial/main/binary-amd64/Packages  Cannot initiate the connection to ppa.launchpad.net:80 (91.189.95.83). - connect (105: No buffer space available)
E: Some index files failed to download. They have been ignored, or old ones used instead.

looks like problems to install glide (i added launchpad for another reason), but no idea why there should be no bufferspace. anyway still no docker.

jagottsicher commented 6 years ago

it looks like for compiling the source it is needed to have a very customized system, which makes it very special and hard to release some binaries for several platforms.

marian-decent-ch commented 6 years ago

It seems like you dont have proper DNS, internet setup. Try to ping 8.8.8.8 and that e.g. google.com. It has to work. Are you deploying it in VM or FM?

jagottsicher commented 6 years ago

DNS should be fine. It's an vps. teh script works only every other time and in between says couldn't connect to server. maybe really some misconfiguration hoster-sided. now it showed:

W: The repository 'http://ppa.launchpad.net/bitcoin/bitcoin/ubuntu xenial Release' does not have a Release file.
W: The repository 'http://ppa.launchpad.net/gophers/archive/ubuntu xenial Release' does not have a Release file.
E: The repository 'http://ppa.launchpad.net/masterminds/glide/ubuntu xenial Release' is no longer signed.
marian-decent-ch commented 6 years ago

You don't have a basic ubuntu installation. PPA's are other repositories that are maintained independently from us or ubuntu. I do recommend to deploy clean VM, or to edit/remove repositories from /etc/apt/apt.sources*.

This is not relevant to our product.

jagottsicher commented 6 years ago

What do you mean with "basic"? I installed ubuntu from the original sources and added some ppa for other stuff. I know what ppa are, but if you recommend to install on a clean ubuntu after installing the minimal image only than Decent is doomed never to work on a as a single service on a VM. on different machines I run varied self-compiled clients of bitcoind, zcash, ETH, Crave masternodes, Dash masternodes (!) and others experimental, but decent needs its own environment?

that's the reason I want to use docker! to start decent in a container.

So much effort to start a node and mine decent. That has already centralizing character. Just making it so complicated and put so tight requirements that onyl a handful people near the devs can run it?

marian-decent-ch commented 6 years ago

Hello,

sorry for misunderstanding, "basic" should have meant that it is after clean install. I do agree with you that Docker packaging is a future and it is exactly reflecting your scenario: various application, each of them using probably different version of a same library (boost). Besides, my statement remains: your problem is not relevant to any application as you have system level problem. You are not able to install Docker, I do recommend to start with that. Also, every design guide (deployment scenario) for docker is as lightweight as possible to mitigate your case.

I am trialing automated deployment script I will soon release on GitHub. As you already know, automated script work only on clean installs.

If you need further assistance do not hesitate to contact me.

marian-decent-ch commented 6 years ago

Please, report your complain regarding dev-grade building process as a new issue.

jagottsicher commented 6 years ago

No need to create an issue. I'll setup docker correctly on some other envoriment for different purposes anyway. Then it will be able to provide an adequate environment for running decentd.

Thinks it is my issue, not a decent one. :-) Thanks for your advice and support.

jagottsicher commented 6 years ago

Update: The docker container seems to be a good start. I installed Docker on a NAS (Synology), but behind firewall. anyway I git clone into the conatiner. Hope I can compile the code now.

marian-decent-ch commented 6 years ago

Do you need to compile? You can just run: docker run -it -p 8090:8090 -p 9090:9090 decentnetwork/decentd decentd

If you need to compile, be aware that at least 12-16gb ram is required.

jagottsicher commented 6 years ago

I used an out-of-the-box NAS with docker standard-installation from synlology (the NAS, not docker). I let the image run from hub.docker.com. Afterwards I forwared p 8090 and 9090 in/out the container and started it. with a console I ssh into the container, but nothing running, so I started decentd.

SUCCESS: decentd up and running. Guess it needs to download the whole blockchain first. stdout shows lots of:

`7ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 162671 - 162702                                    
554399ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["0002192a086ae788efdb887bd0aecdfeae53f035"]                 
554400ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 137514 - 137514                                    
554435ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["00022ad3e9673cc57aedd7c72647fb9604cb52bb"]                 
554435ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 142035 - 142035                                    
554446ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["00025981f6378ed3bfb35943e0521787988ff68f"]                 
554447ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 153985 - 153985                                    
554505ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["00023d7a837dde249a44a262d8980b1cba704f02"]                 
554505ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 146810 - 146810                                    
554542ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["00025981f6378ed3bfb35943e0521787988ff68f"]                 
554542ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 153985 - 153985                                    
554740ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["00025981f6378ed3bfb35943e0521787988ff68f"]                 
554740ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for blocks 153985 - 153985                                    
554797ms th_a       application.cpp:836           get_blockchain_synop ] synopsis: ["0002571195b30684a4d6d93fc4af267d1eb196a5"]                 
554797ms th_a       application.cpp:837           get_blockchain_synop ] synopsis for`

Does it look like properly working for you?

jagottsicher commented 6 years ago

@marian-decent-ch to make a long story short: your container works f**king awesome so far! Want to start staking as soon as possible!

jagottsicher commented 6 years ago

@all: Problem here was that docker didn't start the container, because the kernel-version was too low. docker itself already needs a kernel version >3, but many vps providers only support Ubuntu 14.04 and 16.04 as with a kernel version of 2.6...stable....

Docker can be installed, but the docker-daemon does not start.

Please use uname -r and make sure you have a kernel Version of 4.x before installing docker.