Configuration files

In this example, we'll assume that you've requested and been granted privileges to some Internet domain name (like you.com) via our domain permission request form. If you don't want to configure a domain that you own, then you don't need to be using DomTool!

You will edit a text file with the configuration directives that you want applied your domain. Throughout this document, $USER is your HCoop username, $DOMAIN is your domain name, and you should write configuration into a file ~$USER/.domtool/$DOMAIN. If you're logged into one of our servers, cd ~/.domtool should get you to the proper directory.

Your home directory is something like /afs/hcoop.net/user/u/us/username, where you should replace username with your HCoop username and u and us with the one- and two-character prefixes of that username. Be sure that your .domtool directory has an AFS ACL set that allows the user domtool to read it, or your domains may go down when we need to reload everyone's configuration. If you end up with the wrong permissions, see MemberManual/GettingStarted/AfsExamples for the right command to run.

We leave it up to you to choose how to edit the source file. You might run something like emacs $DOMAIN over SSH, or you might open it locally if you have our AFS cell mounted in your local filesystem. In the latter case, those of you lucky enough to be using UNIX-based home systems will probably want to create softlinks from your local home directories to your HCoop home directories in AFS, to save some typing each time you want to open Domtool files.

In this file $DOMAIN, you can write:

dom "$DOMAIN" with
end;

Remember, you should replace $DOMAIN with the actual domain name.

This example introduces the simplest useful configuration, based on the dom directive. What does this source file accomplish? It:

There are more primitive configuration directives to set up each of these features individually. dom packages all of the functionality together in an easy-to-use package.

One of the main principles behind DomTool and our use of it is to avoid configuration repetition wherever possible. The DomTool language contains several abstraction features familiar from high-level programming languages, as well as some new ones, all in support of abstracting common code patterns into programming language entities that can be called multiple times. In general, if you find yourself writing the same code over and over again, let us know, and we'll try to add a new abstraction to our standard library! You could even write such an abstraction yourself, but that's beyond the scope of this intro document.

Now, enough talk; let's execute our source file! Assuming that you're in your .domtool directory, run

domtool $DOMAIN

This contacts our central dispatcher server over an SSL connection. Once the server verifies that you are who you say you are, it will publish your configuration to the affected daemons, and you should be able to start using your domain.

You could also simply run

domtool

which calls the dispatcher with all configuration files in your .domtool directory, regardless of what your current working directory is. This can be a helpful shortcut sometimes, though it can be noticeably less efficient than calling domtool with the single domain that you know you've changed.

In fact, the names of the source files in your .domtool directory don't matter. We recommend storing the configuration for each of your domains in a separate file named after that domain, but you might want to make different choices. For instance, you might want to use an abstraction that configures multiple domains at once. However, it is important that you keep all your permanent configuration files in your .domtool directory. Sometimes we need to reprocess all configuration from scratch, and in such cases our dispatcher will only look for source files in your .domtool directory. For temporary experimentation, though, you can feel free to store source files elsewhere and run them explicitly with

domtool $FILENAME