TurnKey Linux Virtual Appliance Library

TKLBAM API?

Chris Musty's picture

Hi,

 

I can replicate allot of stuff in the hub with AWS' API but where will I go if I need info for backups?

I know they are buckets but they are somehow tied to TKL's account in AWS.

Hints?

PS the reason I need to do this is to streamline my business and associated support. The current wen interface would fail for me if scaled to 100's of servers

Liraz Siri's picture

How can we improve the existing API?

Hi Chris,

The official API for the Hub is Hubtools, but TKLBAM-wise doesn't let you do much more than list backups. I understand you may need more then that. If you could elaborate a bit more regarding your usage scenario maybe we can figure out how to improve the Hubtools API or the Hub or maybe TKLBAM.

Right now I'm guessing your best bet would be to write a wrapper around TKLBAM, interfacing with it in command line mode - which would work from any programming language but require you to parse inputs/outputs, or better yet by writing the wrapper in Python and interfacing directly with the Python code:

$ PYTHON_PATH=/usr/lib/tklbam python
import hub

Note if you are interfacing with more than one Hub account you'll need to set the TKLBAM_REGISTRY environment to a different path for each account.

Under the hood, TKLBAM communicates with the Hub using a pretty simple REST API if you want to roll your own in another language. The code is in /usr/lib/tklbam/hub.py and should be pretty straightforward to port to another language.

Another route would be to directly access the TKLBAM registry, get the stuff you want out of it (e.g., bucket address, s3 access keys, etc.) and just use the AWS API. Explore /var/lib/tklbam/ and registry.py in the codebase.

Cheers

Chris Musty's picture

Thanks

Liraz,

So far I have been pulling what I need from command line RE TKLBAM like you suggested.

Didn't know about Hubtools - is it still "beta"?

The reason the Hub is not ideal for my use is that
a/ I will be using several tools to manage my servers
b/ It will not scale very intuitively to 100's (1000's I hope) of servers

So as for usage basically I am going to launch targeted business management suites and base the DB on TKL, have tried dynamo and rds from amazon but I need more control.
In order to manage faults etc I will setup a helpdesk that will use a highly intuative GUI developed by myself. I will manage any higher level comand line stuff. I am using RealSoftware to develop my UI and probably going to use their Web Edition.

My problem to date is finding people that know enough about linux to be autonomous - even basic stuff.
Everyone is so rooted in Windows they can't get their minds around a CLI.

So I will be accessing almost any function I can think of from performance logs to service status to BAM.
It will probably evolve to use more features over time but making it brain dead simple is what its all about.

Thanks for the hints, I probably could have found them myself but you have saved me a few minutes :)
I had a quick go at working out S3 bucket addresses without anything but the AWS info page but my attention was quickly moved somewhere else. Guess I owe you a beer now....

Chris Musty

Director

Specialised Technologies

Chris Musty's picture

I Didn't answer the Question

REwhat improvements you can make - I will look at what you currently have in hubtools and report back.

Chris Musty

Director

Specialised Technologies

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)