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

DietPi-Software | Add installation option for Open Bazaar #333

Closed
Fourdee opened this Issue May 13, 2016 · 18 comments

Comments

2 participants
@Fourdee
Owner

Fourdee commented May 13, 2016

Implemented by @swordfish6975
References: #318

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 13, 2016

Owner

Merged: #336

Add:

  • dietpi.txt automation entry
  • dietpi-uninstall entry
  • apt-get install software-properties-common for add-apt-repository
  • --depth 1 to git commands. Reduces size and quantity of downloaded data/files.

Remove:

  • Wheezy entry

Change:

  • Description: Decentralized network for p2p commerce using Bitcoin?
  • Category: Social Media instead of Cloud/Backups ?
  • make -j 4 to make -j "$(nproc --all)" (total cores on system)

Test C2:

  • ppa:chris-lea/libsodium missing arm64.
W: Failed to fetch http://ppa.launchpad.net/chris-lea/libsodium/ubuntu/dists/jessie/main/binary-arm64/Packages  404  Not Found
  • Libzmo fails to compile on arm64
root@DietPi:~/libzmq# ./autogen.sh && ./configure && make -j 4
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config -I config --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
autogen.sh: error: autoreconf exited with status 0
Owner

Fourdee commented May 13, 2016

Merged: #336

Add:

  • dietpi.txt automation entry
  • dietpi-uninstall entry
  • apt-get install software-properties-common for add-apt-repository
  • --depth 1 to git commands. Reduces size and quantity of downloaded data/files.

Remove:

  • Wheezy entry

Change:

  • Description: Decentralized network for p2p commerce using Bitcoin?
  • Category: Social Media instead of Cloud/Backups ?
  • make -j 4 to make -j "$(nproc --all)" (total cores on system)

Test C2:

  • ppa:chris-lea/libsodium missing arm64.
W: Failed to fetch http://ppa.launchpad.net/chris-lea/libsodium/ubuntu/dists/jessie/main/binary-arm64/Packages  404  Not Found
  • Libzmo fails to compile on arm64
root@DietPi:~/libzmq# ./autogen.sh && ./configure && make -j 4
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I config -I config --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory
autogen.sh: error: autoreconf exited with status 0
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 13, 2016

Owner

note to self:

  • RPi install was fine
  • lib-sodium using Jessie repo was fine
            #Not required.
            #AGI software-properties-common
            #add-apt-repository -y ppa:chris-lea/libsodium
            #apt-get update
  • Give OpenBazaar a test (currently installed on RPI v3 eth (2)) .105
  • Update online documentation
  • Resolve or remove C2.
Owner

Fourdee commented May 13, 2016

note to self:

  • RPi install was fine
  • lib-sodium using Jessie repo was fine
            #Not required.
            #AGI software-properties-common
            #add-apt-repository -y ppa:chris-lea/libsodium
            #apt-get update
  • Give OpenBazaar a test (currently installed on RPI v3 eth (2)) .105
  • Update online documentation
  • Resolve or remove C2.
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 14, 2016

Owner

@swordfish6975

ob.conf
Set the username and password

To what? :) Documentation is a little "light": https://github.com/OpenBazaar/OpenBazaar-Server

Owner

Fourdee commented May 14, 2016

@swordfish6975

ob.conf
Set the username and password

To what? :) Documentation is a little "light": https://github.com/OpenBazaar/OpenBazaar-Server

@swordfish6975

This comment has been minimized.

Show comment
Hide comment
@swordfish6975

swordfish6975 May 14, 2016

Contributor

Whatever you would like to enter in the client to connect with, preferably a very long password like a GUID.

The risk to the user is someone getting in to there shop and listing stuff for sale and pocketing the money.

Contributor

swordfish6975 commented May 14, 2016

Whatever you would like to enter in the client to connect with, preferably a very long password like a GUID.

The risk to the user is someone getting in to there shop and listing stuff for sale and pocketing the money.

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 14, 2016

