fab-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Fab-user] fabric UI tool


From: Nathan M
Subject: Re: [Fab-user] fabric UI tool
Date: Tue, 21 Jul 2015 23:13:30 +0200

I am building a webui on top of our

​F​
abric scripts with Flask. It was quite easy to set up, because it's not dynamic (url paths​ are hardcoded, each route call
​the matching Fabric task)​
​. The tasks are in a subfolder in the Flask project. Here is a small Gist with the main function : https://gist.github.com/nMustaki/507c336013bf15a9f289

Building a generic webui would be not easy because everyone would want a different blend of :
- autodiscovery of fabric tasks
- manual exclusion / inclusion of tasks
- access control
- autocreation of the url routes
- whether to capture and display Fabric output (at task end, line by line)
- if displaying fabric output, which method will you use to communicate with the client, websocket, wamp, ajax, etc
- how to pass parameters to tasks (if you want them to be usable from the cli, passing a dict to all tasks is not a good idea)
- how to gauge a task success, failure; display error messages
- scale the whole thing, as fabric task always take a few seconds to complete (at leat mines)
- etc

I wonder how Ansible, Salt and others web ui does it ?

I needed something quick and dirty, so I chose to :
- hardcode url paths and task calling
- ignore Fabric output
- get failure state from exception raising
- ignore performance issues
- communication with the client is done by ajax

I am also investigating a much nicer v2 with Crossbar.io : WAMP (turbocharged websocket), async tasks and pub/sub. As of now, it's working but I had to completely intercept Fabric output, as it would crash the Twisted processes (output is not lost).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]