Using Houdini with an external help server
Overview
A studio can set up a central help server to serve help to multiple users of Houdini, instead of each instance of Houdini starting up its own help server on each machine.
There are two main tasks to setting up a central Houdini help server:
-
Create a central help server.
-
Re-index the help.
-
Start the help server process.
-
Change the settings in each user’s Houdini to use the central server instead of its own.
Create a central help server
Open the command line tools. (on Windows, choose Start > Side Effects Software > Houdini X.X.XXX > Command Line Tools, on Linux source the Houdini environment).
-
Choose the computer with Houdini installed and create a directory to hold the customized server files.
cd $HOME mkdir helpserver cd helpserver
-
Add the
$HH/scripts/pythonlibsand$HH/scripts/pythondirectories to the PYTHONPATH environment variable. For example, in a Linux BASH shell:export PYTHONPATH=$PYTHONPATH:$HH/scripts/pythonlibs:$HH/scripts/python
-
Create a directory to hold the search index. For example, in Linux:
mkdir index
-
Copy the help server configuration file that comes with Houdini into your server directory:
cp $HH/config/Help/deploy.ini deploy.ini -
Edit the
deploy.inifile to match your local configuration.-
Set the
indexoption to the path of the directory you created for the search index. -
Set the
docsoption to a comma separated list of directories to search for help content.If you're running a central help server, you likely just want to change this line to:
docs = $HH/help, /path/to/my/help/tree
To overlay the contents of your custom help directory tree over the original Houdini help.
-
Set the
hostoption to the IP address of the server computer. -
Set the
portoption to the port number the web server should run on. -
Set the
threadpool_workersandthreadpool_spawn_if_underoptions to larger numbers. This will increase the thread pool size of your server making it more efficient at handling requests from multiple machines. Athreadpool_workersvalue of 10 and athreadpool_spawn_if_undervalue of 5 are good starting points.
-
You can use the help server on a computer without Houdini installed. In that case you would need to copy the $HH/scripts/pythonlibs and $HH/scripts/python/houdinihelp directories, and the $HH/scripts/python/server.py and $HH/scripts/python/index.py scripts from a Houdini install onto the server.
Serving custom example files
In the server .ini file, in the [app:exampleloader] section is an exampleprefix option. This value is prepended to example resource paths, such as /examples/nodes/dop/clothsolver/AnimatedClothPatch.otl. The default value of $HFS/houdini/help points to the location of the examples shipped with a Houdini install.
This prefix value does not allow a list of multiple paths, but it can be an HTTP URL. If you want to create your own examples, you will need to do one of the following:
-
Change
exampleprefixto the URL of the help server. For example,http://innisfail:5050/. This will make Houdini load the examples from the server over HTTP.With the
exampleprefixoption set to a URL, you can use thedocsoption to overlay your own directory of examples over the default examples that ship with Houdini.NoteHoudini can load OTL examples directly using the URL. Older
.cmdexamples will be downloaded to a temp file and then sourced locally. This means.cmdexamples that rely on external files (such as textures or data files) will break.
Or…
-
Copy the example file tree (
$HFS/houdini/help/examples/...) to a central location available over a network file share (such as NFS or Windows file sharing). Then changeexampleprefixto a network share path available to all clients.After you copy the “factory” example files to a central location and set the help server’s
exampleprefixto that location, you can add your own example files to that location.[app:exampleloader] paste.app_factory = houdinihelp.wsgi:exampleloader_factory exampleprefix = /nfs/central/help
On a heterogeneous network where each client OS needs the network share path in a different format, you can set up an environment variable on each client machine to point to the correct share path for that client’s platform, then use the environment variable in the
exampleprefixsetting:[app:exampleloader] paste.app_factory = houdinihelp.wsgi:exampleloader_factory exampleprefix = $CENTRAL_SERVER/help
Alternatively, you can use separate
exampleprefixLinux,exampleprefixWindows, andexampleprefixMacoptions. For example:[app:exampleloader] paste.app_factory = houdinihelp.wsgi:exampleloader_factory exampleprefixLinux = /nfs/central/help exampleprefixWindows = \\central\help
Whenever you add or remove example files, you need to re-index (see below) to make the examples show up on the corresponding node’s help page.
Important: You cannot load example files from a central help server using an external browser, since in that case there’s no way to communicate with Houdini.
Indexing the help
“Indexing” the help creates a directory containing information necessary to display and search the help. Each time you change, add to, or delete from your custom help, you need to “re-index” to make those changes visible to the search.
-
In the command line tools shell, go to your help server directory.
-
Make sure you changed the
indexconfiguration option indeploy.ini. You don’t want to overwrite the index in$HFS. -
Type the following:
python $HH/scripts/python/index.py deploy.iniThis will iterate over the text files in the directories listed in the
docsconfiguration option and add/update them in the search index.Normally this script only updates the search information for new files and files that have changed or been deleted since the last time you ran the script. To force the script to index everything from scratch, use:
python $HH/scripts/python/index.py deploy.ini --clean
You can re-index the help while the server is running, but you cannot run two indexing processes at the same time. The first process will lock the index and the second process will fail.
Starting the server
|
In the command line tools shell, go to your help server directory and type |
python $HH/scripts/python/server.py deploy.ini
|
You can type python $HH/scripts/python/server.py --help for a list of options.
You may want to create a wrapper script to allow starting and stopping the server as a background process.
Use python instead of hython to avoid checking out a Houdini license.
Notes
-
An alternative way to integrate the Houdini help into an existing web server is to run the help server along the main server and simply redirect certain URLs on the main web server to the help server. The Python web server is small and certainly not as fast or robust as Apache, but it should be fast enough to handle hundreds of users comfortably.
Setting up Houdini
To set up Houdini’s embedded browser to use an external help server:
-
Start Houdini.
-
Choose Edit > Preferences > Miscellaneous.
-
Turn on Use external help server.
-
In the External help URL field, enter the URL of the external help server.
For example, if you started a central server on port 5050 on a computer named
innisfail, you would enterhttp://innisfail:5050/…as the external help URL.
Writing wiki pages
Houdini’s help pages are written in a wiki format that is translated into HTML by the server.
To write pages in wiki format, create a text file (with the extension .txt) with wiki formatted text (see wiki formatting). For example, if the docs configuration file is set to:
docs = $HH/help, /myhelp
Then you can create the file /myhelp/mypage.txt and have it show up in the browser as /mypage. (If you open http://localhost:5050/mypage.txt in a browser, you’ll see the wiki text. If you open http://localhost:5050/mypage or http://localhost:5050/mypage.html, you’ll see the HTML generated from the wiki text.)
The generated HTML relies on images, CSS files, JavaScript, etc. from the standard $HFS/houdini/help directory. Make sure $HFS/houdini/help (a.k.a. $HH/help) is part of the docs configuration file option (see above) unless you copy those files into your custom directory as well.