How to setup AI server

From OSD-BJ
by Liu Haotian

Contents

* 1 Audience
* 2 Reference
* 3 System Requirements
* 4 Configure OpenSolaris Automated Installer
* 5 Organization of AI Service for SWAN and Lab
* 6 Known Issues

Audience

This Document talks about how to setup an AI server on OpenSolaris 200906 X86 and later version.

Reference

* OpenSolaris 2010.03 Automated Installer Guide (new)
* OpenSolaris 2008.11 Automated Installer Guide(old)
* Automated Installer Setup Instructions(old)

System Requirements

* OpenSolaris (Solaris Next) dev AI iso media.

Download OpenSolaris AI ISO from http://nana.sfbay/products/solnext_dev/

* SUNWinstalladm-tools

The SUNWinstalladm-tools package, containing the automated installer application, must be installed on your system.

On OpenSolaris, you can use the Package Manager tool to locate and to install it. Use the following IPS command to install this package:

$ pfexec pkg install SUNWinstalladm-tools

* Network access

Your installed system must have network access.

Configure OpenSolaris Automated Installer

(as root)

1. Set Up Service

* installadm create-service -s srcimage -n svcname targetdir

#installadm create-service -s /OS/ISO/os-137/osol-dev-137-ai-x86.iso -n 137-new-x86 /OS/SERVICE/os-137/137-x86

-s srcimage:
- AI iso location you just download from nana.sfbay.
-n svcname
- Uses this service name instead of default service name. If a service of
this name already exists, the user is warned, and a new service is created and named.

Note: In our server, service name is automatically created like -new-
by the scripts on jdstest24.
targetdir:
- The installadm command sets up the installation image and the OSInstall service in this specified target directory.
Note: In our server, targetdir is automatically created in /OS/SERVICE/ by the scripts on jdstest24.

2. Check web server

Check whether AI image web server is running at http://localhost:5555/. If it is not started, Start a
apache web server using the following command.
# /usr/apache2/2.2/bin/apachectl -f /var/installadm/ai-webserver/ai-httpd.conf -k start

3. Creating a Custom Client

* installadm create-client -b bootarg -e macaddr -n svcname -t servicepath

#installadm create-client -b install=true -e 0:1e:68:8e:7b:b0 -n 137-new-x86 -t /OS/SERVICE/os-137/137-x86

-b bootarg
- This option enables autoinstall service after client is rebooted.
-e macaddr
- This option identifies the MAC address for a client that you want to
customize.
-n svcname
- This option specifies the name of a service that you want to use for client
installation.
-t servicepath
- This option specifies the path of a source service that you want to use for
installation to this client.

4. Creating the Manifest Files

* The dfault manifest file is /var/ai/46501/AI_data/default.xml

The default repository http://pkg.opensolaris.org is unusable for dev version.
We need to change it to Sun SWAN repository:

http://pkg.prc:9000

or

http://ipkg.sfbay/dev/

(as root)
4.1 #cd /var/ai/46501/AI_data/
4.2 #cp default.xml default.xml.bak

4.3 #cp default.xml new.xml
4.4 Modify new.xml file
change url=”http://pkg.opensolaris.org” to url=”http://pkg.prc:9000″
4.5 #installadm add -m -n

5. Add macro in DHCP server (Need root permission)

* If you use AI server as DHCP server

/usr/sadm/admin/bin/dhcpmgr

Add a new address in Addresses tab
Client Name: hostname of client
Status: Reserved
Server: hostname of AI server
Macro: macro in the format of client MAC
Client ID: The same as Macro

* If you use another DHCP server, do it on DHCP server (mhw in our case, need root permission)

For X86 client:

#/usr/sbin/dhtadm -g -A -m CLIENT_MAC -d :BootFile=CLIENT_MAC:BootSrvA=AI_SERVER_IP:

For SPARC client:

#/usr/sbin/dhtadm -g -A -m CLIENT_MAC -d :BootSrvA=AI_SERVER_IP\
:BootFile=”http://AI_SERVER_IP:5555/cgi-bin/wanboot-cgi”\
:Rootpath=”http://AI_SERVER_IP:5555/target/image/osol-0906-106a-ai-sparc”:

6. Reboot client

For X86:
set PXE as the boot media, and ‘reboot’
For SPARC:
press ‘stop + A’ on keyboard, and ‘boot net:dhcp – install’

During the installation, you can login as jack/jack.
Check the log file to see if there is any errors:
#tail -f /tmp/install_log
At the end of installation, you see a message like ‘Installation successful, reboot’.

7. username / passwd

root/opensolaris
jack/sceri
Note: If you want to change the username / passwd, modify the string in AI manifest file.
The passwd string can be obtained from /etc/shadow file

Organization of AI Service for SWAN and Lab

* Overall.

