3.
Available actions
Up one level
Actions that can be performed on instances and products.
Everything that is handy to have as a single unit of action is turned into an Action. They can be quite small (just stopping zope), but that's OK. Being able to say 'instancemanager myproject stop' from anywhere without having to go to the instance directory to say 'bin/zopectl stop' saves on the number of terminals you have to keep open.
- --activate
Print workingenv's activate script.
The activate script needs to be run with . PATH/bin/activate or source PATH/bin/activate. All we can do to make it simpler is to just print the output of activate so that a source instancemanager PROJECT --activate does the same
- --backup
Backup the Zope Database of the instance.
This action relies on the backup_basedir_template variable to store the backups. By default, the backups are incremental unless there's been a pack.
- --changeown
- Action that changes ownership of some documents.
- --copydatafs
Copy over a fresh, prepared, Data.fs.
When you are developing, you might have an existing Data.fs file you want to use. For instance the current product database of your customer project that you copied for debugging purposes.
Instancemanager looks for a database in, by default, '~/instances/datafs/yourproject.fs'. You can change this in your config. The datafs action just copies this file to the instance's 'var/' directory.
- --create
Create a zope instance, possibly including a zeo server.
This will create a zope instance for you using the familiar 'mkzopeinstance' command. The instance will be the location you specified in your config file. By default it will be '~/instances/projectname/'.
Also, the zope.conf will be adapted in some places, like enabling debug mode and verbose security (for zope 2.8 and up). The port, username and password will be set according to the config file.
- --ipython
- Start ipython.
- --pack
- Action that packs your database.
- --printconfig
Print the configuration.
'instancemanager yourproject printconfig' shows the configuration for your project as intancemanager understands it.
- --products
Rebuild the Products/ directory from scratch.
Warning, this does remove everything in 'Products/' before copying over new versions. That is the whole purpose. :-) If it isn't your purpose, you shouldn't really be using this program.
You can configure a variety of sources in your configuration. Every source is an instruction for the "products" action. Possible sources are svn links and .tgz files, both for single products or for bundles.
- --reinstall
Action that quickreinstalls your products.
This used to depend on the presence of a specific script in your zope root that called the actual quickinstaller. There's a generic script that gets used now, however.
For more info see the quickinstallerscript documentation.
- --repozo
Perform a variety of repozo backup/restore actions.
--backup and --restore are fine, but there are more diverse things that can be done with repozo, this action allows some of them.
- --restore
Restore the Zope Database of the instance.
This action relies on the backup_basedir_template variable to restore the backups from.
- --restore-date
Restore the Zope Database of the instance by date
This action relies on the backup_basedir_template variable to restore the backups from.
- --rewriterule
Print out a RewriteRule for use in your apache config.
Also include some helpful pointers to information.
- --runcommand
Run external command action
This action calls external script using os.system call Script is called for all instanceDirs.
- --test
- Action for calling zopectl with a test command.
- --uninstall
- Action that uninstalls a given product from your instance.
- --updatesources
- Action for updating/switching svn checkouts
- --upgradezope
- Copies over the zope.conf or regenerates it based on the current
configuration and copies over the zopectl from the correct skeleton. Upgrade your instance in 2 steps:
- Update the Zope version in your project.py
- run instancemanager --upgradezope
- --zeo
- Action for calling zeoctl.
- --zope
- Action for calling zopectl.