Author [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] [EN] [ZH] [ES] [PT] [IT] [DE] [FR] [NL] [TR] [SR] [AR] [RU] Topic: Tutorial about running a delegate  (Read 1481 times)

0 Members and 1 Guest are viewing this topic.

Offline wackou

Tutorial about running a delegate
« on: January 23, 2015, 02:40:48 PM »

Hi all,

(tl;dr: tutorial is at: http://bts-tools.readthedocs.org/en/latest/howto.html)

I completed the first version of the tutorial I had planned to write for some time on running a delegate.

The tutorial starts from scratch, and guides you in installing Debian on a VPS, installing the BTS Tools I developed, and then using them to build, run and monitor the BitShares client. Hopefully it is clear enough, and I hope this will motivate more people to look into the BTS Tools.

Tutorial can be found at: http://bts-tools.readthedocs.org/en/latest/howto.html

Note also that this is a first version, it is not 100% complete (but mostly), and any comments/suggestions for improvements are welcome.

I have also started to write more doc in general for the tools (not only the tutorial) but this is still very much a work in progress. Doc is at: http://bts-tools.readthedocs.org/

Please remember to also vote for my delegate: btstools.digitalgaia, it still needs ~5% to get voted in. For a 30%-only delegate this gets you:
 - continued development and funding of the BTS Tools (https://bitsharestalk.org/index.php?topic=12534)
 - more documentation like this one
 - 6 seed nodes/chain servers (2 US, 2 Europe, 2 Asia) for the BitShares and the DevShares network

Hope you like it!
Please vote for witness wackou! More info at http://digitalgaia.io

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12267
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BTS: xeroc
  • GitHub: xeroc
Re: Tutorial about running a delegate
« Reply #1 on: January 23, 2015, 02:51:34 PM »
Your tools are incredible .. I wonder why you are still not voted in .. at least to get a pay for your work ..
having 6 seed nodes is worth being voted in anyway
Give BitShares a try! Use the http://testnet.bitshares.eu provided by http://bitshares.eu powered by ChainSquad GmbH

Offline CLains

  • Hero Member
  • *****
  • Posts: 2610
    • View Profile
  • BTS: clains
Re: Tutorial about running a delegate
« Reply #2 on: January 23, 2015, 03:13:17 PM »
 +5% +5% +5%
Vote for BTS-2 witness: spectral (1.6.30)

Follow https://steemit.com/@clains

Offline svk

Re: Tutorial about running a delegate
« Reply #3 on: January 23, 2015, 04:48:31 PM »
Really nice!

If you could expand the moniting app tutorials a bit that would be great!

Things I would like to know:

How to install it?
What is a WSGI server?
Can I use it with a remote server using ssh key?
Worker: dev.bitsharesblocks

Offline wackou

Re: Tutorial about running a delegate
« Reply #4 on: January 23, 2015, 05:50:18 PM »
Thanks guys for the kind words!

If you could expand the moniting app tutorials a bit that would be great!

will do, that's definitely the part that I think is useful so I will try to make it clearer

How to install it?

you get all in the same package, so

Code: [Select]
pip install bts_tools

is all you ever have to do. It is really recommended to take 5 mins to understand and use virtualenvs, though, it will save you a lot of headaches in the future. See http://bts-tools.readthedocs.org/en/latest/howto_install.html

What is a WSGI server?

the monitoring tools are run by default as a python script, and serving the http requests is done by an embedded http server written in python. This is nice for development, but is usually not recommended for production.

In production, the usual way of doing this is to have a "real" webserver, such as Apache or nginx do the http part, and ask the python code to give it just the contents of the page, but not serve it. This has many advantages, such as a better security model, more features (eg: SSL if supported by your webserver, etc.)

WSGI is the standard allowing a webserver to execute directly python code (think: mod_php, but for python)

Can I use it with a remote server using ssh key?

if you mean having the client run on a machine, and the monitoring tools run on a different one but monitoring the client through ssh, then yes, it is possible. I would have to review this part, though, as I did it with convenience in mind first, without taking into account the security too much. There is nothing in the doc yet, will get on it too.
Please vote for witness wackou! More info at http://digitalgaia.io

Offline Riverhead

Re: Tutorial about running a delegate
« Reply #5 on: January 23, 2015, 06:09:18 PM »



This is fantastic work!

Offline robrigo

Re: Tutorial about running a delegate
« Reply #6 on: January 23, 2015, 08:11:56 PM »



This is fantastic work!

 +5% I concur. Voted!

Offline cass

  • Hero Member
  • *****
  • Posts: 4328
  • /(┬.┬)\
    • View Profile
Re: Tutorial about running a delegate
« Reply #7 on: January 23, 2015, 09:36:51 PM »
Your tools are incredible .. I wonder why you are still not voted in .. at least to get a pay for your work ..
having 6 seed nodes is worth being voted in anyway

 +5% +5% +5%

@all: Come on pls show some love for wackou as delegate!

Dan, Nikolai etc... give him your vote....NOW!!! :)




█║▌║║█  - - -  The quieter you become, the more you are able to hear  - - -  █║▌║║█

Offline cass

  • Hero Member
  • *****
  • Posts: 4328
  • /(┬.┬)\
    • View Profile
Re: Tutorial about running a delegate
« Reply #8 on: January 23, 2015, 09:51:37 PM »
 i'll include this tut into delegate page of ravamped .org site - if i'll get your GO - and link to your delegate proposal here!
█║▌║║█  - - -  The quieter you become, the more you are able to hear  - - -  █║▌║║█

Offline wackou

Re: Tutorial about running a delegate
« Reply #9 on: January 24, 2015, 11:20:54 AM »
i'll include this tut into delegate page of ravamped .org site - if i'll get your GO - and link to your delegate proposal here!

Sure, go ahead, I'd love it! I see that the countdown is extended and is now a week, that'll give me a bit more time to fine tune it.
Please vote for witness wackou! More info at http://digitalgaia.io

Offline Gentso1

Re: Tutorial about running a delegate
« Reply #10 on: January 28, 2015, 04:23:41 PM »
I only read a little so far but this this seems like a really useful guide.

The easier we can make it to run delegates obviously the better, great work.

Offline ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2026
    • View Profile
  • BTS: xiaoshan
Re: Tutorial about running a delegate
« Reply #11 on: January 28, 2015, 07:53:08 PM »
Fantastic work.

Riverhead is doing similar things, according to this https://bitsharestalk.org/index.php?topic=10861.0

So are you going to compete with him? :P
BTS ID:xiaoshan                   www.yoyow.org      www.btsabc.org      www.openledger.info

Offline wackou

Re: Tutorial about running a delegate
« Reply #12 on: January 29, 2015, 07:58:14 PM »
So are you going to compete with him? :P

I consider that I have a profile very similar to Riverhead, that's true, but I wouldn't call it competition :)

