Tuesday June 27, 2006
Extending Sun Management Center Agent Update The feature Agent Update was added to sunmc 3.5 to fascilitate the mass deployment of sunmc agents, addons and patches. However it can be utilized to deploy many things such as a sunmc module, a bunch of files or even a small application not at all related to sunmc.
How could one do that ?
Well, the prerequisites are:
SUNWsymon SUNWsymon/mdr SUNWsymon/mdr/modules SUNWsymon/mdr/modules/cfg SUNWsymon/mdr/modules/cfg/mymodule-d.x SUNWsymon/mdr/modules/cfg/mymodule-d.prc SUNWsymon/mdr/modules/cfg/mymodule-m.x SUNWsymon/mdr/modules/cfg/mymodule-d.def SUNWsymon/mdr/modules/cfg/mymodule-models-d.x SUNWsymon/modules SUNWsymon/modules/cfg SUNWsymon/modules/cfg/mymodule-d.x SUNWsymon/modules/cfg/mymodule-d.prc SUNWsymon/modules/cfg/mymodule-m.x SUNWsymon/modules/cfg/mymodule-d.def SUNWsymon/modules/cfg/mymodule-models-d.x SUNWsymon/modules/sbin SUNWsymon/modules/sbin/mymodule_actions.sh SUNWsymon/modules/lib
$ pkgproto * d none SUNWsymon 0755 amol staff d none SUNWsymon/mdr 0755 amol staff d none SUNWsymon/mdr/modules 0755 amol staff d none SUNWsymon/mdr/modules/cfg 0755 amol staff f none SUNWsymon/mdr/modules/cfg/mymodule-d.x 0444 amol staff ... ... f none SUNWsymon/modules/sbin/mymodule_actions.sh 0444 amol staff d none SUNWsymon/modules/lib 0755 amol staff
CLASSES='none' BASEDIR='/opt' PKG='SUNWmymod' NAME='My module' DESC='My module' ARCH='sparc' CATEGORY='system,SyMON' VERSION='3.6.1,REV=2.10.2006.04.27' SUNW_PRODNAME='Sun Management Center' SUNW_PRODVERS='3.6.1' SUNW_PKGVERS='1.0' VENDOR='Sun Microsystems, Inc.' HOTLINE='Please contact your local service provider' EMAIL='' MAXINST='1000' PRODUCTDIR='SUNWsymon'
pkgmk -o -d . -r . ## Building pkgmap from package prototype file. ## Processing pkginfo file. ... ... ## Validating control scripts. ## Packaging complete.
----- installation.info
<PRODUCT>
PRODUCT_KEY=PRODUCT.MYADDON
PACKAGES_SUBDIR=Basic
<COMPONENT>
COMPONENT_KEY=COMPONENT.SERVER
COMPONENT_CD=2
ESSENTIAL=true
LAYER=LAYER.SERVER
PACKAGES=SUNWmymods
</COMPONENT>
<COMPONENT>
COMPONENT_KEY=COMPONENT.AGENT
COMPONENT_CD=2
ESSENTIAL=true
LAYER=LAYER.AGENT
PACKAGES=SUNWmymod
</COMPONENT>
</PRODUCT>
----- installation.properties
PRODUCT.MYADDON=My Addon
LAYER.SERVER=Server Layer
LAYER.AGENT=Agent Layer
PACK.BASIC=My Addon
COMPONENT.SERVER=My Addon Server Component
COMPONENT.AGENT=My Addon Agent Component
disk1/image/SunOS/sparc/Addons/MyAddon/Solaris_10/installation.info disk1/image/SunOS/sparc/Addons/MyAddon/Solaris_10/installation.properties disk1/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymod/pkgmap disk1/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymod/pkginfo disk1/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymods/pkgmap disk1/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymods/pkginfo disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/installation.info disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/installation.properties disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymod/pkgmap disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymod/pkginfo disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymod/reloc/SUNWsymon/mdr/modules/cfg/mymodule-d.def ... ... disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymod/reloc/SUNWsymon/modules/cfg/mymodule-models-d.x ... ... disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymods/pkgmap disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymods/pkginfo disk2/image/SunOS/sparc/Addons/MyAddon/Solaris_10/Basic/SUNWmymods/reloc/SUNWsymon/addons/MyAddon/sbin/setup-resp.sh
$ es-inst -S/disk1/image ... ... Found: My Addon The following Add-On Products are applicable for installation. My Addon Select the products you want to install: My Addon (y|n|q)
$ es-imagetool
...
...
This script will help you to create distributable images of Sun (TM) Management Center software
...
...
Enter image name : myaddon-image
...
...
Checking for Available products. Please wait...
Found: My Addon
...
...
Select the products you want to install:
My Addon (y|n|q) y
...
...
Gathering Addon setup responses for Solaris-sparc ...
My Addon
---------------------------------------
...
Starting image creation...
adding Addons
archiving addons..
-----------------------------------------------
packages for product My Addon : SUNWmymod
Adding SUNWmymod
a ././Solaris_10/Basic/SUNWmymod/ 0K
...
a ././Solaris_10/Basic/SUNWmymod/reloc/SUNWsymon/mdr/modules/cfg/mymodule-d.def 1K
...
...
a ././Solaris_10/Basic/SUNWmymod/reloc/SUNWsymon/modules/sbin/mymodule_actions.sh 3K
