Hi all,

Please review the code for installadm

3640 Installadm tools to manage services
http://defect.opensolaris.org/bz/show_bug.cgi?id=3640


3641 installadm tools to manage clients
http://defect.opensolaris.org/bz/show_bug.cgi?id=3641

Webrev:
http://cr.opensolaris.org/~ysundar/installadm

The code covers the following functionality:

1. create-service:
    - Setup the netimage directory (from iso or another netimage)
    - Create a DNS service
    - Start a web server associated with the DNS service
    - Create DHCP server if needed
    - Create DHCP network and add addresses to the DHCP table (if needed)
    - Create the DHCP macro for this netimage (and service)
    - Create bootfile in the /tftpboot directory
    - All the services (DHCP, TFTP, and mDNS) are setup and enabled if 
they are not running

2. delete-service
    - Remove the service
    - Remove the image if needed

3. start-service
    - Create a service with given name

4. stop-service
    - remove the given service

5. create-client
    - Create bootfile in the /tftpboot directory with the name derived 
from MACaddress
    - Create a DHCP macro for this client
    - Enable tftp service if not running

6. delete-client
    - Remove the tftp bootfile

Additional features:

1. Apache webserver will be configured at a port 5555 to host images 
(zlibs). When the image is setup, a link will be created under Apache 
docroot to point to the net image directory. The client will access the 
zlib through the link. An apache configured file will be shipped with 
this package to start a webserver at port 5555.

2. For each service, an AI webserver will be started. The code for the 
AI webserver will be reviewed separately but the webserver 
(webserver.py) is used in this code.

 Code organization:

- The main code is in installadm.c. It parses the user input and checks 
the options. Based on the options, call one more scripts. Each service 
or task is in a separate script. The scripts are:

    create-client.sh; Create a client
    delete-client.sh; Remove a client
    setup-image.sh: Add/Remove netimages and creates link to webserver
    setup-dhcp.sh: DHCP table creation, Add network, add ip addresses, 
create DHCP macro etc.
    setup-service.sh: Register/lookup/remove service, start/stop aI web 
server. Uses DNS-SD
    setup-tftp-links.sh: creates bootfile under /tftpboot
    installadm-common: Common functions between create-client.sh and 
setup-tftp-links.sh

Thank you,
Sundar & Sue

Reply via email to