Author Topic: Tutorial about running a delegate  (Read 7702 times)

0 Members and 1 Guest are viewing this topic.

Offline Thom

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

Offline wackou

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 wackou

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 ripplexiaoshan

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 2300
    • View Profile
  • BitShares: jademont
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 committee member:jademont

Offline Gentso1

  • Hero Member
  • *****
  • Posts: 931
    • View Profile
  • BitShares: gentso
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 wackou

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 cass

  • Hero Member
  • *****
  • Posts: 4311
  • /(┬.┬)\
    • View Profile
 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 cass

  • Hero Member
  • *****
  • Posts: 4311
  • /(┬.┬)\
    • View Profile
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 robrigo


Offline Riverhead




This is fantastic work!

Offline wackou

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 svk

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 CLains

  • Hero Member
  • *****
  • Posts: 2606
    • View Profile
  • BitShares: clains

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
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

Offline wackou

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