Owner

@swordfish6975
Thanking you 👍 . So just to confirm, the username/password can be anything. Its only purpose is to prevent the server being abused?

I installed the OpenBazaar client:

  • Is there any way to specifically connect/test our OpenBazaar server with it?
  • Or assuming there are no error logs in with python openbazaard.py start -d -a 0.0.0.0 can I assume the server is fully functional and thats all that needs to be done?
Owner

Fourdee commented May 14, 2016

@swordfish6975
Thanking you 👍 . So just to confirm, the username/password can be anything. Its only purpose is to prevent the server being abused?

I installed the OpenBazaar client:

  • Is there any way to specifically connect/test our OpenBazaar server with it?
  • Or assuming there are no error logs in with python openbazaard.py start -d -a 0.0.0.0 can I assume the server is fully functional and thats all that needs to be done?
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 14, 2016

Owner

Service notes:

Start:

python openbazaard.py start -d -a 0.0.0.0

Stop:

kill $(cat /tmp/openbazaard.pid)
#rm /tmp/openbazaard.pid #OpenBazaar does this during shutdown.
Owner

Fourdee commented May 14, 2016

Service notes:

Start:

python openbazaard.py start -d -a 0.0.0.0

Stop:

kill $(cat /tmp/openbazaard.pid)
#rm /tmp/openbazaard.pid #OpenBazaar does this during shutdown.
@swordfish6975

This comment has been minimized.

Show comment
Hide comment
@swordfish6975

swordfish6975 May 14, 2016

Contributor

python openbazaard.py stop
On 15 May 2016 12:08 AM, "Dan" notifications@github.com wrote:

Service notes:

Start:

python openbazaard.py start -d -a 0.0.0.0

Stop:

kill $(cat /tmp/openbazaard.pid)
#rm /tmp/openbazaard.pid #OpenBazaar does this during shutdown.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#333 (comment)

Contributor

swordfish6975 commented May 14, 2016

python openbazaard.py stop
On 15 May 2016 12:08 AM, "Dan" notifications@github.com wrote:

Service notes:

Start:

python openbazaard.py start -d -a 0.0.0.0

Stop:

kill $(cat /tmp/openbazaard.pid)
#rm /tmp/openbazaard.pid #OpenBazaar does this during shutdown.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#333 (comment)

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 14, 2016

Owner

@swordfish6975

python openbazaard.py stop

Legend 👍.

Owner

Fourdee commented May 14, 2016

@swordfish6975

python openbazaard.py stop

Legend 👍.

@swordfish6975

This comment has been minimized.

Show comment
Hide comment
@swordfish6975

swordfish6975 May 14, 2016

Contributor

To test it I brought a steam game and I've had a order come through. One of my orders that was in progress (I migrated my shop over) had the funds released from the multisig address and it all wnet fine.

Contributor

swordfish6975 commented May 14, 2016

To test it I brought a steam game and I've had a order come through. One of my orders that was in progress (I migrated my shop over) had the funds released from the multisig address and it all wnet fine.

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 14, 2016

Owner

Unable to run OpenBazaar from outside its own directory...

root@DietPi:~# python /etc/openbazaar-server/openbazaard.py start -d -a 0.0.0.0
Traceback (most recent call last):
  File "/etc/openbazaar-server/openbazaard.py", line 11, in <module>
    from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
  File "/etc/openbazaar-server/api/ws.py", line 16, in <module>
    from config import DATA_FOLDER, str_to_bool
  File "/etc/openbazaar-server/config.py", line 22, in <module>
    CONFIG_FILE = join(paths[0], paths[2])
IndexError: list index out of range
root@DietPi:~# cd /etc/openbazaar-server/
root@DietPi:/etc/openbazaar-server# python openbazaard.py start -d -a 0.0.0.0
________                      __________
\_____  \ ______   ____   ____\______   \_____  _____________  _____ _______
 /   |   \\____ \_/ __ \ /    \|    |  _/\__  \ \___   /\__  \ \__  \\_  __ \