As far as I can tell, Riverhead is more active on the forums, and I spend most of my time developing the bts_tools instead, but we have the same mission: ensuring that the network is as robust as possible. In any case, I think that in the first stages of development of a project, it is better to let creative initiatives grow organically and freely, and then take the better ideas between them and merge them into something useful and stable.

You could compare this to writing code as fast as possible to make it work first, and only then refactor it to make it clean. I like this way better because when you refactor and do a proper design, you already have the experience of making it work, which avoids overlooking some aspects that you could have missed had you started thinking about the problem beforehand.

I do foresee a future where Riverhead and myself, but also Xeroc, Emski, etc get together to shape some common tools / docs / etc. which represent the consensus about what is the absolute best way to manage the network infrastructure (ie: delegate nodes, seed nodes, backup solutions, DDoS prevention, etc). For instance, I can see a not so distant future where we take Xeroc's, Alt's and my python code to create a standard python BitShares wrapper API too (like this: https://bitsharestalk.org/index.php?topic=13685, but more complete)
However, before reaching a consensus, I believe we first need to come up with ideas and code as freely as possible. Friendly competition, if you will ;)
Please vote for witness wackou! More info at http://digitalgaia.io

Offline wackou

Re: Tutorial about running a delegate
« Reply #13 on: January 29, 2015, 08:01:05 PM »
btw, I plan to integrate some of the comments I already received on the tutorial, hopefully over this weekend. This will fix some missing parts in the docs and rough edges about the installation. Stay tuned!
Please vote for witness wackou! More info at http://digitalgaia.io

Offline Thom

Re: Tutorial about running a delegate
« Reply #14 on: January 30, 2015, 12:30:19 AM »
I'm new to the delegate scene and I've been working with wackou's bts_tools. I love the simplicity of their use, and his tutorial is a very good start. I had some difficulties but I don't blame the tools for them, I think I had some issues on my test rig. I'll be focused on using the tools over the weekend so I will offer my perspective as I go.

Most excellent work tho! This guy needs more votes!

I can't quite see the full picture about the virtualenv however. I understand the sandbox concept, but unless I'm mistaken doesn't the client need to run within the virtualenv context (i.e. directory created by the virtualenv cmd), or is it only a sandbox for python includes/libs/imports?

When you create the virtualenv & source it, does that extend the sandbox outside of the virtualenv folder?

Also, been trying to find info on "seed nodes"; what are they? What is their function? There's no info in the wiki.bitshares.org about them.
« Last Edit: January 30, 2015, 01:16:30 AM by Thom »
Injustice anywhere is a threat to justice everywhere - MLK |  Verbaltech2 Witness Reports: https://bitsharestalk.org/index.php/topic,23902.0.html

 

Google+