Login | Register
My pages Projects Community openCollabNet
Project highlights: Stable Version: 1.6.1, Development Version: 1.7.6

Channel Creation and Population

The way you manage and control your channels has also changed significantly - as mentioned previously, there is no channel configuration information in the current.conf config file anymore. Any information that is there is ignored. So now you're probably asking me, "If it's ignored, how the heck to I create a channel?" This section is going to answer that question for you, so read on.

We'll assume you've gone thorugh the database creation process above and that there were no errors reported. The first thing to do is to start the Apache httpd daemon. The management interface talks to the server the same way up2date does; this is a major departure from the way server management was done in 1.4.x and previous releases. The developers believe that this change will greatly enhance the usability and future expandability of Current; we'd really like to hear feedback from users about the usability of this new management method.

Creating the Channel

There are three commands you will need to use to set up a channel in Current. The first, cadmin create_channel, is what actually creates the channel definition. There are six options available for this command:

--name (-n)

This option specifies the "name" of the channel; the name is used only for human consumption and is not critical for server operations. Each channel is required to have a name attribute associated with it.

--label (-l)

The label is the internal name of the channel used by the server and the clients that communicate with it. You will need to remember the channel label as it is required for other management commands. The label of a channel must be a valid directory name for the server operating system, and as such, cannot contain any characters except alphanumerics, “-”, and “.”. Each channel is required to have a label attribute associated with it.

--arch (-a)

The arch is the architecture that this channel will serve. It is usually the lowest level compatible architecture; i.e. i386 versus i686. This is a required option.

--release (-r)

The release attribute is the release level of the channel being served; for a Red Hat Linux 7.2 tree, the release would be "7.2". This is a required option.

--description (-d)

This is a description of the channel that is presented to the user in the client GUI; it is purely for human consumption and is not used in any way in the actual management of the server. This option is not required.

--parent (-p)

This denotes the label of the parent channel of the channel you are creating. As of versions 1.5.x and 1.6.x, this option is ignored in operations as we do not yet support sub-channels. Use of this option may cause unexpected behavior of the server; it is here for future compatibility purposes only. In future versions, use of this option will override the arch and release options (if they are provided).

An example channel definition command would be:

# cadmin create_channel --name "Red Hat 7.2" --label rhl7.2 --arch i386 \
    --release 7.2 --description "Red Hat Linux version 7.2"

The command will output a message telling you if it succeeded or failed, and if the latter, why (we hope). If the command fails for unobvious reasons, please submit a bug report. In the production (1.6.x) releases, this output will be supressed on success unless specifically asked for with a future --verbose (-v) flag.

Adding a Directory

The second command you will need is cadmin add_dir. This command takes two options:

--label (-l)

This is the channel label, as above. A label is required.

--dir (-d)

This option must be followed by the absolute path to a directory of RPMs or SRPMs. The packages in this directory will become part of the channel specified by the channel label.

The cadmin add_dir command can be issued multiple times with one directory specified per command, one with all channel directories specified at the same time, or any combination thereof. Please note: the cadmin suite of commands can be run on a machine different from the actual Apache / PostgreSQL / Current server machine, but all directory paths must be valid on that server machine.

This cannot be emphasized emough: all directories must be server directories, not necessarily directories on the machine cadmin is being run on.

Scan Channel

The third command you will need to become familiar with is the cadmin scan_channel command. This command only takes a single option, the --label option as above. You can specify multiple --label options with this command. This command is what tells the server to do the bulk of the setup work; it looks at the channel configuration, reads through the RPMS in the directories specified by the cadmin add_dir command, and imports the required information into the database. This is analogous to the old (1.4.2 and previous) cadmin create command. Please note that this command may take some time to return; author testing of this command has shown it can take up to 7 or 10 minutes to scan an entire Red Hat Linux 7.3 tree with source and binary RPMs.