symbol-bootstrap icon indicating copy to clipboard operation
symbol-bootstrap copied to clipboard

Allow Raspberrypi deployments

Open takahirodesu opened this issue 4 years ago • 4 comments

Is your feature request related to a problem? Please describe. When I would deploy bootstrap in Raspberrypi, This happens error after pulling image.

Describe the solution you'd like I would like to have a wonderful experience on Rasberrypi.

Describe alternatives you've considered I tried to rewrite the preset yml file, but the docker image file did not support it.

Additional context

2020-10-10T17:33:56.541Z 32minfo 39m [SYSTEM_LOG]     Running image using Exec: symbolplatform/symbol-server:tools-gcc-0.10.0.3 bash createCertificate.sh
    Error: Command failed: docker run --rm -u 0:0 --workdir=/data --env 
    LD_LIBRARY_PATH=/usr/catapult/lib:/usr/catapult/deps -v /opt/symbol-bootst
    rap/target/nodes/api-node/userconfig/resources/cert:/data:rw 
    symbolplatform/symbol-server:tools-gcc-0.10.0.3 "bash" 
    "createCertificate.sh"
    standard_init_linux.go:211: exec user process caused "exec format error"

    Code: 1

Pull Requests are considered!

takahirodesu avatar Oct 11 '20 04:10 takahirodesu

I think this is a question - build and compile for Docker. We have compiled from source for Raspberry PAY4 4GB. Works. We are testing.

PT ELEM TOT : 0 | PT WRITERS : 0 | RB COMMIT ALL : 0 | RB COMMIT RCT : 0 | RB IGNORE ALL : 0 | RB IGNORE RCT : 0 | READERS : 1 | SECRETLOCK C : 0 | SUCCESS PINGS : 0 | TASKS : 18 | TOT CONF TXES : 33 | TOTAL PINGS : 0 | TS NODE AGE : 6 | TS OFFSET ABS : 0 | TS OFFSET DIR : 0 | TS TOTAL REQ : 0 | TX ELEM ACT : 0 | TX ELEM TOT : 0 | UNLKED ACCTS : 1 | UT CACHE : 0 | WRITERS : 0 | 2020-11-19 23:27:13.807972 0x0000ffff9c0441c0: (health::main.cpp@178) api-node-0 @ 127.0.0.1:7900 ACCTREST C : 0 | ACNTST C : 26 | ACNTST C HVA : 11 | ACTIVE PINGS : 0 | BAN ACT : 0 | BAN ALL : 0 | BLK ELEM ACT : 0 | BLK ELEM TOT : 50 | BLKDIF C : 51 | FIN CUR EST : 36 | FIN MAX EPOCH : 2 | FIN MAX POINT : 6 | FIN MIN EPOCH : 2 | FIN MIN POINT : 1 | FIN PREV EST : 36 | FIN WRITERS : 0 | HASH C : 0 | HASHLOCK C : 0 | MEM CUR RSS : 69 | MEM CUR VIRT : 2'370 | MEM MAX RSS : 69 | MEM SHR RSS : 38 | METADATA C : 0 | MOSAIC C : 2 | MOSAICREST C : 0 | MULTISIG C : 0 | NODES : 1 | NS C : 1 | NS C AS : 3 | NS C DS : 3 | PT CACHE : 0 | PT ELEM ACT : 0 | PT ELEM TOT : 0 | PT WRITERS : 0 | RB COMMIT ALL : 0 | RB COMMIT RCT : 0 | RB IGNORE ALL : 0 | RB IGNORE RCT : 0 | READERS : 1 | SECRETLOCK C : 0 | SUCCESS PINGS : 0 | TASKS : 18 | TOT CONF TXES : 33 | TOTAL PINGS : 0 | TS NODE AGE : 6 | TS OFFSET ABS : 0 | TS OFFSET DIR : 0 | TS TOTAL REQ : 0 | TX ELEM ACT : 0 | TX ELEM TOT : 0 | UNLKED ACCTS : 1 | UT CACHE : 0 | WRITERS : 0 | 2020-11-19 23:27:13.808060 0x0000ffff9c0441c0: (health::main.cpp@186) --- SUMMARY for known peers --- 2020-11-19 23:27:13.808109 0x0000ffff9c0441c0: (health::main.cpp@144) api-node-0 @ 127.0.0.1:7900 [API] at height 51 (11 finalized) with score 1851119453627615 2020-11-19 23:27:13.808153 0x0000ffff9c0441c0: (health::main.cpp@144) api-node-0 @ 127.0.0.1:7900 [API] at height 51 (11 finalized) with score 1851119453627615 2020-11-19 23:27:13.808231 0x0000ffff9c04aa80: (thread::IoThreadPool.cpp@111) waiting for 1 thread pool threads to exit 2020-11-19 23:27:13.808254 0x0000ffff9c0441c0: (ionet::PacketSocket.cpp@512) socket close triggered by destruction (0000000000000002), 13ms elapsed 2020-11-19 23:27:13.808917 0x0000ffff9c04aa80: (thread::IoThreadPool.cpp@113) all thread pool threads exited root@ubuntu:~/catapult-server/_build/bin# ./catapult.tools.benchmark Benchmark Tool Copyright (c) Jaguar0625, gimre, BloodyRookie, Tech Bureau, Corp. catapult version: 0.10.0.4 2e7c30da [main]

