「利用者:Eibriel/Brender」の版間の差分
細 (1版 をインポートしました) |
|
(相違点なし)
|
2018年6月29日 (金) 06:13時点における最新版
Flamenco Tutorial
Installation
Linux
Go to http://flamenco.io, and download Flamenco (https://github.com/fsiddi/flamenco/archive/master.zip).
(Installation instructions)
Setup
Create the config.py files and change the required fields.
Server
Copy "server/application/config.py.example" to "server/application/config.py"
Changing the file you can set (optional/required):
- SQLALCHEMY_DATABASE_URI using the SQLAlchemy syntax.
- DEBUG mode on/off
- PORT where the Server is listening for incomming connections from Managers
- HOST to mask incomming connections (set to 127.0.0.1 to listen only from the same host, or 0.0.0.0 to listen from any host)
- TMP_FOLDER where the thumbnails are saved.
- THUMBNAIL_EXTENSIONS to filter incomming thumbnails from the Manager by png (Security)
- SERVER_STORAGE the folder where the server store the job files, and the output, will be deprecated soon (using the Static folder)
Manager
Copy "manager/application/config.py.example" to "manager/application/config.py"
Changing the file you can set (optional/required):
- DEBUG mode on/off
- PORT where the Manager is listening for incomming connections from Workers
- HOST to mask incomming connections (set to 127.0.0.1 to listen only from the same host, or 0.0.0.0 to listen from any host)
- HOSTNAME to identify the Manager (is just a Title, not a real hostname)
- BRENDER_SERVER url
- SQLALCHEMY_DATABASE_URI using the SQLAlchemy syntax.
- VIRTUAL_WORKERS = False # If true, the manager will not have a fixed number of workers
- IS_PRIVATE_MANAGER, setting it to True you will be able to set custom BLENDER and SETTINGS paths
- TMP_FOLDER, the folder where the Manager stores the thumbnails
- THUMBNAIL_EXTENSIONS, a filter for the Thumbnails sended by the Workers
- MANAGER_STORAGE, the place where the Manager stores the Jobs and the Outputs
Worker
Copy "worker/application/config.py.example" to "worker/application/config.py"
Changing the file you can set (optional/required):
- BRENDER_MANAGER url
- HOST to mask incomming connections (set to 127.0.0.1 to listen only from the same host, or 0.0.0.0 to listen from any host) [not in use right now]
- PORT where it listen for incomming connections from the Manager
- TMP_FOLDER to save thumbnails, jobs and output.
Dashboard
Copy "dashboard/application/config.py.example" to "dashboard/application/config.py"
Changing the file you can set (optional/required):
- DEBUG mode on/off
- BRENDER_SERVER url
- the HOST to mask incomming connections (set to 127.0.0.1 to listen only from the same host, or 0.0.0.0 to listen from any host)
- PORT where it listen for incomming connections from the Manager
Initializing the first time
- Start the Server
- Start the Dashboard
- On the Browser enter to the Dashboard configuration (http://127.0.0.1:8888 by default)
- On Server -> Projects click on Add Project, set, Path Server, Path *, Shared Render Path Server, Shared Render Path * (all deprecated, not used)
- On Server -> Settings set Shared Blender path *, Shared Config path *
Usage
Sending jobs from Dashboard
- Open the Dashboard on the Browser (http://124.0.0.1:888 by default)
- Click Add Job
- Select Job type
- Browse for a zip file containing the Job
- Insert the needed Job information
- Select the preferred Managers
- Click Add Job
Sending jobs from Blender
- On Blender go to User Preferences..., Addon
- Click on Install from File...
- Search for the file brender_render.py on "plugins/blender/" on Flamenco code
- Activate the addon and set the server URL (with http://)
- Press Save User Settings to make the changes permanent
- On the 3D View open the Tool Shelf (T)
- Select the Flamenco tab, and click on Update Flamenco Info
- Now you can Select your Project, your Job Name and Job Type, select the preferred Managers, and the priority.
- When done, press Save and send
Apache
Initial
Install "mod_wsg"
apt-get install libapache2-mod-wsgi
Create the file "/etc/apache2/conf-available/ports.conf"
Listen 8888 Listen 9999 Listen 7777
Enable it
a2enconf ports.conf
Server
Create the file "/var/www/brender/server/brender-server.wsgi"
import sys sys.path.insert(0, '/home/guest/dev/brender/brender/server') activate_this = '/home/guest/venvs/brender/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) from application import app as application
Create the file "/etc/apache2/sites-available/001-server.conf"
<VirtualHost *:9999> ServerName brender-server WSGIDaemonProcess server_wsgi user=guest group=guest threads=5 WSGIScriptAlias / /var/www/brender/server/brender-server.wsgi <Directory /var/www/brender/server/> WSGIProcessGroup server_wsgi WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> </VirtualHost>
Enable site
a2ensite 001-server.conf
Manager
Create the file "/var/www/brender/manager/brender-manager.wsgi"
import sys sys.path.insert(0, '/home/guest/dev/brender/brender/manager') activate_this = '/home/guest/venvs/brender/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) from application import app as application
Create the file "/etc/apache2/sites-available/002-manager.conf"
<VirtualHost *:7777> ServerName brender-manager WSGIDaemonProcess manager_wsgi user=guest group=guest threads=5 WSGIScriptAlias / /var/www/brender/manager/brender-manager.wsgi <Directory /var/www/brender/manager/> WSGIProcessGroup manager_wsgi WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> </VirtualHost>
Enable site
a2ensite 002-manager.conf
Dashboard
Create the file "/var/www/brender/dashboard/brender-dashboard.wsgi"
import sys sys.path.insert(0, '/home/guest/dev/brender/brender/dashboard') activate_this = '/home/guest/venvs/brender/bin/activate_this.py' execfile(activate_this, dict(__file__=activate_this)) from application import app as application
Create the file "/etc/apache2/sites-available/003-dashboard.conf"
<VirtualHost *:8888> ServerName brender-dashboard WSGIDaemonProcess dashboard_wsgi user=guest group=guest threads=5 WSGIScriptAlias / /var/www/brender/dashboard/brender-dashboard.wsgi <Directory /var/www/brender/dashboard/> WSGIProcessGroup dashboard_wsgi WSGIApplicationGroup %{GLOBAL} Order deny,allow Allow from all </Directory> </VirtualHost>
Enable site
a2ensite 003-dashboard.conf
Reload Apache
Reload configuration
service apache2 reload
Misc
Marshalling / Unmarshalling
https://en.wikipedia.org/wiki/Marshalling_%28computer_science%29
In computer science, marshalling or marshaling is the process of transforming the memory representation of an object to a data format suitable for storage or transmission, and it is typically used when data must be moved between different parts of a computer program or from one program to another.
Idempotence
https://en.wikipedia.org/wiki/Idempotence
Idempotence is the property of certain operations in mathematics and computer science, that can be applied multiple times without changing the result beyond the initial application.