Hi Ethan and Dave,
Introduction - It's probably tangential to this work, but it may be worth
considering whether the criteria mechanism should be made usable on the
bootable AI media, to assist with self-contained turnkey media installation
solutions. Architecturally is there a reason why it shouldn't be usable?
Our criteria mechanism lives in an install service, and the
interface to the selection mechanism is through a webserver,
so that's a little bit limiting for us to be able to do this.
It would be useful for non wanboot-able SPARC or for one to use an install
server when the local subnet isn't properly configured (i.e. dns-sd isn't
providing the aiwebserver tag for the desired service).
As the AI webserver presents a different XML doc structure for the
criteria handshake at http://<ai webserver>/manifest.xml versus an AI
manifest (say http://<ai webserver>/manfiests/defautl.xml), we can "do the
right thing".
The required changes to manifest-locator, get_manifest and
ai_get_manifest.py would be pretty simple as I've mocked up and tested the
following:
http://cr.opensolaris.org/~clayb/prompt_with_criteria/
Two interesting side effects is that we could now publish hostnames in the
aiwebserver mDNS text record if we wanted and expected clients to have a
nameservice available. Of course, not all environments provide a
nameservice, however. The other effect, we can now publish a record as
aiwebserver=http://<ai webserver IP>:<port> so that it's more clear what
is being advertised, opposed to our current specification which omits the
protocol (the "http://" string).
The user is presented with:
Using a plain XML file:
-----------------------
Enter the URL for the AI manifest [HTTP, default]: nifests/default.xml
<
Obtaining manifest from the following location:
http://jumprope:46501/manifests/default.xml
--2010-04-28 15:53:00-- http://jumprope:46501/manifests/default.xml
idn_decode failed (9): `System iconv failed'
Resolving jumprope... 172.20.24.78
idn_decode failed (9): `System iconv failed'
Connecting to jumprope|172.20.24.78|:46501... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3440 (3.4K) [application/x-download]
Saving to: `/var/ai/default.xml'
100%[======================================>] 3,440 --.-K/s in 0s
2010-04-28 15:53:00 (31.5 MB/s) - `/var/ai/default.xml' saved [3440/3440]
Auto-installer disabled. Enable the auto-installer service
by running the following command:
svcadm enable svc:/application/auto-installer:default
Using criteria selection:
-------------------------
Enter the URL for the AI manifest [HTTP, default]: http://jumprope:46501
Obtaining manifest from the following location: http://jumprope:46501
Connected to AI Webserver:
<AISC_I 04/28 22:52:31> Service list: /tmp/service_list.2025
<AISC_I 04/28 22:52:31> Manifest file: /var/ai/default.xml
<AISC_I 04/28 22:52:31> cmd:/usr/bin/uname -i
<AISC_I 04/28 22:52:31> cmd:/usr/sbin/ifconfig -au | /usr/bin/grep
'[0-9]:' | /usr/bin/grep -v 'LOO
PBACK'
<AISC_I 04/28 22:52:31> Network interface obtained: e1000g0
<AISC_I 04/28 22:52:31> cmd:/usr/sbin/ifconfig e1000g0
<AISC_I 04/28 22:52:31> Client MAC address: 00144f0f256e
<AISC_I 04/28 22:52:31> Client IP address: 172020024042
<AISC_I 04/28 22:52:31> cmd:/usr/sbin/prtconf -vp | /usr/bin/grep '^Memory
size: '
<AISC_I 04/28 22:52:31> prtconf(1M) reported: 8064 Megabytes
<AISC_I 04/28 22:52:31> cmd:/usr/bin/uname -m
<AISC_I 04/28 22:52:31> cmd:/usr/bin/uname -p
<AISC_I 04/28 22:52:31> Mask: FFFFFC00, IP: AC14182A, Network: AC141800
<AISC_I 04/28 22:52:31> Client net: 172020024000
<AISC_I 04/28 22:52:31> Client can supply following criteria
<AISC_I 04/28 22:52:31> network=172020024000, 'Client network address'
<AISC_I 04/28 22:52:31> mem=8064, 'Physical memory size'
<AISC_I 04/28 22:52:31> hostname=opensolaris, 'Client hostname'
<AISC_I 04/28 22:52:31> platform=SUNW,Sun-Fire-T200, 'Client platform'
<AISC_I 04/28 22:52:31> mac=00144f0f256e, 'Client MAC address'
<AISC_I 04/28 22:52:31> ipv4=172020024042, 'Client IP address'
<AISC_I 04/28 22:52:31> arch=sun4v, 'Client machine architecture'
<AISC_I 04/28 22:52:31> cpu=sparc, 'Client processor type'
<AISC_I 04/28 22:52:31> Starting to contact AI services provided by
/tmp/service_list.2025
<AISC_I 04/28 22:52:31> AI service: 172.20.24.78:46501
<AISC_I 04/28 22:52:31> Asking for criteria list:
<AISC_I 04/28 22:52:31> HTTP GET 172.20.24.78:46501/manifest.xml
<AISC_I 04/28 22:52:31> List of criteria to be sent:
<AISC_I 04/28 22:52:31> Sending list of criteria, asking for manifest:
<AISC_I 04/28 22:52:31> HTTP POST {} 172.20.24.78:46501
<AISC_I 04/28 22:52:31> postData=
<AISC_I 04/28 22:52:31> 172.20.24.78:46501 AI service provided valid
manifest
<AISC_I 04/28 22:52:31> Saving manifest to /var/ai/default.xml
Auto-installer disabled. Enable the auto-installer service
by running the following command:
svcadm enable svc:/application/auto-installer:default
Thank you,
Clay
_______________________________________________
caiman-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/caiman-discuss