Installing and configuring the service director

Overview

What is the service director?

EGO service director (ServiceDirector) is a service that functions as a locating mechanism for other system services. The service director contains a stand-alone Domain Name Server (DNS), which is the authoritative name server for the EGO DNS sub-domain and responds to DNS queries for system services.

The service director runs on any EGO management host that is the same type as the master, and relies on the service controller to provide location information and state change notifications of service instances.

Why configure the service director?

Out-of-box, a client who is looking to find a host with a EGO service started on it must directly query/point to the service director as nameserver. The nameserver entries get updated each time to point to the service director and to resolve the name and IP address. To avoid making operating system configuration changes each time there is a query, you can configure service director to provide name-to-address mapping to the corporation DNS server (corpdns). Doing this provides location independence for the hosts. You can therefore start a service anywhere.
After configuring the service director, the client can communicate with the corporation DNS server instead, and does not need to be aware of the service director.

About nameserver entries

On Linux, nameserver entries are updated automatically in /etc/resolv.conf. On Windows, nameserver entries can be changed interactively, as follows:

  1. From the Windows Start menu, click Control Panel, and select Network Connections.

  2. Right-click Local Area Connection, and then select Properties.

  3. Select Internet Protocol (TCP/IP) from the list of protocols, and then click Properties.

  4. On the General page, click Advanced.

  5. Click the DNS tab.

  6. Add DNS server addresses according to the Windows instructions.

Confirm installation is successful

The candidate host that the service director DNS runs on is automatically selected by EGO during EGO startup. You may wish to confirm ServiceDirector is running, and locate the host it is currently running on.

  1. From the command line, run egosh service list to confirm ServiceDirector is running.
  2. Run egosh service view to identify where ServiceDirector is running.

    Look for the address (labelled "Resource") under Service Instances INFO. In this example, ServiceDirector runs on "HostA".

    sh-3.00$ egosh service view ServiceDirector-----------------------------------------------------------------Basic Service INFOService Name       : ServiceDirectorService Description: EGO: Service Director...Service Instances INFOSTATE      ACTIVITY_ID      RESOURCE         SEQ_NORUN        4                HostA             1
  3. Run dig to verify that the egonameserver is functioning and the entry for it is in the egonameserver itself.

    For example,

    dig @HostA egonameserver.ego A

    where HostA refers to the location of the running service director.

Configure the default service director plug-in file

If you want to change the out-of-box service configuration to reflect your organization, you must define certain parameters in the service director default plug-in file.

  1. Stop all system services.
  2. Open esddefault.xml.
    • Windows: EGO_TOP\eservice\esd\conf\esddefault.xml

    • Linux: EGO_TOP/eservice/esd/conf/esddefault.xml

      Note:
      If you ran egoconfig mghost, then find esddefault.xml in the EGOshare directory, where "EGOshare" is the shared directory containing important configuration files.
      • Windows: EGOshare\eservice\esd\conf\esddefault.xml

      • Linux: EGOshare/eservice/esd/conf/esddefault.xml

  3. Configure the following elements:

    Parameter

    Description

    ESD_EGO_NAMESERVER

    The service director DNS server name. (Defining this parameter is optional.)

    The cluster administrator must add an NS resource record into CORP DNS database, indicating that this server is used as the service director DNS server.

    ESD_EGO_DOMAIN

    The EGO sub -domain name.

    ESD_CORP_DOMAIN

    The Corporation domain name.

    ESD_EGO_KEY

    The TSIG KEY used to update the service director DNS server. (Defining this parameter is optional.)

    ESD_CORP_KEY

    The TSIG KEY used to update Corporation DNS server. (Defining this parameter is optional.)

  4. Restart all system services.

Enable Corp.DNS for external access

