Creating Ansible Modules for LBRY

Hello All,

I’ve tried signing up to Discord to ask these questions but that does seem to work. After clicking on the invite I land on a page that states “No text Channels - You find yourself in a strange place. You don’t have access to any text channels, or there are none in this server.” So I decided to post here.

I’ve been playing with LBRY a bit as I’m interested in developing a few Ansible modules for it. The basic idea is to create a set of modules to allow the creation and management of accounts, channels, wallets, streams etc using a bunch of Ansible Modules. I’ll use the LBRY SDK for this - GitHub - lbryio/lbry-sdk: The LBRY SDK for building decentralized, censorship resistant, monetized, digital content apps. and simply issue calls to an API server. For those that don’t know Ansible it’s a Configuration Management / Automation Framework. I’ve got a couple of questions regarding LBRY in relation to this.

  1. Ideally all Ansible Modules are idempotent. I’m not sure there’s any way for me to tell if an account (or any other object) has already been created simply by using the name. I see the account_create method returns an id value. I guess I could probably store the creation information locally to manage idempotency. Is there a better way of handling idempotency? API Documentation - lbry.tech
  2. As far as I can see when you create an account it doesn’t have any LBRY credits. Therefore I can’t create any channels or upload any content. I appreciate this is probably to reduce the scope for spam/abuse. What could be the solution here? Ideally I’d like to allow the creation of an account, with channels and be able to upload videos all within a single playbook. Is this feasible?
  3. Is there an object/entity diagram for the LBRY API? If not I might create one.

Cheers,

Rhys

2 Likes

I thin Ansible could be great for setup of the HUBs :slight_smile:

have you looked at https://github.com/lbryio/ansible

Looks like 404 for me :smiley:

oh whoops its private. i’ll try to make as much of that public as i can. we have lots of ansible roles already that you can build on

As far as I can see when you create an account it doesn’t have any LBRY credits. Therefore I can’t create any channels or upload any content.

You can probably use LBRY’s version of Bitcoins TestNet, to dev without spending credits. I’ve never used it, so can’t give you any further details, but it’s for this purpose.

Hi @Electron

I had a short email exchange with one of the LBRY guys and he advised to use regtest. Seems the way to go. Having a few issues setting up a docker env but I’m slowly getting there.

Cheers,

Rhys

Oh cool. I don’t know about that one.
Last time I used Docker, it didn’t work on my version of Windows, due to a Windows hyper-v bug or something. That was over a year ago, so don’t know if it’s still an issue as I’ve not used it since. Good luck.

1 Like