Metapackage is on DC and AI instaling faster then just list of packages
Čtvrtek VII 16, 2009
During Reduced OpenSolaris 200906 Prototyping I found then installing is in DC and AI much faster when I use only fully local repository in addition with one Metapackage definition.
Here is sample code which can be used in addition of Fully local IPS mirror for faster DC and AI experimenting to speed up DC and AI install process.
Note: To simplify operations and save space I use 2 separate x86 and SPARC repositories.
#!/bin/sh
ISA_INFO=`/sbin/uname -p`
echo "INFO: We are on platform: $ISA_INFO"
if [ $ISA_INFO = "sparc" ] ; then
my_arch=sparc
else
my_arch=i386
fi
# Create manifest first
echo "set name=variant.arch value=$my_arch " >/tmp/sample.manifest.$my_arch
echo "set name=publisher value=VirtualGuru.localhost" >>/tmp/sample.manifest.$my_arch
echo 'set name=description value="Sample 200906 Prototype Cluster"' >>/tmp/sample.manifest.$my_arch
# Grep out custom Cloud/LDoms related packages from my default OpenSolaris 200906 list of packages FMRIs
if [ $ISA_INFO = "sparc" ] ; then
cat $1 | grep -v "^#" | sed s%\pkg:/%%| egrep -v "ldomsmanager" | xargs -n 1 | awk \
'{print "depend fmri="$1" type=require variant.arch=sparc"}'>>/tmp/sample.manifest.$my_arch
else
cat $1 | grep -v "^#" | sed s%\pkg:/%% |egrep -v "SUNWpoold|SUNWruby18|SUNWj6rt" | xargs -n 1 | awk \
'{print "depend fmri="$1" type=require variant.arch=i386"}'>>/tmp/sample.manifest.$my_arch
fi
# Publish it with include command
eval `pkgsend -s http://localhost:10000 open jeos-proto@0.5.11,5.11-0.111`
pkgsend -s http://localhost:10000 include /tmp/sample.manifest.$my_arch
pkgsend -s http://localhost:10000 close
Here is sample of Metapackage manifest:
set name=variant.arch value=i386 set name=publisher value=VirtualGuru.localhost set name=description value="Sample Prototype Cluster" depend fmri=SUNWDTraceToolkit@0.5.11,5.11-0.111:20090508T152716Z type=require variant.arch=i386 depend fmri=SUNWPython-extra@0.5.11,5.11-0.111:20090508T152808Z type=require variant.arch=i386 depend fmri=SUNWPython@2.4.4,5.11-0.111:20090508T152730Z type=require variant.arch=i386 depend fmri=SUNWTcl@8.4.18,5.11-0.111:20090508T153013Z type=require variant.arch=i386 depend fmri=SUNWTk@8.4.18,5.11-0.111:20090508T153023Z type=require variant.arch=i386 depend fmri=SUNWadmap@0.5.11,5.11-0.111:20090508T153036Z type=require variant.arch=i386 depend fmri=SUNWadmlib-sysid@0.5.11,5.11-0.111:20090508T153039Z type=require variant.arch=i386 ......When installing use it in DC and AI like this:
<ai_install_packages> <pkg name="entire@0.5.11-0.111"/> <!-- entire incorporation (Locked for 200906 release) --> <pkg name="SUNWcsd"/> <!-- Core Solaris Devices --> <pkg name="SUNWcs"/> <!-- Core Solaris --> <pkg name="sample-proto"/> <!-- Sample Metapackage --> </ai_install_packages>
Tags: clound jeos opensolaris virtualbox virtualization vmware