* The AI Service for SWAN and Lab is constructed by a serials scripts on mhw(sunop/sceri421, root/****) and jdstest24(work/***). Pls contact with the net admin for the passwd.
* mhw is our DHCP server, and jdstest24 is the server where AI service is located.

1. Set Up AI Service (The script on jdstest24)

* The crontab job of root on jdstest24 will run 4 times per day.

0 6,11,18,21 * * * /autoinstall/scripts/getimg_install.sh > /autoinstall/logs/getimg_install.log 2>&1

1). Find latest AI iso on nana.sfbay

2). The script /autoinstall/scripts/getimg_install.sh will first setup environments,

3). Then download the uninstalled version of osol from nana.sfbay/products/solnext_dev/ (if available) to
/OS/ISO//.
If the ISO location is changed, you need to update the script to fit for it.

4). Setup AI service
The service will be located at /OS/SERVICE/os-/-(sparc|x86)

* Now service on jdstest24 side is complete.

2. Set Up AI Service (The script on mhw)

* The crontab job of sunop on mhw will run every hour.

0 * * * * /usr/local/bin/sudo /jumpstart/scripts/syncbootimg.sh > /jumpstart/logs/syncbootimg.log 2>&1

1). Find latest AI service on jdstest24
The script /jumpstart/scripts/syncbootimg.sh not only sync opensolaris AI service,
but also sync solaris service as well.

2). It will update the image list on the mhw.prc webpage.
The script searches /net/jdstest24/OS/SERVICE/os-/ for latest opensolaris AI service.
If available, add it to the mhw.prc webpage.

3. Set Up Client (mhw)

* cgi webpage on mhw.prc

When a net installation is set on mhw webpage, /jumpstart/webroot/htdocs/cgi-bin/setboot.cgi will be called.
The script will call /jumpstart/scripts/msetupinst.sh to setup client.
In this script, it’ll determine which OS will be installed, Solaris or OpenSolaris.
If OpenSolaris will be installed, the script will launch /jumpstart/scripts/setupinst_AI.sh.

* setupinst_AI.sh on mhw

In this script, it’ll launch a Tcl based ‘expect’ script /jumpstart/scripts/login.exp.
The expect script will automatically remote ssh access to jdstest24 to add the client(For example,
installadm create-client -b install=true -e 0:1e:68:8e:7b:b0 -n 137-new-x86 -t
OS/SERVICE/os-137/137-x86) to AI Server.
After the client is added to the AI server, /jumpstart/scripts/setupinst_AI.sh will add a macro to DHCP.

* Return value

If all the scripts have successes, the webpage will return a ‘success’ page(setboot.cgi will do it) with instructions to reboot.

4. Set Up Client (jdstest24)

* expect script

The expect script /jumpstart/scripts/login.exp will spawn installadm create-client on jdstest24, like,
send “/usr/sbin/installadm create-client -b install=true -e $MAC -n $OS_NAME -t $OS_PATH \n”

Known Issues

1.Repository name must be opensolaris.org – Fixed in 2009.1H

* Note: I don’t know whether it still exists, but we use opensolaris.org by default.

Bugzilla – Bug 4248
ICT: reset_image_uuid unconditionally tries to reset the uuid

http://defect.opensolaris.org/bz/show_bug.cgi?id=4248

2.Need to manually start Apache web service after reboot

* Note: I don’t know whether it still exists, but we restart the web server when a new service is installed.

Bugzilla – Bug 4488
Apache web services are started outside of SMF.

http://defect.opensolaris.org/bz/show_bug.cgi?id=4488

Workaround:
Check whether AI image web server is running at http://AI_server_IP:5555/ .
If it is not started, Start a apache web server using the following command.

# /usr/apache2/2.2/bin/apachectl -f /var/installadm/ai-webserver/ai-httpd.conf -k start

3.SPARC boot load failed

For AI sparc install, the OBP support required.What is the output on your client to:

# eeprom | grep network-boot-arguments

If there’s nothing returned, it means you need to update the OBP of this client.
Please refer to this wikipage for more information.

http://jdsbjwiki.prc/index.php/How_to_update_OBP_of_sparc_clients

4.How to Install a Particular OpenSolaris Development Build (Manually on AI server. Setting it on mhw will help to do it automatically.)

For sparc, run the following command to change wanboot file:

# /usr/bin/rm -f /etc/netboot/wanboot.conf
# /usr/bin/ln -s /wanboot.conf /etc/netboot

The build number or release of the AI ISO image that you specify in the installadm create-service command with the -s option must be the same build number or release of the OpenSolaris operating system that you specify in the AI manifest. In the AI manifest, if you want to install a specific version of the OpenSolaris OS, you can specify the version in the package entire. The IPS repositories include the full FMRI for each version of a package. Use the FMRI string to specify a specific version of the package, entire, in the AI manifest. Use the following form:

The following example specifies that OpenSolaris build 111 be installed to the client.

 <ai_manifest name="ai_packages">
 ...
    <ai_install_packages>
        <pkg name="entire@0.5.11-0.111"/>
        <pkg name="SUNWcsd"/>
        <pkg name="SUNWcs"/>
        <pkg name="babel_install"/>
        <pkg name="openoffice"/>
        <pkg name="SUNWTcl"/>
    </ai_install_packages>
    <ai_uninstall_packages>
        <pkg name="babel_install"/>
        <pkg name="slim_install"/>
    </ai_uninstall_packages>
 ...
 </ai_manifest>

5.Manually manage the manifest file

Sometimes it fails to add a manifest file to a AI service. It’s due to the AI service is build 129, and it has upgraded since build 134. When it’s failed to add a manifest, the follow script can be used. It will apply the original manifest file to each service.

# /autoinstall/scripts/updatemanifest.py (on jdstest24)

6.If the AI server is rebooted

Several steps should be applied on jdstest24.

* Share nfs on jdstest24, to enable remote access by /net/jdstest24/.

# share -F nfs /

* Restart AI services which installed, like:

# installadm start 137-new-x86
# installadm start 137-new-sparc
If you don’t know the service name, you can find it in /OS/SERVICE/ folder

* Start an Apache web server

# /usr/apache2/2.2/bin/httpd -f /var/installadm/ai-webserver/ai-httpd.conf

7.How to debug the AI service

* If a new build is released but not available on jdstest24

Please check the log file /autoinstall/logs/getimg_install.log on jdstest24.
The crontab script on jdstest24 will send email to jds-sp-ext@sun.com if it is successed.
If not, it will send email to net admin – ava.zhang@sun.com

* If a new service is installed on jdstest24 but not available on mhw

Please check the log file /jumpstart/logs/syncbootimg.log on mhw.

* If it returns a failure on mhw webpage

Please check /jumpstart/scripts/test on mhw, it’s the log file of the expect script login.exp.
or check the status of mhw’s DHCP service, to ensure it’s online and no other router is added to SWAN or lab.
If dhcp service on mhw is offline, you need to enable it by root, via “svcadm enable dhcp”.

8.No enough space on slice0 issue

* The AI server will automatically install system in the first slice of hard disk.
* If the value of slice0 is too small (below 13GB), you should manually manage the disk.
* A walkaround

1). Boot net from Nevada image, ctrl+C to stop installation when it start install packages.

With GUI based installation, you could start a new console by right-click and run format(1).
With text based installation, “Ctrl+C” will leads to into console.

2). Use format to allocate whole size to slice #1

# format
AVAILABLE DISK SELECTIONS:
0. c5t0d0
/pci@0,0/pci108e,534a@7/disk@0,0
Specify disk (enter its number): 0
format> p

To delete space on slice 5
———————
partition> 5
Part Tag Flag Cylinders Size Blocks
5 unassigned wm 0 0 (0/0/0)
0

Enter partition id tag[unassigned]:
Enter partition permission flags[wm]:
Enter new starting cyl[0]:
Enter partition size[0b, 0c, 0e, 0.00mb, 0.00gb]: 0

To assign space on slice 0
——————-
partition> 0
Part Tag Flag Cylinders Size Blocks
0 root wm 1 – 30396 232.85GB (30396/0/0)
488311740

Enter partition id tag[root]:
Enter partition permission flags[wm]:
Enter new starting cyl[1]:
Enter partition size[488311740b, 30396c, 30396e, 238433.47mb, 232.85gb]:
232.84gb

To write back the partition table
——————-
partition>label

3). Boot net from OpenSolaris image and install

Posted in Sun.


14 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. storage companies in upper manhattan says

    During the entire packing and moving processes,
    moving firms of Delhi NCR provides utmost care.
    Moving Companies Usually Know Good Traffic Routes- Bangkok is a huge city.
    Using a yacht delivery service is a simple decision for sea-crossings, but what
    about moving a motor yacht interstate from say Sydney to Brisbane or San Francisco to Los Angeles.

    ReplyReply
  2. black friday upright freezer deals says

    It is defined as the lowering of the core body temperature.
    If you like antiques you have to ask for help- we have many but only the locals know
    where they hide. Be sure to vacuum floors, rugs and upholstery
    your pet comes in contact with regularly.

    ReplyReply
  3. Layla Cole says

    The radio flyer pathfinder wagon with canopy article is absolutely one of the best i’ve read today.

    ReplyReply
  4. Addison Graham says

    bookmarked, great website!

    ReplyReply
  5. ร้านสกรีนเสื้อ says

    This article will help the internet visitors for creating new web site or even a blog from start to end.

    ReplyReply
  6. Bryondiply says

    right here sowa rigpa

    ReplyReply
  7. Patrickoptog says

    important link buy cvv

    ReplyReply
  8. Edwardjeono says

    блестящий веб сайт http://4xcasino.ru

    ReplyReply
  9. Michaelpiors says

    Новости смартфонов – ГТА онлайн, игры без регистрации

    ReplyReply
  10. Dwaynemayow says

    санитарная книжка екатеринбург за один день – справка 086 екатеринбург, купить санитарную книжку

    ReplyReply
  11. Glennret says

    check over here https://casinox-jp.com/

    ReplyReply
  12. MiguelRooni says

    click reference 3d game

    ReplyReply
  13. Josephlit says

    стоящий ресурс https://plays-fortuna.ru

    ReplyReply

Continuing the Discussion

  1. what is the best product for anti ageing linked to this post on 09/20/2012

    what is the best product for anti ageing…

    How to setup AI server – 晚安地球人…



Some HTML is OK

or, reply to this post via trackback.

Note: Commenter is allowed to use '@+User+:' to automatically notify your reply to other commenter.