-
Notifications
You must be signed in to change notification settings - Fork 0
AI Server
AI (Auto Install) is the OS deployment technology for Solaris 11
Server commands are run on the Deployment Server. Client configuation commands are run on the Deployment Server, and client creation commands are run on the host.
The commands are split into three types:
- Server configuration
- Creating OS deployment repositories from the OS installation media (ISOs)
- Client creation
- Creating client VMs
- Client configuration
- Creating client profiles
- PXE / DHCP / BOOTP configuration
- Install configurations
- Post install scripts
- Creating client profiles
This section deals with server related commands. For the client related commands refer to the AI Client Examples.
For client creation commands refer to either the VirtualBox Examples or VMware Fusion Examples.
Configure AI service from ISO:
./modest.rb --action add --type service --file /mnt/isos/Solaris/11/U4/sol-11_4-repo.iso --defaults --verbose
Unconfigure AI service sol_11_!:
./modest.rb --action delete --method ai --mode server --service sol_11_1
Configure AI services (if not repos exist, it will search /export/isos for valid repo isos to build repo):
./modest.rb --action create --method ai --mode server
The following are XML manifest examples for a Solaris 11 AI server.
Install service manifest (without alternate package repository):
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1">
<auto_install>
<ai_instance auto_reboot-"true" name-"orig_default">
<target>
<logical>
<zpool is_root-"true" name-"rpool">
<filesystem mountpoint-"/export" name-"export"/>
<filesystem name-"export/home"/>
<be name-"solaris"/>
</zpool>
</logical>
</target>
<software type-"IPS">
<destination>
<image>
<facet set-"false">facet.local.*</facet>
<facet set-"true">facet.local.en</facet>
<facet set-"true">facet.local.en_US</facet>
</image>
</destination>
<source>
<publisher name-"solaris">
<origin name-"http://192.168.1.191:10081"/>
</publisher>
</source>
<software_data action-"install">
<name>pkg:/entire@0.5.11-0.175.1</name>
<name>pkg:/group/system/solaris-large-server</name>
<name>pkg:/runtime/ruby-18</name>
</software_data>
</software>
</ai_instance>
</auto_install>
Install service manifest (with alternate package repository):
<!DOCTYPE auto_install SYSTEM "file:///usr/share/install/ai.dtd.1">
<auto_install>
<ai_instance auto_reboot-"true" name-"orig_default">
<target>
<logical>
<zpool name-"rpool" is_root-"true">
<filesystem mountpoint-"/export" name-"export"/>
<filesystem name-"export/home"/>
<be name-"solaris"/>
</zpool>
</logical>
</target>
<software type-"IPS">
<destination>
<image>
<facet set-"false">facet.local.*</facet>
<facet set-"true">facet.local.en</facet>
<facet set-"true">facet.local.en_US</facet>
</image>
</destination>
<source>
<publisher name-"solaris">
<origin name-"http://192.168.1.191:10081"/>
</publisher>
</source>
<software_data action-"install">
<name>pkg:/entire@0.5.11-0.175.1</name>
<name>pkg:/group/system/solaris-large-server</name>
<name>pkg:/runtime/ruby-18</name>
</software_data>
</software>
<software type-"IPS">
<destination>
<image>
<facet set-"false">facet.local.*</facet>
<facet set-"true">facet.local.en</facet>
<facet set-"true">facet.local.en_US</facet>
</image>
</destination>
<source>
<publisher name-"solaris">
<origin name-"http://192.168.1.191:10082"/>
</publisher>
</source>
<software_data action-"install">
<name>pkg:/application/puppet</name>
</software_data>
</software>
</ai_instance>
</auto_install>
Configuring an AI Server:
./modest.rb --action create --mode server --method ai --verbose
Information: Running in verbose mode
Setting: Work directory to /opt/modest
Determining: Default host IP
Executing: ipadm show-addr net0/v4 |grep net |awk '{print $4}' |cut -f1 -d'/'
Output: 192.168.1.191
Getting: default route
xecuting: netstat -rn |grep default |awk '{print $2}'
Output: 192.168.1.254
Checking: /etc/inet/dhcpd4.conf exists
Archiving: File /etc/inet/dhcpd4.conf to /etc/inet/dhcpd4.conf.preai
Executing: cp /etc/inet/dhcpd4.conf /etc/inet/dhcpd4.conf.preai
Getting: List of AI services
Executing: installadm list
Output: There are no services configured on this server.
Checking: If file based repository exists
Executing: pkg publisher |grep online |grep file |awk '{print $5}'
Output: file:///export/repo/sol_11_1/
Locating: Release file
Executing: cat /export/repo/sol_11_1//publisher/solaris/pkg/release%2Fname/* |grep 'release' |grep '^file' |head -1 |awk '{print $2}'
Output: 9557cc47273a76106663d8c76bf8b7bdfaeb29f0
Getting Release information
Executing: gzcat /export/repo/sol_11_1/publisher/solaris/file/95/9557cc47273a76106663d8c76bf8b7bdfaeb29f0 |head -1 |awk '{print $3}'
Output: 11.1
Checking: /export/auto_install
Executing: svccfg -s pkg/server add sol_11_1
Executing: svccfg -s pkg/server:sol_11_1 addpg pkg application
Executing: svccfg -s pkg/server:sol_11_1 setprop pkg/port-10081
Executing: svccfg -s pkg/server:sol_11_1 setprop pkg/inst_root-/export/repo/sol_11_1/
Executing: svccfg -s pkg/server:sol_11_1 addpg general framework
Executing: svccfg -s pkg/server:sol_11_1 addpropvalue general/complete astring: sol_11_1
Executing: svccfg -s pkg/server:sol_11_1 addpropvalue general/enabled boolean: true
Executing: svccfg -s pkg/server:sol_11_1 setprop pkg/readonly-true
Executing: svccfg -s pkg/server:sol_11_1 setprop pkg/proxy_base - astring: http://192.168.1.191/sol_11_1
Archiving: /etc/apache2/2.2/httpd.conf to /etc/apache2/2.2/httpd.conf.no_sol_11_1
Executing: cp /etc/apache2/2.2/httpd.conf /etc/apache2/2.2/httpd.conf.no_sol_11_1
Adding: Proxy entry to /etc/apache2/2.2/httpd.conf
Executing: echo 'ProxyPass /sol_11_1 http://192.168.1.191:10081 nocanon max-200' >>/etc/apache2/2.2/httpd.conf
Enable: Service apache22
Executing: svcadm enable apache22 ; sleep 5
Refresh: Service apache22
Executing: svcadm refresh apache22 ; sleep 5
Creating: AI services
Creating: AI service for i386
Executing: installadm create-service -a i386 -n sol_11_1_i386 -p solaris-http://192.168.1.191:10081 -d /export/auto_install/sol_11_1_i386
Output:
Creating service from: pkg:/install-image/solaris-auto-install
Startup: Caching catalogs ... Done
Startup: Refreshing catalog 'solaris' ... Done
Startup: Caching catalogs ... Done
Startup: Refreshing catalog 'solaris' ... Done
Planning: Solver setup ... Done
Planning: Running solver ... Done
Planning: Finding local manifests ... Done
Planning: Fetching manifests: 0/1 0% complete
Planning: Fetching manifests: 1/1 100% complete
Planning: Package planning ... Done
Planning: Merging actions ... Done
Planning: Checking for conflicting actions ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 0.18 seconds
Download: 0/514 items 0.0/292.3MB 0% complete
Download: Completed 292.27 MB in 3.67 seconds (79.6M/s)
Actions: 1/661 actions (Installing new actions)
Actions: Completed 661 actions in 3.59 seconds.
Finalize: Updating package state database ... Done
Finalize: Updating image state ... Done
Finalize: Creating fast lookup database ... Done
Finalize: Reading search index ... Done
Finalize: Updating search index ... Done
Refreshing install services
Refreshing install services
Creating i386 service: sol_11_1_i386
Image path: /export/auto_install/sol_11_1_i386
Creating default-i386 alias
Setting the default PXE bootfile(s) in the local DHCP configuration
to:
bios clients (arch 00:00): default-i386/boot/grub/pxegrub2
uefi clients (arch 00:07): default-i386/boot/grub/grub2netx64.efi
Creating: AI service for sparc
Executing: installadm create-service -a sparc -n sol_11_1_sparc -p solaris-http://192.168.1.191:10081 -d /export/auto_install/sol_11_1_sparc
Output:
Creating service from: pkg:/install-image/solaris-auto-install
Startup: Caching catalogs ... Done
Startup: Refreshing catalog 'solaris' ... Done
Startup: Caching catalogs ... Done
Startup: Refreshing catalog 'solaris' ... Done
Planning: Solver setup ... Done
Planning: Running solver ... Done
Planning: Finding local manifests ... Done
Planning: Fetching manifests: 0/1 0% complete
Planning: Fetching manifests: 1/1 100% complete
Planning: Package planning ... Done
Planning: Merging actions ... Done
Planning: Checking for conflicting actions ... Done
Planning: Consolidating action changes ... Done
Planning: Evaluating mediators ... Done
Planning: Planning completed in 0.17 seconds
Download: 0/45 items 0.0/237.8MB 0% complete
Download: Completed 237.76 MB in 2.36 seconds (100M/s)
Actions: 1/187 actions (Installing new actions)
Actions: Completed 187 actions in 2.34 seconds.
Finalize: Updating package state database ... Done
Finalize: Updating image state ... Done
Finalize: Creating fast lookup database ... Done
Finalize: Reading search index ... Done
Finalize: Updating search index ... Done
Service discovery fallback mechanism set up
Creating SPARC configuration file
Refreshing install services
Service discovery fallback mechanism set up
Creating SPARC configuration file
Refreshing install services
Creating sparc service: sol_11_1_sparc
Image path: /export/auto_install/sol_11_1_sparc
Creating default-sparc alias
Information: Setting date string to Tue_Dec_24_01_46_39_UTC_2013
Archiving: File /etc/inet/dhcpd4.conf to /opt/modest/dhcpd4.conf.Tue_Dec_24_01_46_39_UTC_2013
Executing: cp /etc/inet/dhcpd4.conf /opt/modest/dhcpd4.conf.Tue_Dec_24_01_46_39_UTC_2013
You will be presented with a set of questions followed by the default output
If you are happy with the default output simply hit enter
Determining: If available repository version from http://192.168.1.191:10081
Executing: pkg info -g http://192.168.1.191:10081 entire |grep Branch |awk '{print $2}'
Output: 0.175.1.0.0.24.2
Reboot after installation? [ true ]
Setting auto_reboot to true
Publisher location? [ http://192.168.1.191:10081 ]
Setting publisher_url to http://192.168.1.191:10081
Solaris repository verstion? [ pkg:/entire@0.5.11-0.175.1 ]
Setting repo_url to pkg:/entire@0.5.11-0.175.1
Server install? [ pkg:/group/system/solaris-large-server ]
Setting server_install to pkg:/group/system/solaris-large-server
Determining: Service name for i386
Executing: installadm list |grep -v default |grep 'i386' |awk '{print $1}'
Output: sol_11_1_i386
Determining: Service name for sparc
Executing: installadm list |grep -v default |grep 'sparc' |awk '{print $1}'
Output: sol_11_1_sparc
Information: Setting date string to Tue_Dec_24_01_50_31_UTC_2013
Archiving: Service configuration for sol_11_1_i386 to /opt/modest/sol_11_1_i386_orig_default.xml.Tue_Dec_24_01_50_31_UTC_2013
Executing: installadm export -n sol_11_1_i386 -m orig_default > /opt/modest/sol_11_1_i386_orig_default.xml.Tue_Dec_24_01_50_31_UTC_2013
Validating: Service configuration /opt/modest/sol_11_1_i386_ai_manifest.xml
Executing: AIM_MANIFEST-/opt/modest/sol_11_1_i386_ai_manifest.xml ; export AIM_MANIFEST ; aimanifest validate
Importing: /opt/modest/sol_11_1_i386_ai_manifest.xml to service sol_11_1_i386
Executing: installadm update-manifest -n sol_11_1_i386 -m orig_default -f /opt/modest/sol_11_1_i386_ai_manifest.xml
Information: Setting date string to Tue_Dec_24_01_50_32_UTC_2013
Archiving: Service configuration for sol_11_1_sparc to /opt/modest/sol_11_1_sparc_orig_default.xml.Tue_Dec_24_01_50_32_UTC_2013
Executing: installadm export -n sol_11_1_sparc -m orig_default > /opt/modest/sol_11_1_sparc_orig_default.xml.Tue_Dec_24_01_50_32_UTC_2013
Validating: Service configuration /opt/modest/sol_11_1_sparc_ai_manifest.xml
Executing: AIM_MANIFEST-/opt/modest/sol_11_1_sparc_ai_manifest.xml ; export AIM_MANIFEST ; aimanifest validate
Importing: /opt/modest/sol_11_1_sparc_ai_manifest.xml to service sol_11_1_sparc
Executing: installadm update-manifest -n sol_11_1_sparc -m orig_default -f /opt/modest/sol_11_1_sparc_ai_manifest.xml