Page 1 of 1

Virtual Machine Farm

Posted: Tue Oct 09, 2018 4:35 am
by blakewj
Hello all,

i've been tinkering with Afanasy for a while now and am having some trouble working out the best methodology for rendering on a Linux (centos.7) KVM's.
so i have a few virtual machines (win7) running in linux at the moment using kvm and i can have each on communicate to the server so everything from here back seems fin,
the problem i face is naming of the hosts so that when they join the server they take the next available name?

I read some info about overwriting the host name using AF_HOSTNAME. which i haven't had any luck with. i am wondering if there is something i am missing or a more autonomous way of doing this?

thanks :D
-blake

Re: Virtual Machine Farm

Posted: Tue Oct 09, 2018 12:48 pm
by timurhai
Hi.
When afrender starts, it gets a local host name. When it registers on server, it tells server that name.
If some online render with the same name exists, server rejects registration.

On start, afrender tries to read AF_HOSTNAME environment variable, and uses it, it is exists.
Also it lowers letters case:
https://github.com/CGRU/cgru/blob/maste ... t.cpp#L533

But i did not got your problem.
Your virtual machines on boot always get new hostname or what?
( i do not remember any issues with hostnames, on virtual machines or not )

Re: Virtual Machine Farm

Posted: Wed Oct 10, 2018 12:17 am
by blakewj
thanks for getting back to me so quickly
sorry if I came across unclear
I am having problems with the hostname.

which file must it be defined in?
afanasy/config.json?
/config.json
afanasy/farm.json?
or is it the config file stored in my roaming appdata folder(win)?

and another question,
is this all done client side? so the hostnames are determined by the clients, not the server?

thanks in advance
-blake

Re: Virtual Machine Farm

Posted: Wed Oct 10, 2018 10:52 am
by timurhai
Yes, hostname detects only on client side.
JSON config files does not affect environment variables.
You can define environment variable anywhere in your own way.
https://en.wikipedia.org/wiki/Environment_variable