Since 1.6.7 (at 2012.12.03) site moved to

Afanasy Setup & Launch

Use Keeper to launch applications. Next documentation on this page shows you how to setup and launch by hands.

If you have used Linux packages (rpm or deb) you already have afrender (and afserver if you have installed it) running automatically at system startup. They run from render user by default, which was created during install.

Afanasy binaries located in cgru/afanasy/bin directory. To work properly they need some environment setup. There are some example scripts to setup environment and launch Afanasy application.

  1. Setup Environment

    You need to setup CGRU and Afanasy environment. There are scripts to setup it. They based on a working directory. To setup CGRU you need to go to CGRU root folder and source setup scripts.

    $ cd .../cgru
    $ source ./
    (On MS Windows call setup.cmd)

    Setup puts .../cgru/bin and .../cgru/afanasy/bin in PATH.
    Appends PYTHONPATH with .../cgru/lib/python, .../cgru/afanasy/python and .../cgru/afanasy/bin. It allows to import CGRU and Afanasy Python modules.

    • Unix:

      To check Environment you can launch afcmd command. If the program is exists and its output produced no errors, the environment is OK.

      To automate terminals setup you can put next line at the end of your ~/.bashrc file:
      pushd .../cgru; source ./; popd;

    • MS Windows:
      You can do the same to setup command line.
  2. Launch

    After setup you can simply run a command afrender or afwatch, as Afanasy binaries are in PATH.

    You can run Python and import Afanasy module to construct and send jobs.
    import af

  3. Automatic startup

    • MS Windows

      To start render at computer boot, you can simple make a link to start script in a "Startup" menu.

      There are no afanasy services written yet. But it should not be a problem for administrator to make a script to run render automatically from any user and with no GUI. And it is very useful to setup Watch render custom commands to stop and start render by such scripts (See rendercmds on watch configuration page).

    • Linux

      Linux Packages setup automatic lauch during installation. So if you use them, you should not have to do anything yourself. But you can read a text below to understand installation process.

      Create special user to launch server and render processes. Lets name him render.

      # useradd render

      This command will create him. Next scripts use this user name. Ensure that this user is not disabled by default on some systems.

      There are some bash scripts in cgru/afanasy/init directory. They can help you to setup automatic server and render launch.

      # ./ [options] afserver
      # ./ [options] afrender

      Launching this script with no arguments will outputs help. You can specify dependences in depends_afrender_* and depends_afserver_* files for server and render.

      This command creates a script in /etc/init.d directory to a Afanasy application. Puts links in /etc/rc?.d directories to provide service starting and stopping. See script file for details.

      After this afanasy services will start on machine boot and stop on shutdown automatically. Or you can start and stop them manually by following commands:

      # /etc/init.d/afserver start
      # /etc/init.d/afserver stop
      # /etc/init.d/afrender start
      # /etc/init.d/afrender stop

      If you starting scripts as root user, applications will be launched by render user. You can customize 'non root' username in cgru/afanasy/nonrootuser file.

      This starting scripts also provide log rotating. Logs and pid files are stored in /var/tmp/afanasy directory.

    • Other UNIX-es and MAC

      You should know how to make something to launch automatically if you enough brave to setup a render farm on such systems.

Since 1.6.7 (at 2012.12.03) site moved to Project


Libre Graphics World