Previous Contents Next AMnet documentation

AMnet documentation

Contact:
flexinet-support@ibr.cs.tu-bs.de

http://www.flexinet.de


The AMnet HOWTO


6. LDAP Server

The LDAP server contains the available service modules and their description, which can be downloaded by users or AMnodes.

6.1 Configuring and running the LDAP Server

In order to up- and download modules to and from the LDAP server, it has to be configured with a special AMnet schema. This and various other ldap-specific files can be found in the directory amnet/user/ldap.

The LDAP Server (slapd) is configured automatically during startup with options stored in the configuration file slapd-amnet.conf. This file also contains an include option for the AMnet schema, which is also located within the amnet structure. Because this reference depends on your individual installation, you have to set up the right file reference. To do so, invoke the configure script in amnet/user/ldap by entering:./configure
This script will also set up the right path references for various LDIF service specification.

Now you are ready to set up (enter ./start) and shut down (enter ./stop) the slapd. These scripts should be only executable to root, who is responsible for the server's administration. Having started the slapd, your next step is to add the common AMnet specification (amnet.ldif) to the LDAP Server. You can do this by using the add script as follows: ./add -h [hostname] -f amnet.ldif. [hostname] refers to the host, where your slapd is running. At this point the configuration of the slapd for AMnet is finished and you may no longer have to be logged in as root.

6.2 Adding/deleting AMnet services to/from the LDAP server

Adding AMnet services to the LDAP is very easy, if you already have a LDIF service description: enter ./add -h [hostname] -f [myservice].ldif. At this we should point out, that we have a convention for naming LDIF specifications. [service].ldif refers to a LDIF specification, which can be used to add a service to the slapd, while [service]_del.ldif refers to a LDIF specification for deleting a service from the slapd. We placed various example service descriptions (i.e. counter, diskwriter, doubler, mpeg) in the directory amnet/user/ldap. You may easily add these service to the slapd. As all LDIF specifications contains absolut path references to the service specific libraries, you have to run the configure script mentioned in the above chapter. For a detailed description on how to create LDIF specifications for a new service read the following chapter.

To remove services from the LDAP server, use the del script by entering: ./del -h [hostname] -f [myservice]_del.ldif. Likewise the add script it needs a LDIF formatted file. For a deletion of a new defined service read the following chapters.

If you want to check, that your services were added or deleted, enter ./show s script. You can use it to query available services or even the modules and parameters of a special service.

Add, del and show are convenience scripts for using the LDAP tools. Of course, you are free to use the LDAP tools directly or adapt these scripts for your special environment. For instance, you may want to change the LDAPHOST variable in the script show for convenience.

6.3 Creating a LDIF specification for a new AMnet service

If you want to create a new LDIF specification, you have to make sure that your specification follows the rules of the amnet schema. Therefore you should first take a look at the file amnet.schema. Further you should have understood the example specifications in the directory amnet/user/ldap especially mpeg.ldif. When creating your own LDIF file be very careful using white spaces, because white spaces have a special meaning in the LDIF format (for additional information read RFC 2849).

Your new service description must contain at least two file references. The first file reference should point to the Check.class, which is located in the directory amnet/user/signalling/CLASSES. Unfortunately, for AMnet included files must be base64 encoded. If you do not have a base64 encoding/decoding tool, you can use the shell script encodeBase64, which is also located in the directory amnet/user/ldap.
The other file references (you are free to specify more than one module within one service) should point to your base64 encoded module data (e.g. shared libraries).

The structure of a service description can be described like this: "a service consists of one or more modules; every module has none, one or more parameters". Every object class (service, module, parameter has various attributes which must or may be specified. For example, every service must have a name and may have a description. To learn more about this attributes look at the amnet.schema.

6.4 Creating a LDIF specification for a AMnet service deletion

Creating a LDIF file for a service deletion is really easy when you already managed creating the service description file. You first have to copy the "dn" lines out of the service description and paste these lines in reverse order into a new file. For each "dn" entry add the line "changetype: delete". Using the del srcipt you can then delete all specified service entries.


Previous Contents Next