If you have created a
TiddlyWeb vertical there's a high chance you would like to be able to work on its development, deploy it to installations and allow others to install it themselves in as effective way as possible.
This tiddler explores the options available.
The most direct answer is that we don't yet know what the best practices are because:
- There are not yet enough verticals being developed and deployed to identify any generic patterns.
- There have been insufficient reports of and questions about existing projects to gather data.
You can help. Please comment with your questions and experiences. The more data available, the more it will be possible to automate.
That said it is possible to describe the tools and practices that are available which may be combined to make the development, deployment and installation process more automated. As with any software service, performing customization with
TiddlyWeb can never be a fully automated process. Even with something as flexible as
TiddlyWiki customizations you still need to do some work to gather the requisite plugin or plugins, get them into your
TiddlyWiki and perhaps configure them. This is the routine with any system or framework: you have to find the stuff, get the stuff, install the stuff, configure the stuff.
Therefore, for deployment and installation you want to assemble the tools that make it possible to automate those parts of the system which are repeatable. Much of this is sysadmin 101 and in the open source development world there is little distinction between sysadmin and developer, nor should there be. In the Unix (and Unix-like) world these tools include (but are not limited to) make, Bourne shell, wget or curl, rsync, tar, source control tools (e.g. svn, git etc.) and symlinks.
In the information below we assume that a
TiddlyWeb vertical involves
TiddlyWiki in some way. This will often be the case, but is by no means required.
A
TiddlyWeb vertical uses or includes:
Options for dealing with these:
- TiddlyWeb itself should not be installed or deployed as part of the vertical installation process. TiddlyWeb is something the vertical uses or depends on. TiddlyWeb should either already be installed on the machine in question, or be installed as a dependency of the vertical. See Installing TiddlyWeb. Keep in mind that there only needs to be one copy of TiddlyWeb on any given machine, regardless of how many instances are present.
- That same is true for the tiddlywebplugins.utils package. It only needs to be installed once and should be installed as a Python package, in the usual Python ways.
- The current routine for getting TiddlyWeb plugins and tiddlywebconfig.py is to use wget to get the files from their canonical place on the web. This getting can be scripted and if any local customizations are required this can be scripted too.
- If your plugin uses multiple files then you may wish to consider:
- Making it into a Python package so it is easy to install and update.
- Making a script to automate (on the development side) the creation of a tarball or similar archive package which is easy to retrieve.
- Making a script to automate using git or svn to check your plugin out of the repo.
- Making a script to use rsnc to get your plugin from where it is being developed to where it is deployed.
- For TiddlyWiki content (tiddlers and plugins) there are several useful tools:
- The twanager twimport command provides a clean mechanism for retrieving content into a TiddlyWeb bag. twimport can read TiddlyWiki cook style recipe files. If, development-side, you maintain a recipe file with your required tiddlers you get two things:
- An easy way to build a TiddlyWiki to experiment with your plugins.
- An easy way to retrieve those plugins into a TiddlyWeb.
- If you need to create specific bags, recipes or tiddlers twanager has commands for that. twanager can be called from scripts.
- The config item instance_tiddlers can be used with the twanager update command to:
- Install required tiddlers.
- Update those tiddlers as required.
- The twanager imwiki command may be used to import all the tiddlers in an existing TiddlyWiki file. A TiddlyWiki file may also be POSTed into a TiddlyWeb using the HTTP API.
None of the above is a magic silver bullet, but combined they provide a powerful suite of tools that allow
you to make at least a stainless steel bullet that works for
you.
There's more to come here, please comment to shape things as you require.
See also: