pubtool

Name

pubtool -- publish content to clusters and tag versions of the project.

Synopsis

pubtool tag [--cluster=CLUSTER | --tag-prefix=TAG-PREFIX | --tag=TAG]

pubtool changes [--cluster=CLUSTER | --tag-prefix=TAG-PREFIX | --tag=TAG]

pubtool diff [--cluster=CLUSTER | --tag-prefix=TAG-PREFIX | --tag=TAG] [--diff-args=DIFFARGS]

pubtool publish [CLUSTER] [--cluster=CLUSTER | --tag-prefix=TAG-PREFIX | --tag=TAG] [--master-dir=MASTER-DIR] [--force-checkout] [--cvs-only] [--output-style=STYLE]

pubtool tag

Make a sequenced tag that you can publish later.

Do this when you have tested the state on your developer or staging box and want to publish out to other machines.

By default, a tag is generated with the tag-prefix live. The tag is the tag-prefix concatenated with the date, formatted as YYYYMMDDHHMM.

You may specify a tag-prefix explicitly, using --tag-prefix, or you may use the tag-prefix for a given cluster, using --cluster.

If you don't want the date appended, you can use --tag to specify the exact tag name.

pubtool changes

Get a list of files that have been changed, added, or removed since the specified tag. Each file that differs from the tagged version is shown with an explanation of the difference:

added

The file was added to the project since TAG.

changed

The file has been changed since TAG.

removed

The file has been removed from the project since TAG.

UNKNOWN

The file is not in the project; it has never been checked into CVS.

NOT COMMITTED

The file has been added or changed locally, but the changes have not been committed to CVS.

UNKNOWN and NOT COMMITTED are in all capitals to warn you that if you tag and publish the project without checking in your changes to those files, the files will be different or missing when they are published. Before you publish from your staging server, it is a good idea to run pubtool changes to make sure that the site you are testing on the staging server is the same as the one you are about to publish.

By default, the latest tag with the tag-prefix for your playpen's cluster is used. You may specify an alternate tag-prefix explicitly using --tag-prefix, or you may use the latest tag with the tag-prefix for a given cluster using --cluster.

If you don't want the latest tag, you can use --tag to specify an exact tag.

pubtool diff

Get the differences since the specified tag using cvs diff.

By default, the latest tag with the tag-prefix for your playpen's cluster is used. You may specify an alternate tag-prefix explicitly using --tag-prefix, or you may use the latest tag with the tag-prefix for a given cluster using --cluster.

If you don't want the latest tag, You can use --tag to specify an exact tag.

You can change the arguments passed to cvs diff with the --diff-args option. Otherwise --diff-args='-ub' will be used.

pubtool publish

Publish the site in a tagged state to the cluster CLUSTER. You usually do this after making a tag with pubtool tag --cluster CLUSTER.

Normally, the latest tag with the tag-prefix for CLUSTER is used. You may specify an alternate tag-prefix explicitly using --tag-prefix, or you may use the tag-prefix for another cluster, using --cluster.

If you don't want the latest tag, you can use --tag to specify an exact tag.

In order to inspect the tagged-site without affecting an existing copy of the project, a reference copy of the site in the tagged state will be checked out in $LOCAL_VAR/PROJECT_master, where PROJECT is the name of your project. You may override this location with the --master-dir=MASTER-DIR option.

By default, pubtool will build the new remote playpen on top of a copy of the existing playpen, if there is one, in order to save the time required to rebuild packages and recompile the project's sources. If you wish to force pubtool to rebuild the project and all its packages from the contents of cvs only, specify the --cvs-only option.

By default, if there is already a checkout of the project in the master directory, pubtool will use cvs update to update it to the tagged state. If you wish to force pubtool to remove the master directory and check out a fresh copy, specify the --force-checkout option.

pubtool publish uses a program called wparallelizer to perform commands in parallel on all the hosts in a cluster. You can choose the style in which wparallelizer will format the output of the remote commands with the --output-style option. To see the complete list of output styles, try running wparallelizer --help. The most commonly used styles are:

tiled

A full-screen text interface with each host's output displayed in its own window. This is the default.

line

Each line of output is printed with the name of the host before it.

If all goes well during publication, then the tag is added to a list of successfully published tags maintained in $PLAYPEN_ROOT/pub-record/published-tags.

Environment Variables

SSH_OPTIONS

Extra options to pass to ssh when running rsync and executing other commands on the cluster.

Tip

A useful value of SSH_OPTIONS is -o StrictHostKeyChecking=no, which makes ssh automatically add any host whose key it hasn't seen before to the user's .ssh/known_hosts file. Without this option, the ssh program will hang waiting someone to verify that you wish to add the new key to .ssh/known_hosts. Instead of using this slightly less secure flag, the release engineer may choose to ssh to each host in the cluster manually and confirm the new keys before publishing the first time.