Install

There is more than one way to install IsiSetup:

If you're no developer, you probably want to install the binaries.

Using IsiSetup

When using IsiSetup simply to revision control you /etc, isisetup-host is probably the only command you need. isisetup-module and isisetup-repository provide more low-level, SCM like, functionality.

Another set of scripts, isisetup-package, isisetup-service, and isisetup-feature are designed to work with different kinds of IsiSetupModule. Those scripts are still in heavy development, and aren't documented, yet.

To get a list of available scripts use:

isisetup

The commonly used scripts have manpages and support the --help option.

As the isihost acts on the system configuration in /etc, you have to run the script as root. For this reason, the example are all prepended by sudo.

Common Tasks

Install a Package

As IsiSetup integrates into APT, you just use the famous apt-get install command. IsiSetup will create an IsiSetupPackageModule for each package using the configuration files in the installed package(s). This module is then added to the IsiSetupHostModule, from where it is fetched into the IsiSetupSystemConfigurationModule.

Add a Package

You can also create an IsiSetupPackageModule for an already installed package using the configuration files in the installed package.

sudo isisetup-package create <package>

Show new Changes

If you've edited /etc, it differes from the last commited version. You may list these differences between the current and recorded version using:

sudo isihost diff

You may commit these changes using sudo isisetup-host commit, see below.

Explore Change History

There are two commands to show the history of changes. The main difference is the amount of information they give you.

If you'd like to just see the name, author and date of commited changes, use this one:

sudo isihost commits

If you're interrested in files that were modified, too, here's how:

sudo isihost changes

As the list of commits and changes may be huge, you probably want to pipe the output in a viewer like less:

sudo isihost changes | less

Commit Changes

After you've edited /etc, you need to commit these changes. The following command will fire up your default editor to create a commit message.

sudo isihost commit

Sidenote: The default editor on many Linux distributions is vi. If you haven't heard of it, and don't know how to quit, here's a hint: press ESC and enter :q!. You then probably want to specify your prefered editor using something like export EDITOR=nano. Use the editor of choice instead of nano in the previous command. This editor will now be used when running isihost commit.

You may specify a commit message when calling the above command. In this case, the changes are commited immediately and no editor is started:

sudo isihost commit "Most important changes ever"

Commit interactive

The isihost commit command commits all the changes since the last commit. But you sometimes like to commit those in more than one changeset. This is supported by the isihost commit-interactive command. This command asks you for each changed file if you'd like to include it in the commit.

sudo isihost commit-interactive

Rollback Changes

One reason to use a revision control tools for /etc is the ability to undo changes. IsiSetup provides you with an interactive command to do this:

sudo isihost rollback

It will show the recorded changes in reverse order, newest commits first. You now can cherry-pick the commits you'd like to rollback.

Restore commited version

When doing administrative work, you often like to try out a specific config option. When the change didn't work out, you may use IsiSetup to restore the previous version of the files.

sudo isihost restore

Read on

LogintasPublicWiki: IsiSetupTutorial (last edited 2007-01-17 10:43:25 by DanielLutz)