Benchmark Tool Initializing Logging...

2020-11-19 23:27:26.093401 0x0000ffffb9f48440: (benchmark::main.cpp@63) num threads (4), num partitions (4), ops / partition (1000), data size (148) 2020-11-19 23:27:26.094619 0x0000ffffb9f48440: (thread::IoThreadPool.cpp@104) spawned 4 workers 2020-11-19 23:27:26.094707 0x0000ffffb9f48440: (benchmark::main.cpp@73) num operations (4000) 2020-11-19 23:27:26.094755 0x0000ffffb9f48440: (utils::StackLogger.h@36) pushing scope 'Data Generation' 2020-11-19 23:27:26.218149 0x0000ffffb9f48440: (benchmark::main.cpp@110) 32520 ops/s (elapsed time 123ms, 30us/op) 2020-11-19 23:27:26.218279 0x0000ffffb9f48440: (utils::StackLogger.h@42) popping scope 'Data Generation' (123ms) 2020-11-19 23:27:26.218323 0x0000ffffb9f48440: (utils::StackLogger.h@36) pushing scope 'Signature' 2020-11-19 23:27:26.321675 0x0000ffffb9f48440: (benchmark::main.cpp@110) 38834 ops/s (elapsed time 103ms, 25us/op) 2020-11-19 23:27:26.321792 0x0000ffffb9f48440: (utils::StackLogger.h@42) popping scope 'Signature' (103ms) 2020-11-19 23:27:26.321837 0x0000ffffb9f48440: (utils::StackLogger.h@36) pushing scope 'Verify' 2020-11-19 23:27:26.882532 0x0000ffffb9f48440: (benchmark::main.cpp@110) 7142 ops/s (elapsed time 560ms, 140us/op) 2020-11-19 23:27:26.882636 0x0000ffffb9f48440: (utils::StackLogger.h@42) popping scope 'Verify' (560ms) 2020-11-19 23:27:26.882678 0x0000ffffb9f48440: (thread::IoThreadPool.cpp@111) waiting for 4 thread pool threads to exit 2020-11-19 23:27:26.883028 0x0000ffffb9f48440: (thread::IoThreadPool.cpp@113) all thread pool threads exited root@ubuntu:~/catapult-server/_build/bin# cat /proc/cpuinfo | grep 'Model' | uniq && arch && lscpu | grep 'Model name' | uniq

Model : Raspberry Pi 4 Model B Rev 1.1 aarch64 Model name: Cortex-A72 root@ubuntu:~/catapult-server/_build/bin#

Upd: OS Ubuntu 20.04 GCC-10.2

Vladimir7280 avatar Nov 19 '20 23:11 Vladimir7280

Hi team, thank you for raising this issue and I'm sorry for the delay in the responses.

I would like to add support for Raspberrypi but I'm not experienced enough yet and I don't have time atm. I'll have more time after the symbol release.

Any information you provide would be appreciated.

Are you planning to run docker/docker-compose inside the Pi box? Or is it better to run catapult server directly in the Pi box (from barebone)?

What could happen is that you have a dev machine where you do the symbol-bootstrap config setup, once you have the configuration you want it could be possible to push the configuration/target folder into a Pi box. The Pi could run catapult server from the binaries

  1. Dev could compile server on the PI box.
  2. Dev could compile on the dev box and copy it over to the PI box.
  3. Having a Pi ready pre-compiled catapult server on an artifact repository like Conan to pull binaries from.

Once we have designed a solution, bootstrap could add commands to push the configuration and/or binaries into a remote box (like PI). Bootstrap can configure the path where the binaries and extensions are loaded from.

In my mind, one PI box would run one node (probably only peer), it won't run rest or multiples nodes/databases like with regular bootstrap compose.

@CrackTheCode016 @Jaguar0625 any input is appreciated

fboucquez avatar Nov 20 '20 14:11 fboucquez

Ideally, we would have images for ARM ready out of the box, via something like the snap store (a common method of retrieving packages in the IoT space). The other option is to use conan to compile for the Pi, and as Fernando said, push those images to be run to the Pi. I'm thinking something like ngnix, where the config files live somewhere like /etc/symbol and the binaries use those to run.

It is also possible to run a full, dual node on the Pi, with Mongo and REST as well. However, Mongo tends to be memory hungry, so the 8GB version of the Pi should work the best in this case. I do not think docker should be used in this case, mostly for its lack of ARM support and potential instability.

CrackTheCode016 avatar Nov 23 '20 14:11 CrackTheCode016

Run it stably on raspberrypi, so I think the build method is good. I want a procedure to connect to a public-test or public network in the case of build.

I built a catapult server based on the URL below, but it has not reached normal operation and I feel that the settings are missing. https://github.com/nemtech/catapult-server/blob/main/docs/RUNNETWORKLIN.md

takahirodesu avatar Feb 27 '21 17:02 takahirodesu