By default, Corp.DNS is disabled to limit access to the corporate server from within an internal, corporate domain. If you want to allow for external access, you must enable Corp.DNS and then set up a connection to it. Do this by adding the service director DNS as a sub-domain of Corp.DNS.

  1. Open esddefault.xml.
    • Windows: EGO_TOP\eservice\esd\conf\esddefault.xml

    • Linux: EGO_TOP/eservice/esd/conf/esddefault.xml

  2. Make the following changes:
    • For ESD_EGO_DOMAIN, change ego to service.ego

    • For ESD_CORP_DOMAIN, change @EGO_SD_CORPDOMAIN@ to ego.

      Also, remove the comment markings for this line.

    • For ESD_CORP_KEY, replace @EGO_SD_CORPKEYNAME@ with the TSIG key for Corp.DNS (if available); if there is no key available, do not change this line.

    For example:

    <?xml version="1.0" encoding="UTF-8"?><ESDDefaultPluginConfiguration><!-- EGO DNS server name --><!-- ESD_EGO_NAMESERVER>@EGO_SD_NAMESERVER@</ESD_EGO_NAMESERVER --><ESD_EGO_NAMESERVER>egonameserver</ESD_EGO_NAMESERVER><!-- EGO DNS domain name --><!-- ESD_EGO_DOMAIN>@EGO_SD_EGODOMAIN@</ESD_EGO_DOMAIN -->               <ESD_EGO_DOMAIN>service.ego</ESD_EGO_DOMAIN><!-- Corporation DNS domain name --><ESD_CORP_DOMAIN>ego.</ESD_CORP_DOMAIN>
    <!-- EGO DNS sub-domain TSIG key created by dnssec-keygen --><!-- ESD_EGO_KEY name="@EGO_SD_EGOKEYNAME@">@EGO_SD_EGOKEY@</ESD_EGO_KEY --><ESD_EGO_KEY name="ego.">rUlWkhrNFCsXkOwZBu/xVA==</ESD_EGO_KEY><!-- CORP DNS domain TSIG key created by dnssec-keygen --><!-- ESD_CORP_KEY name="@EGO_SD_CORPKEYNAME@">TSIG key</ESD_CORP_KEY --></ESDDefaultPluginConfiguration>
  3. Open named.conf.
    • Windows: EGO_TOP\eservice\esd\conf\named\conf\named.conf

    • Linux: EGO_TOP/eservice/esd/conf/named/conf/named.conf

  4. Make the following changes:
    • For key ego., change ego. to service.ego.

    • For zone "ego." IN, change ego. to service.ego.

    • For file "db.ego" (under zone "ego." IN), change db.ego to db.service.ego

    For example:

    …key service.ego. {        algorithm HMAC-MD5.SIG-ALG.REG.INT;        secret "rUlWkhrNFCsXkOwZBu/xVA==";};…zone "service.ego." IN {        type master;        file "db.service.ego";        allow-update { key ego.; };};…
  5. Rename the template file:
    • Windows: EGO_TOP\eservice\esd\conf\named\namedb\TMPL.db.EGODOMAIN.CORPDOMAIN\TMPL.db.EGODOMAIN.CORPDOMAIN to db.service.ego

    • Linux: EGO_TOP/eservice/esd/conf/named/namedb/TMPL.db.EGODOMAIN.CORPDOMAIN/TMPL.db.EGODOMAIN.CORPDOMAIN to db.service.ego

  6. Open the db.service.ego template file and make the following changes to it:
    • For @EGO_SD_EGODOMAIN@.@EGO_SD_CORPDOMAIN@., change to service.ego.

    • For @EGO_SD_NAMESERVER@.@EGO_SD_CORPDOMAIN@., change to egonameserver.ego.

    • For root.@EGO_SD_EGODOMAIN@.@EGO_SD_CORPDOMAIN@., change to root.service.ego.

    • For NS @EGO_SD_NAMESERVER@.@EGO_SD_CORPDOMAIN@., change to egonameserver.ego.

    • For NS @EGO_SD_NAMESERVER@.@EGO_SD_EGODOMAIN@.@EGO_SD_CORPDOMAIN@., change to egonameserver.service.ego.

    For example:

    $ORIGIN .$TTL 0  ; 0 seconds service.ego             IN SOA  egonameserver.ego. root.service.ego. (                                84         ; serial                                10800      ; refresh (3 hours)                                900        ; retry (15 minutes)                                604800     ; expire (1 week)                                0          ; minimum (0 seconds)                                )NS      egonameserver.ego.                       NS      egonameserver.service.ego.
  7. Request that your IT administrator add an NS record in Corp.DNS.

    For example:

    service NS egonameserver

Configure Corp.DNS server

  1. If there is a Corp.DNS in your organization, request that your IT administrator add an NS record in it.
    For example:
    $ORIGIN 
    $TTL 0  ; 0 secondsego                     IN SOA  ns.ego. root. (                                69         ; serial                                10800      ; refresh (3 hours)                                900        ; retry (15 minutes)                                604800     ; expire (1 week)                                86400      ; minimum (1 day)                                )                        NS      ns.ego.$ORIGIN ego.ns                      A       172.17.1.83 (This is the Corp.DNS IP)
    service                 NS      egonameserver
  2. If your organization does not have a Corp.DNS, request that your IT administrator create a new .zone file on the Corp.DNS server host (for example, ego.zone), and then add an NS record in it.
    • Windows: \var\named\chroot\var\named

    • Linux: /var/named/chroot/var/named

  3. Add the following information to named.conf:
    • Windows: EGO_TOP\eservice\esd\conf\named\conf\named.conf

    • Linux: EGO_TOP/eservice/esd/conf/named/conf/named.conf

    ……..key ego. {        algorithm HMAC-MD5.SIG-ALG.REG.INT;        secret "yOVFmxkFg6eiL4remz5saQ==";};…….zone "ego." IN {        type master;        file "ego.zone";        allow-update { key ego.; };};……
    Note:

    In the command line, run dnssec-keygen to generate the “secret” key in the directory \user\sbin (Windows) or /usr/sbin (Linux). For example: dnssec-keygen-a HMAC-MD5 -b 128 -n HOST ego. If a key is not required, add comment markings surrounding the key ego. section, and then set allow-update to { any; };.

  4. Verify the configuration.
    1. From the command line, run nslookup to resolve DNS name.
      For example:
      nslookup > server 172.17.5.82 [This is the Corp.DNS server IP]Default server: 172.17.5.82Address: 172.17.5.82#53> webgui.service.egoServer:         172.17.5.82  Address:        172.17.5.82#53Non-authoritative answer:Name:   webgui.service.egoAddress: 172.17.5.126 [Returns the WEBGUI service running host IP]
    2. From a browser, enter the DNS name as the GUI URL.

      For example: http:\\webgui.service.ego:8080/platform.

      Note:

      On EGO clients, you must configure the local host IP to point to Corp.DNS. On Windows hosts, change the IP to the Corp.DNS IP; on Linux hosts, point the IP to Corp.DNS in resolve.conf.

Confirm service director DNS server is running

  1. Ensure that you have started ego service ServiceDirector.
  2. Once ServiceDirector is in the RUN state, run dig to resolve its name: egodnsserver.ego.xyz.com.

    The IP address of the host where ServiceDirector is running should return.