Please create a use case for pools and Tickets.

General discussions and questions.
Post Reply
4drawing95
Posts: 4
Joined: Fri Feb 02, 2024 9:20 am

Please create a use case for pools and Tickets.

Post by 4drawing95 »

I'm trying pretty hard to utilize CGRUs right now, but the number of examples and information on CGRUs is really frustrating. In Fourm, I can't even search for a single word, and docemnet's documentation is very poor from what I've seen. I've also been looking at the provided Python examples, but I can't find any examples of how to properly configure and utilize pools and tickets. Is there somewhere I can look for such examples? Are there tons of them and I'm just not finding them...?

I have one more question.
In the web UI, when a job is processed and finished, the job disappears instead of remaining in the job list as completed. This makes it inconvenient to view the job results. Is there any way to keep the completed jobs visible without removing them?
User avatar
timurhai
Site Admin
Posts: 912
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Please create a use case for pools and Tickets.

Post by timurhai »

Hello!
Does CGRU works fine w/o any configuration?
Configuration is mostly needed to limit something.
For exmple, some pool can run only Blender, some only ffmpeg, some both.
Tickets info is here: https://cgru.readthedocs.io/en/latest/a ... ckets.html
You can configure tickets and pools via AfWatch.
Try to use AfWatch (Qt GUI), is it works fine?
We are using both, and both works fine.
Are you using the latest version?

There is a very poor API documentation.
You can use WebGUI (AfWatch produces lesser logs) and see logs for what JSON was sent to do something.
Later you can send the same object via PythonAPI (or write JSON to server open socket in the own way).
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
4drawing95
Posts: 4
Joined: Fri Feb 02, 2024 9:20 am

Re: Please create a use case for pools and Tickets.

Post by 4drawing95 »

hello. I'm building a renderPiepline in my company and CGRU is set up very nicely by default, but I want a little deeper control, for example, CGRU doesn't officially support unreal render, but I currently have a simple farm built and using it by sending Unreal Command through setCommand and now I need to utilize Pools and Tickets to cope with different situations.

If I understand correctly, I can set up Pools and Tickets for the Farm through the webUI and the Job I throw at it must hold the Ticket to access the Pool and do the work. If so, I would like to see an example of an API that passes the Pool information and Ticket to the Job in various ways or even in the simplest way, but the link you provided only has a theoretical explanation of Tickets, not an example of how to use the API. Also, in the API of Job, Block and Task, I could find the command of af.setPools, but not the information passed to Ticket.
User avatar
timurhai
Site Admin
Posts: 912
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Please create a use case for pools and Tickets.

Post by timurhai »

The simplest way to define, what pool can run Unreal and what Blender is by defining services.
Add on some pool "unreal" service and it will take only "unreal" tasks.
Add on that pool "blender" service and it will take only "unreal" and "blender" tasks.
Also you create a new "unreal" service and better a parser too.
You can look at exisintg services and parsers python code, copy one of them and modify for Unreal.

Tickets are more complex. Mostly designed to limit licenses and RAM.
You should setup services first. And then, if it will be not enough, use tickets too (along with sevices).

ps
Parsers are designed to parse process output for running percentage and an output picture to make thumbnail for GUI.
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
User avatar
timurhai
Site Admin
Posts: 912
Joined: Sun Jan 15, 2017 8:40 pm
Location: Russia, Korolev
Contact:

Re: Please create a use case for pools and Tickets.

Post by timurhai »

You can start with an empty service (that does nothing, just exists):
https://github.com/CGRU/cgru/blob/maste ... /ffmpeg.py
And the simplest parser, that just catches progess by regexp:
https://github.com/CGRU/cgru/blob/maste ... rs/curl.py

Later you can define more complex functions in that classes to solve different cases.

And later, you can support the project by sharing Unreal serivce and parser ))
Timur Hairulin
CGRU 3.3.1, Ubuntu 20.04, 22.04, MS Windows 10 (clients only).
4drawing95
Posts: 4
Joined: Fri Feb 02, 2024 9:20 am

Re: Please create a use case for pools and Tickets.

Post by 4drawing95 »

Thanks, I'll try a few things and come back if I get stuck again :)
Post Reply