not really... loads of other things to do and never got to it... sorry! :(
I'm still working on adapting gaffer to our studio (or better saying, adapt our studio to gaffer), so until I manage to make then use Gaffer as the main pipeline tool, connecting cgru afanasy to it is lower priority.
BUT, it's still on my to-do list... there's hope! lol
If helps, I do have developed some python code to interact with Afanasy JSON backend in our PipeVFX pipeline. It's not on github yet, but if you're interested, I can publish it.
There's a gamma of higher level functions, for example:
- creating jobs (although this function is very much oriented to PipeVFX, one can "clean it up" easily)
- list jobs (with all properties)
- restart jobs/tasks in a job
- change parameters in a job
- get parameters from a job
- delete jobs
- list render nodes (with all properties)
- delete render nodes
- change parameters of render nodes
- get parameters of render nodes
- list how many frames left to render on a job
- get the idle time of a render node
It's not fully complete, since I have being writing then based on a "need basis", but I'm trying to be careful enough to create basic interaction functions with afanasy, and then use those functions in the higher level ones. (apart from creating jobs, which uses afanasy's own pyton module)
It's very simple to interact with afanasy, since EVERYTHING you can do on the web gui, is listed on the net panel, which you can find at the bottom of the page. (just like mel code in maya)
The net panel lists the JSON used when you click on something, so you can just grab as a template to use in your own code. You don't even need documentation!
for example:
to open the net panel, click here
then here:

that should open the net panel.
now select a render node, and double click "capacity" to change it.

after that, look at the net panel, and you'll find the JSON used to change the capacity. (be fast, since the net panel lists EVERYTHING, so it scrolls up pretty fast past your "capacity change"! lol - you can use the browser "find in page" function if you miss it. Just look for "action" or something else in the json example I show below! )

Then you can use that as a reference to change any parameters on a render node.
In python, I did like this:
import af
import afnetwork
class afanasy(baseFarmJobClass):
def _init(self):
''' import afanasy python module into our class'''
import af
import afnetwork
self.af = af
self.afnetwork = afnetwork
def _runJSON(self, json):
''' the base function used to talk to afanasy via JSON requests '''
ret = self.afnetwork.sendServer( self.af.json.dumps(json), False )
if ret[0]:
return ret[1]
return []
def _list(self, filter='', mode="full"):
''' list all information from jobs. Use filter to select jobs based on a sub-string of the job name '''
json = {"get":{"type":"jobs", "mode":mode}}
return [ x for x in self._runJSON(json)['jobs'] if filter in x['name'] ]
def _renderNodes(self, name='', state=''):
''' returns a dictionary with all information for render nodes '''
json = {"get":{"type":"renders"}}
ret = self._runJSON(json)
if not ret:
return []
fret = []
for r in ret['renders']:
if name in r['name'] and state in r['state']:
fret += [r]
return fret
afanasy = _afanasy()
for rendernode in afanasy._renderNodes( "newfarm-005" ):
afanasy._runJSON( {"action":{
"user_name":"coord",
"host_name":"pc",
"type":"renders",
"ids":[rendernode['id']],
"params":{
"capacity : "500"
}
}
} )
If you end up working on gafferAfanasy, let me known! I would be very interesting on it too! And if you need any more help with afanasy, I'll do my best to help you! just drop me a message...
some more afanasy info:
=====================
We're using afanasy for about 2 years now, without ANY regrets.
It's really surprising how good, reliable and flexible it is, being an open source renderfarm managers. Basically, EVERYTHING that I wanted/needed to do with it, I was able to!
From my experience, it's the FIRST open source renderfarm manager project that surpass lots of commercial products on the market! (being a old-school alfred fan, today I really prefer afanasy for it's structure, flexibility and simplicity!)
Recently (about 4 months now) I've integrated our PipeVFX with Google Cloud Computing, and now we're able to allocate up to 100 VM machines (64/96 cores each, 64Gb ram) into our renderfarm, seamlessly.
Afanasy afrender runs on the google vm machines, and they show up in the studio just like any other local farm machine.
Afanasy is able to distribute the renders and manage everything perfectly... we tested with up to 122 nodes (100 google machines and 22 local machines) without issues!
to be fair, version 2.1 of afanasy used to crash with more than 100 nodes, but the latest 2.2 handles more than a 100 perfectly, without slow downs compared to just 22 local nodes.
btw, this integration with GCC is done with 100% open source software, and it is able to "boot" the google vm machines with our custom arch linux distro, and all the upload/download of project data is done all transparently by a custom cache fuse filesystem on top of a sshfs fuse filesystem. We just submit a job to the farm, afanasy starts the cmd line on the google machines, and all the needed files get transfered over as the machines load up the scenese. Even apps like maya get uploaded and cached locally by the filesystem transparently. Licenses are all tunneled up by an automatic ssh systemd service to the google farm machines, from our local license servers.
Our internet connection down in Brazil is not the best, just 100mbit up and 200mbit down, but even at that low speed, it has proven to be enough to work with GCC. Off cource, when we have 200GB of alembic cache, that will take about 4-5 hours to upload over a 100mbit connection, but with 100 * 64 cores nodes to render, it's still 50x faster to render than on our local 22 machines farm.
If someone is interested, I'll be publishing this GCC<>pipeVFX<>afanasy integration into pipeVFX github at some point, including the cache fuse filesystem I've developed.
As you can see, that's basically why I haven't had much time to work on afanasy->gaffer... LOL...
by the way, not you sure if you guys known, but I've found out yesterday that a guy from Poland released a new node based GUI for afanasy back in march/2017. It does look pretty cool:
and also, you can find cgru afanasy docker containers at dockhub now! makes it very simple and easy to setup a bed test!!
cheers...
-H