/    |    \  |_> >  ___/|   |  \    |   \ / __ \_/    /  / __ \_/ __ \|  | \/
\_______  /   __/ \___  >___|  /______  /(____  /_____ \(____  (____  /__|
        \/|__|        \/     \/       \/      \/      \/     \/     \/

OpenBazaar Server v0.1 starting...

Stop does not wait for program to exit. Takes roughly 10-60 seconds:

python openbazaard.py stop
#!/bin/bash
{
    Stop()
    {
        python /etc/openbazaar-server/openbazaard.py stop

        # - We need to wait for process to finish...
        while (( $(ps ax | grep -ci -m1 [o]penbazaard) )); do
            sleep 0.5
        done
    }

    Start()
    {
        python /etc/openbazaar-server/openbazaard.py start -d -a 0.0.0.0
    }

    if [ "$1" = "stop" ] || [ "$1" = "restart" ]; then
        Stop
    fi

    if [ "$1" = "start" ] || [ "$1" = "restart" ]; then
        Start
    fi

    exit
}

Owner

Fourdee commented May 14, 2016

Unable to run OpenBazaar from outside its own directory...

root@DietPi:~# python /etc/openbazaar-server/openbazaard.py start -d -a 0.0.0.0
Traceback (most recent call last):
  File "/etc/openbazaar-server/openbazaard.py", line 11, in <module>
    from api.ws import WSFactory, AuthenticatedWebSocketProtocol, AuthenticatedWebSocketFactory
  File "/etc/openbazaar-server/api/ws.py", line 16, in <module>
    from config import DATA_FOLDER, str_to_bool
  File "/etc/openbazaar-server/config.py", line 22, in <module>
    CONFIG_FILE = join(paths[0], paths[2])
IndexError: list index out of range
root@DietPi:~# cd /etc/openbazaar-server/
root@DietPi:/etc/openbazaar-server# python openbazaard.py start -d -a 0.0.0.0
________                      __________
\_____  \ ______   ____   ____\______   \_____  _____________  _____ _______
 /   |   \\____ \_/ __ \ /    \|    |  _/\__  \ \___   /\__  \ \__  \\_  __ \
/    |    \  |_> >  ___/|   |  \    |   \ / __ \_/    /  / __ \_/ __ \|  | \/
\_______  /   __/ \___  >___|  /______  /(____  /_____ \(____  (____  /__|
        \/|__|        \/     \/       \/      \/      \/     \/     \/

OpenBazaar Server v0.1 starting...

Stop does not wait for program to exit. Takes roughly 10-60 seconds:

python openbazaard.py stop
#!/bin/bash
{
    Stop()
    {
        python /etc/openbazaar-server/openbazaard.py stop

        # - We need to wait for process to finish...
        while (( $(ps ax | grep -ci -m1 [o]penbazaard) )); do
            sleep 0.5
        done
    }

    Start()
    {
        python /etc/openbazaar-server/openbazaard.py start -d -a 0.0.0.0
    }

    if [ "$1" = "stop" ] || [ "$1" = "restart" ]; then
        Stop
    fi

    if [ "$1" = "start" ] || [ "$1" = "restart" ]; then
        Start
    fi

    exit
}

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

Resolved inability to run OpenBazaar from outside its own location. Not happy with it, but its a workaround, commit: 8443d01

Now in final testing phase.

Owner

Fourdee commented May 15, 2016

Resolved inability to run OpenBazaar from outside its own location. Not happy with it, but its a workaround, commit: 8443d01

Now in final testing phase.

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

Resolved C2 failed install. Was missing package automake

Owner

Fourdee commented May 15, 2016

Resolved C2 failed install. Was missing package automake

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

Server tests. Running well (I disable UPnP on my internal network)

root@DietPi:/etc/openbazaar-server# python openbazaard.py start -a 0.0.0.0
________                      __________
\_____  \ ______   ____   ____\______   \_____  _____________  _____ _______
 /   |   \\____ \_/ __ \ /    \|    |  _/\__  \ \___   /\__  \ \__  \\_  __ \
/    |    \  |_> >  ___/|   |  \    |   \ / __ \_/    /  / __ \_/ __ \|  | \/
\_______  /   __/ \___  >___|  /______  /(____  /_____ \(____  (____  /__|
        \/|__|        \/     \/       \/      \/      \/     \/     \/

OpenBazaar Server v0.1 starting...
Exception : No UPnP device discovered
2016-05-15 16:20:20+0100 [OpenBazaard] [INFO] Finding NAT Type...
2016-05-15 16:20:35+0100 [OpenBazaard] [INFO] Restric NAT on 82.44.22.31:18467
2016-05-15 16:20:36+0100 [OpenBazaard] [INFO] startup took 19.59 seconds
2016-05-15 16:20:36+0100 [Server] [INFO] bootstrapping with 20 addresses, findin                                                                 g neighbors...
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 176.9.145.230:40001
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 178.82.214.172:35783
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 94.23.252.118:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 84.72.86.75:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 149.56.89.140:19167
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 95.183.53.195:31011
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 95.183.53.195:31009
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 149.56.89.140:19567
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 188.62.44.189:39278
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 149.56.89.140:19367
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 98.253.69.210:30818
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 23.120.208.254:39636
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 192.241.236.11:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 54.255.176.19:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connection with 149.56.89.140:1936                                                                 7 terminated
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 106.44.69.25:1843
2016-05-15 16:20:38+0100 [ConnHandler] [INFO] connected to 62.195.114.100:18467
2016-05-15 16:20:38+0100 [ConnHandler] [INFO] connection with 84.72.86.75:18467                                                                  terminated
2016-05-15 16:20:39+0100 [-] [INFO] Libbitcoin server online at tcp://libbitcoin                                                                 3.openbazaar.org:9091
2016-05-15 16:20:41+0100 [OpenBazaard] [INFO] bootstrap complete
2016-05-15 16:20:42+0100 [ConnHandler] [INFO] connected to 86.160.64.169:39260
2016-05-15 16:20:42+0100 [ConnHandler] [INFO] connected to 95.183.53.195:31003
2016-05-15 16:20:42+0100 [ConnHandler] [INFO] connected to 45.55.137.42:18467
Owner

Fourdee commented May 15, 2016

Server tests. Running well (I disable UPnP on my internal network)

root@DietPi:/etc/openbazaar-server# python openbazaard.py start -a 0.0.0.0
________                      __________
\_____  \ ______   ____   ____\______   \_____  _____________  _____ _______
 /   |   \\____ \_/ __ \ /    \|    |  _/\__  \ \___   /\__  \ \__  \\_  __ \
/    |    \  |_> >  ___/|   |  \    |   \ / __ \_/    /  / __ \_/ __ \|  | \/
\_______  /   __/ \___  >___|  /______  /(____  /_____ \(____  (____  /__|
        \/|__|        \/     \/       \/      \/      \/     \/     \/

OpenBazaar Server v0.1 starting...
Exception : No UPnP device discovered
2016-05-15 16:20:20+0100 [OpenBazaard] [INFO] Finding NAT Type...
2016-05-15 16:20:35+0100 [OpenBazaard] [INFO] Restric NAT on 82.44.22.31:18467
2016-05-15 16:20:36+0100 [OpenBazaard] [INFO] startup took 19.59 seconds
2016-05-15 16:20:36+0100 [Server] [INFO] bootstrapping with 20 addresses, findin                                                                 g neighbors...
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 176.9.145.230:40001
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 178.82.214.172:35783
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 94.23.252.118:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 84.72.86.75:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 149.56.89.140:19167
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 95.183.53.195:31011
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 95.183.53.195:31009
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 149.56.89.140:19567
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 188.62.44.189:39278
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 149.56.89.140:19367
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 98.253.69.210:30818
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 23.120.208.254:39636
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 192.241.236.11:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 54.255.176.19:18467
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connection with 149.56.89.140:1936                                                                 7 terminated
2016-05-15 16:20:37+0100 [ConnHandler] [INFO] connected to 106.44.69.25:1843
2016-05-15 16:20:38+0100 [ConnHandler] [INFO] connected to 62.195.114.100:18467
2016-05-15 16:20:38+0100 [ConnHandler] [INFO] connection with 84.72.86.75:18467                                                                  terminated
2016-05-15 16:20:39+0100 [-] [INFO] Libbitcoin server online at tcp://libbitcoin                                                                 3.openbazaar.org:9091
2016-05-15 16:20:41+0100 [OpenBazaard] [INFO] bootstrap complete
2016-05-15 16:20:42+0100 [ConnHandler] [INFO] connected to 86.160.64.169:39260
2016-05-15 16:20:42+0100 [ConnHandler] [INFO] connected to 95.183.53.195:31003
2016-05-15 16:20:42+0100 [ConnHandler] [INFO] connected to 45.55.137.42:18467
@Fourdee

This comment has been minimized.

Show comment
Hide comment
Owner

Fourdee commented May 15, 2016

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

Completed. Many thanks to @swordfish6975 for the initial installation code 👍

@swordfish6975
If you want to test this prior to v118 release, please see: https://github.com/Fourdee/DietPi/blob/master/TESTING-BRANCH.md. And use documentation: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=1796#p1796

Owner

Fourdee commented May 15, 2016

Completed. Many thanks to @swordfish6975 for the initial installation code 👍

@swordfish6975
If you want to test this prior to v118 release, please see: https://github.com/Fourdee/DietPi/blob/master/TESTING-BRANCH.md. And use documentation: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=1796#p1796

@Fourdee Fourdee closed this May 15, 2016

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

As OpenBazaar has no options for logging to a file: https://github.com/OpenBazaar/OpenBazaar-Server#usage, attempting to redirect program output to file for logging purposes.

Daemon

Gets stuck in starting loop:

python openbazaard.py start -d -a 0.0.0.0 &> /var/log/openbazaar.log

image

Non-Daemon

Can not be stopped with python openbazaard.py stop:

python openbazaard.py start -a 0.0.0.0 &> /var/log/openbazaar.log &
Owner

Fourdee commented May 15, 2016

As OpenBazaar has no options for logging to a file: https://github.com/OpenBazaar/OpenBazaar-Server#usage, attempting to redirect program output to file for logging purposes.

Daemon

Gets stuck in starting loop:

python openbazaard.py start -d -a 0.0.0.0 &> /var/log/openbazaar.log

image

Non-Daemon

Can not be stopped with python openbazaard.py stop:

python openbazaard.py start -a 0.0.0.0 &> /var/log/openbazaar.log &
@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

Cant see a way round this for now. Users will simply have to run it as a foreground process for debugging.
I've updated documentation to explain how to achieve this: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=1796#p1796

Owner

Fourdee commented May 15, 2016

Cant see a way round this for now. Users will simply have to run it as a foreground process for debugging.
I've updated documentation to explain how to achieve this: http://dietpi.com/phpbb/viewtopic.php?f=8&t=5&p=1796#p1796

Fourdee added a commit that referenced this issue May 15, 2016

v118
- Revert OpenBazaar server service to non-logging:
#333 (comment)

@Fourdee Fourdee reopened this May 15, 2016

@Fourdee

This comment has been minimized.

Show comment
Hide comment
@Fourdee

Fourdee May 15, 2016

Owner

For the sake of "doing the ticket right" :). Commit: 9457b34

Owner

Fourdee commented May 15, 2016

For the sake of "doing the ticket right" :). Commit: 9457b34

@Fourdee Fourdee closed this May 15, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment