You are here

Part6. Ignite Series: Create a software Depot and add it at installation/recovery time

Creating Depots/bundle, and inserting in installation/recovery:

We are first are going to create a couple of depots on the ignite server, with GNU software for hp-ux 11.23 and 11.31:

We have the software uploaded to /var/tmp:

-rw-r--r-- 1 root sys 4270080 Mar 20 05:20 curl-7.23.1-ia64-11.23.depot
-rw-r--r-- 1 root sys 1310720 Mar 20 05:20 editline-2.9-ia64-11.23.depot
-rw-r--r-- 1 root sys 1239040 Mar 20 05:20 expat-2.0.1-ia64-11.23.depot
-rw-r--r-- 1 root sys 1638400 Mar 20 05:20 flex-2.5.35-ia64-11.23.depot
-rw-r--r-- 1 root sys 10864640 Mar 20 05:21 gmp-5.0.2-ia64-11.23.depot
-rw-r--r-- 1 root sys 15493120 Mar 20 05:21 gnutls-3.0.11-ia64-11.23.depot
-rw-r--r-- 1 root sys 24883200 Mar 20 05:21 heimdal-1.0.2-ia64-11.23.depot
-rw-r--r-- 1 root sys 4710400 Mar 20 05:22 libgcrypt-1.5.0-ia64-11.23.depot
-rw-r--r-- 1 root sys 522240 Mar 20 05:22 libgpg_error-1.10-ia64-11.23.depot
-rw-r--r-- 1 root sys 1996800 Mar 20 05:22 libidn-1.23-ia64-11.23.depot
-rw-r--r-- 1 root sys 1280000 Mar 20 05:22 libtasn1-2.11-ia64-11.23.depot
-rw-r--r-- 1 root sys 552960 Mar 20 05:22 lsof-4.84-ia64-11.31.depot
-rw-r--r-- 1 root sys 1996800 Mar 20 05:22 lzo-2.06-ia64-11.23.depot
-rw-r--r-- 1 root sys 1597440 Mar 20 05:22 m4-1.4.16-ia64-11.23.depot
-rw-r--r-- 1 root sys 2560000 Mar 20 05:22 nettle-2.4-ia64-11.23.depot
-rw-r--r-- 1 root sys 35901440 Mar 20 05:22 openldap-2.4.28-ia64-11.23.depot
-rw-r--r-- 1 root sys 26777600 Mar 20 05:23 openssl-1.0.0f-ia64-11.23.depot
-rw-r--r-- 1 root sys 1187840 Mar 20 05:23 p11_kit-0.9-ia64-11.23.depot
-rw-r--r-- 1 root sys 66375680 Mar 20 05:24 perl-5.10.1-ia64-11.23.depot
-rw-r--r-- 1 root sys 2703360 Mar 20 05:24 readline-6.2.001-ia64-11.23.depot
-rw-r--r-- 1 root sys 2068480 Mar 20 05:24 termcap-1.3.1-ia64-11.23.depot
-rw-r--r-- 1 root sys 2897920 Mar 20 05:24 wget-1.13.4-ia64-11.23.depot
-rw-r--r-- 1 root sys 829440 Mar 20 05:24 zlib-1.2.5-ia64-11.23.depot
-rw-r--r-- 1 root sys 2703360 Mar 20 05:28 grep-2.10-ia64-11.31.depot
-rw-r--r-- 1 root sys 20121600 Mar 20 05:29 gettext-0.18.1.1-ia64-11.31.depot
-rw-r--r-- 1 root sys 3246080 Mar 20 05:29 libiconv-1.14-ia64-11.31.depot
-rw-r--r-- 1 root sys 8625 Mar 20 05:32 swagent.log

We create 2 depots, one for 11.23 and another one for 11.31

root@SlowDeath:/var/tmp>mkdir /var/opt/ignite/depots/Rel_B.11.23/freeware
root@SlowDeath:/var/tmp> for i in $(ls *11.23.depot)
> do
> NAME=$(echo $i | cut -d "-" -f 1)
> swcopy -s $PWD/$i $NAME @ /var/opt/ignite/depots/Rel_B.11.23/freeware
> done
root@SlowDeath:/var/tmp>mkdir /var/opt/ignite/depots/Rel_B.11.31/freeware
root@SlowDeath:/var/tmp> for i in $(ls *11.31.depot)
> do
> NAME=$(echo $i | cut -d "-" -f 1)
> swcopy -s $PWD/$i $NAME @ /var/opt/ignite/depots/Rel_B.11.31/freeware
> done

Once the copy has finished we can check our depots:

root@SlowDeath:/var/tmp> swlist -l depot
# Initializing...
# Target "SlowDeath" has the following depot(s):
/var/opt/ignite/depots/Rel_B.11.23/core
/iuxcdrom0
/var/opt/ignite/depots/Rel_B.11.11/core
/var/opt/ignite/depots/recovery_cmds
/var/opt/ignite/depots/Rel_B.11.31/core
/var/opt/ignite/depots/Rel_B.11.23/freeware
/var/opt/ignite/depots/Rel_B.11.31/freeware
root@SlowDeath:/var/tmp> swlist -s /var/opt/ignite/depots/Rel_B.11.31/freeware
# Initializing...
# Contacting target "SlowDeath"...
#
# Target: SlowDeath:/var/opt/ignite/depots/Rel_B.11.31/freeware
#

#
# No Bundle(s) on SlowDeath:/var/opt/ignite/depots/Rel_B.11.31/freeware
# Product(s):
#

gettext 0.18.1.1 gettext
grep 2.10 grep
libiconv 1.14 libiconv
lsof 4.84 lsof

Ok, as you can see we have lsof, grep and it's dependencies, they are only products, we need to make a bundle when using Ignite-UX because commands like make_config only work with software that is contained within a bundle. Therefore, if you create a configuration file for a depot and it contains software that is packaged only as an SD product, it is not listed in a configuration file created by make_config.

So in our example we are going to make a bundle with all the software in the 11.32 freeware depot, so we can install all at once:

The make_bundles command has the following three forms:
/opt/ignite/bin/make_bundles {-b|-B} [-i] [-n name] [-t title] [-c category] [-o psf] [-r revision] depot_path
/opt/ignite/bin/make_bundles [-b] [-p|-f] [-i] [-c category] [-o psf] depot_path
/opt/ignite/bin/make_bundles {-p|-f|-B} [-i] [-c category] [-o psf] [-l file| product/fileset...] depot_path

The make_bundles command is primarily controlled by the –B or –b options. The –b option causes make_bundles to operate on all product filesets 8 that are not contained within a bundle. The –B option causes all product filesets in the depot (or those given on the command line) to be operated on regardless of whether they are currently in a bundle or not.

So in our case we do:

root@SlowDeath:/opt/ignite/bin> ./make_bundles -b -i -n "11_31_GNU_PACK" -t "11.31 software install pack(lsof,grep)" -r 1.0 /var/opt/ignite/depots/Rel_B.11.31/freeware
Generating list of unbundled filesets...

======= 03/20/11 05:53:25 WET BEGIN swpackage SESSION

* Session started for user "root@SlowDeath".

* Source: SlowDeath:/var/tmp/psf.21298
* Target:
SlowDeath:/var/opt/ignite/depots/Rel_B.11.31/freeware
* Software selections:
*

* Beginning Selection Phase.
* Reading the Product Specification File (PSF)
"/var/tmp/psf.21298".
* Reading the bundle "11_31_GNU_PACK" at line 11.

* Selection Phase succeeded.

* Beginning Analysis Phase.
* Analysis Phase succeeded.

* Beginning Package Phase.

* Packaging the bundle
"11_31_GNU_PACK,r=1.0,a=HP-UX_B.11.31_64".
* Package Phase succeeded.

======= 03/20/11 05:53:26 WET END swpackage SESSION

And the result is:

root@SlowDeath:/opt/ignite/bin> swlist -d @ /var/opt/ignite/depots/Rel_B.11.31/freeware
# Initializing...
# Contacting target "SlowDeath"...
#
# Target: SlowDeath:/var/opt/ignite/depots/Rel_B.11.31/freeware
#

#
# Bundle(s):
#

11_31_GNU_PACK 1.0 11.31 software install pack(lsof,grep)

root@SlowDeath:/opt/ignite/bin> swlist -s /var/opt/ignite/depots/Rel_B.11.31/freeware 11_31_GNU_PACK
# Initializing...
# Contacting target "SlowDeath"...
#
# Target: SlowDeath:/var/opt/ignite/depots/Rel_B.11.31/freeware
#

# 11_31_GNU_PACK 1.0 11.31 software install pack(lsof,grep)
11_31_GNU_PACK.gettext 0.18.1.1 gettext
11_31_GNU_PACK.lsof 4.84 lsof
11_31_GNU_PACK.libiconv 1.14 libiconv
11_31_GNU_PACK.grep 2.10 grep
root@SlowDeath:/opt/ignite/bin>

We do the same with the 11.23 software with the final result:

root@SlowDeath:/opt/ignite/bin> swlist -d @ /var/opt/ignite/depots/Rel_B.11.23/freeware
# Initializing...
# Contacting target "SlowDeath"...
#
# Target: SlowDeath:/var/opt/ignite/depots/Rel_B.11.23/freeware
#

#
# Bundle(s):
#

11_23_GNU_PACK 1.0 11.23 software install pack(curl,wget,etc)
root@SlowDeath:/opt/ignite/bin> swlist -s /var/opt/ignite/depots/Rel_B.11.23/freeware 11_23_GNU_PACK
# Initializing...
# Contacting target "SlowDeath"...
#
# Target: SlowDeath:/var/opt/ignite/depots/Rel_B.11.23/freeware
#

# 11_23_GNU_PACK 1.0 11.23 software install pack(curl,wget,etc)
11_23_GNU_PACK.curl 7.23.1 curl
11_23_GNU_PACK.zlib 1.2.5 zlib
11_23_GNU_PACK.wget 1.13.4 wget
11_23_GNU_PACK.termcap 1.3.1 termcap
11_23_GNU_PACK.readline 6.2.001 readline
11_23_GNU_PACK.perl 5.10.1 perl
11_23_GNU_PACK.p11_kit 0.9 p11_kit
11_23_GNU_PACK.openssl 1.0.0f openssl
11_23_GNU_PACK.openldap 2.4.28 openldap
11_23_GNU_PACK.nettle 2.4 nettle
11_23_GNU_PACK.m4 1.4.16 m4
11_23_GNU_PACK.lzo 2.06 lzo
11_23_GNU_PACK.libtasn1 2.11 libtasn1
11_23_GNU_PACK.libidn 1.23 libidn
11_23_GNU_PACK.libgpg_error 1.10 libgpg_error
11_23_GNU_PACK.libgcrypt 1.5.0 libgcrypt
11_23_GNU_PACK.heimdal 1.0.2 heimdal
11_23_GNU_PACK.gnutls 3.0.11 gnutls
11_23_GNU_PACK.gmp 5.0.2 gmp
11_23_GNU_PACK.flex 2.5.35 flex
11_23_GNU_PACK.expat 2.0.1 expat
11_23_GNU_PACK.editline 2.9 editline
root@SlowDeath:/opt/ignite/bin>

Ok, so now we have a couple of depots, that we want to be able to install, when we are installing(golden image/clone/new install) with ignite-ux a new server. we first have to create a config file using the make_config command, make_config constructs Ignite-UX configuration files which correspond to Software Distributor (SD) depots. When an SD depot is used as part of the Ignite-UX process, it must have a config file which describes the contents of the depot to Ignite-UX. This command may automatically construct such a config file given the name of an SD depot on which to operate. This command should be run when adding or changing a depot that will be used by Ignite-UX. make_config only generates information for SD bundles within a depot. All HP software is packaged in SD bundle form; products not contained in bundles are ignored.

root@SlowDeath:/> make_config -l 1 -v -s /var/opt/ignite/depots/Rel_B.11.23/freeware -a both -c freeware-11.23.config
NOTE: make_config can sometimes take a long time to complete. Please be patient!
root@SlowDeath:/> cat freeware-11.23.config
#########################################################
## Config file: "freeware-11.23.config"
## Date: Sun Mar 20 06:18:14 2011
## Created by Version: Ignite-UX Revision C.7.7.98
#########################################################

#########################################################
## Software Sources
#########################################################

sw_source "/var/opt/ignite/depots/Rel_B.11.23/freeware" {
source_type = "NET"
sd_server = "19.132.168.63"
sd_depot_dir = "/var/opt/ignite/depots/Rel_B.11.23/freeware"
source_format = SD
}

######################################################
## Other Software
#####################################################

sw_sel "11_23_GNU_PACK" {
(_hp_os_bitness == "64") {
description = "11.23 software install pack(curl,wget,etc)"
sw_source = "/var/opt/ignite/depots/Rel_B.11.23/freeware"
sw_category = "Uncategorized"
(release > "B.11.23") {
sw_category += "-Non-OE-"
}
sd_software_list = "11_23_GNU_PACK,r=1.0,a=HP-UX_B.11.23_64"
impacts = "/usr" 239248Kb
visible_if = TRUE
}
else {
visible_if = FALSE
}
}

t@SlowDeath:/> make_config -l 1 -v -s /var/opt/ignite/depots/Rel_B.11.31/freeware -a both -c freeware-11.31.config
NOTE: make_config can sometimes take a long time to complete. Please be patient!
root@SlowDeath:/> cat freeware-11.31.config
#########################################################
## Config file: "freeware-11.31.config"
## Date: Sun Mar 20 06:19:04 2011
## Created by Version: Ignite-UX Revision C.7.7.98
#########################################################

#########################################################
## Software Sources
#########################################################

sw_source "/var/opt/ignite/depots/Rel_B.11.31/freeware" {
source_type = "NET"
sd_server = "19.132.168.63"
sd_depot_dir = "/var/opt/ignite/depots/Rel_B.11.31/freeware"
source_format = SD
}

######################################################
## Other Software
#####################################################

sw_sel "11_31_GNU_PACK" {
(_hp_os_bitness == "64") {
description = "11.31 software install pack(lsof,grep)"
sw_source = "/var/opt/ignite/depots/Rel_B.11.31/freeware"
sw_category = "Uncategorized"
(release > "B.11.23") {
sw_category += "-Non-OE-"
}
sd_software_list = "11_31_GNU_PACK,r=1.0,a=HP-UX_B.11.31_64"
impacts = "/usr" 27952Kb
visible_if = TRUE
}
else {
visible_if = FALSE
}
}

We copy the files to the data dir of their release:

root@SlowDeath:/> cp freeware-11.31.config /var/opt/ignite/data/Rel_B.11.31
root@SlowDeath:/> cp freeware-11.23.config /var/opt/ignite/data/Rel_B.11.23

We modify the INDEX file using manage_index, to add our new freeware depot:

root@SlowDeath:/var/opt/ignite> cat INDEX
# /var/opt/ignite/INDEX
# This file is used to define the Ignite-UX configurations
# and to define which config files are associated with each
# configuration. See the ignite(5), instl_adm(4), and
# manage_index(1M) man pages for details.
#
# NOTE: The manage_index command is used to maintain this file.
# Comments, logic expressions and formatting changes are not
# preserved by manage_index.
#
# WARNING: User comments (lines beginning with '#' ), and any user
# formatting in the body of this file are _not_ preserved
# when the version of Ignite-UX is updated.
#
cfg "HP-UX B.11.23 Default" {
description "This selection supplies the default system configuration that HP supplies for the B.11.23 release."
"/opt/ignite/data/Rel_B.11.23/config"
"/opt/ignite/data/Rel_B.11.23/hw_patches_cfg"
"/var/opt/ignite/data/Rel_B.11.23/core_cfg"
"/var/opt/ignite/config.local"
"/var/opt/ignite/data/Rel_B.11.23/freeware-11.23.config"
}
cfg "HP-UX B.11.11 Default" {
description "This selection supplies the default system configuration that HP supplies for the B.11.11 release."
"/opt/ignite/data/Rel_B.11.11/config"
"/opt/ignite/data/Rel_B.11.11/hw_patches_cfg"
"/var/opt/ignite/data/Rel_B.11.11/core_cfg"
"/var/opt/ignite/config.local"
}
cfg "HP-UX B.11.31 Default" {
description "This selection supplies the default system configuration that HP supplies for the B.11.31 release."
"/opt/ignite/data/Rel_B.11.31/config"
"/opt/ignite/data/Rel_B.11.31/hw_patches_cfg"
"/var/opt/ignite/data/Rel_B.11.31/core_cfg"
"/var/opt/ignite/config.local"
"/var/opt/ignite/data/Rel_B.11.31/freeware-11.31.config"
}=TRUE
cfg "HP-UX B.11.31 Golden Image DCOE 1003" {
description "11.31 DCOE Golden IMAGE releas:1003 ready to use"
"/opt/ignite/data/Rel_B.11.31/config"
"/var/opt/ignite/data/HP-UX_B.11.31_DCOE/core_archive_cfg"
"/var/opt/ignite/config.local"
"/var/opt/ignite/data/Rel_B.11.31/freeware-11.31.config"
}

This way when we are installing a system at the ignite GUI, on the software tab, we will have the option to install our Gnu depot:

/opt/ignite/bin/itool () ┐
│ │
│ ┌───────┐┌──────────┐┌────────┐┌─────────────┐┌──────────┐ │
│ │ Basic ││ Software ││ System ││ File System ││ Advanced │ │
│ ┌────────/ \───────────────────────────────────────────────────────┐│
│ │ ││
│ │ Category Marked ? Product Description ││
│ │┌─────────────────┐ ┌────────────────────────────────────────────────────┐ ││
│ ││ All ^ │ No 11_31_GNU_PACK 11.31 software install p ^ ││
│ ││ -Non-OE- │ ││
│ ││ Uncategorized │ ││
│ ││ │ ││
│ ││ │ ││
│ ││ │ ││
│ ││ v │ v ││
│ │└─────────────────┘ └< >┘ ││
│ │ ││
│ │ Sort by: [ Product ->] [ Change Depot Location... ] ││
│ └───────────────────────────────────────────────────────────────────────────┘│
│ [ Show Summary... ] [ Reset Configuration ] │
│──────────────────────────────────────────────────────────────────────────────│
│ [ Go! ] [ Cancel ] [ Help ] │
└──────────────────────────────────────────────────────────────────────────────┘

On another example imagine you want to clone a server from a already working server, you would do all the steps mentioned in our first series post, and after you copy the ignites source configuration(CINDEX,recovery) to your destination mac dir, you would add the config file from our GNU depot to the CINDEX file like this:

root@SlowDeath:/var/opt/ignite/clients/0x0017A4770000> ls
CINDEX client_status config.sys host.info install.log io.info recovery
client_name config env.vars hw.info install.log.prev manifest tmp.cfg
root@SlowDeath:/var/opt/ignite/clients/0x0017A4770000> cat CINDEX
# CINDEX
# This file is used to define the Ignite-UX configurations
# and to define which config files are associated with each
# configuration. See the ignite(5), instl_adm(4), and
# manage_index(1M) man pages for details.
#
# NOTE: The manage_index command is used to maintain this file.
# Comments, logic expressions and formatting changes are not
# preserved by manage_index.
#
# WARNING: User comments (lines beginning with '#' ), and any user
# formatting in the body of this file are _not_ preserved
# when the version of Ignite-UX is updated.
#
cfg "2012-01-10,15:41 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-10,15:41/system_cfg"
"recovery/2012-01-10,15:41/control_cfg"
"recovery/2012-01-10,15:41/archive_cfg"
"/var/opt/ignite/data/HP-UX_B.11.31_DCOE/freeware-11.31.config" ------> this is the config line we add
}=TRUE
root@SlowDeath:/var/opt/ignite/clients/0x0017A4770000>

And thats all once you start the advanced install ignite gui, you will find in the software tab, your FREEWARE depot ready to select in case you want to install it.

Although I have to say, the correct way to operate is to create a configi.local file inside the recovery dir, so it gets automatically added when you create new backup archives, so for example I'm going to execute 2 more make_net_recoverys for the client, and check out what happens:

root@SlowDeath:/var/opt/ignite/clients/0x0017A4770000> cat CINDEX
# CINDEX
# This file is used to define the Ignite-UX configurations
# and to define which config files are associated with each
# configuration. See the ignite(5), instl_adm(4), and
# manage_index(1M) man pages for details.
#
# NOTE: The manage_index command is used to maintain this file.
# Comments, logic expressions and formatting changes are not
# preserved by manage_index.
#
# WARNING: User comments (lines beginning with '#' ), and any user
# formatting in the body of this file are _not_ preserved
# when the version of Ignite-UX is updated.
#
cfg "2012-01-10,15:41 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-10,15:41/system_cfg"
"recovery/2012-01-10,15:41/control_cfg"
"recovery/2012-01-10,15:41/archive_cfg"
"/var/opt/ignite/data/HP-UX_B.11.31_DCOE/freeware-11.31.config"
}

cfg "2012-01-20,13:09 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-20,13:09/system_cfg"
"recovery/2012-01-20,13:09/control_cfg"
"recovery/2012-01-20,13:09/archive_cfg"
}
cfg "2012-01-20,13:51 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-20,13:51/system_cfg"
"recovery/2012-01-20,13:51/control_cfg"
"recovery/2012-01-20,13:51/archive_cfg"
}=TRUE

As you can see in the new recovery archives our file doesn't get added, so if for example we want to restore the last recovery archive, we won't have our GNU bundle available, so what you have to do is add your bundle to the config.local file INSIDE the recover folder:

root@SlowDeath:/var/opt/ignite/clients/0x0017A4770000> cp /var/opt/ignite/data/HP-UX_B.11.31_DCOE/freeware-11.31.config recovery/config.local

so lets run another make_net_recovery, and check the CINDEX:

root@SlowDeath:/var/opt/ignite/clients/0x0017A4770000> cat CINDEX
# CINDEX
# This file is used to define the Ignite-UX configurations
# and to define which config files are associated with each
# configuration. See the ignite(5), instl_adm(4), and
# manage_index(1M) man pages for details.
#
# NOTE: The manage_index command is used to maintain this file.
# Comments, logic expressions and formatting changes are not
# preserved by manage_index.
#
# WARNING: User comments (lines beginning with '#' ), and any user
# formatting in the body of this file are _not_ preserved
# when the version of Ignite-UX is updated.
#
cfg "2012-01-10,15:41 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-10,15:41/system_cfg"
"recovery/2012-01-10,15:41/control_cfg"
"recovery/2012-01-10,15:41/archive_cfg"
"/var/opt/ignite/data/HP-UX_B.11.31_DCOE/freeware-11.31.config"
}

cfg "2012-01-20,13:09 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-20,13:09/system_cfg"
"recovery/2012-01-20,13:09/control_cfg"
"recovery/2012-01-20,13:09/archive_cfg"
}
cfg "2012-01-20,13:51 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-20,13:51/system_cfg"
"recovery/2012-01-20,13:51/control_cfg"
"recovery/2012-01-20,13:51/archive_cfg"
}
cfg "2012-01-20,16:17 Recovery Archive" {
description "Recovery Archive"
"recovery/2012-01-20,16:17/system_cfg"
"recovery/2012-01-20,16:17/control_cfg"
"recovery/2012-01-20,16:17/archive_cfg"
"recovery/config.local" ----> as you can see the config,local file gets automatically added on the config of the new recovery archives.
}=TRUE

And that's all for now..

Unix Systems: 

Comments

Everytime you hired an IT Expert you must think who they are, their backgrounds and Etc. before anything else. But I can guarantee you, at #Milwaukee IT Solution

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.

Fatal error: Class CToolsCssCache contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (DrupalCacheInterface::__construct) in /homepages/37/d228974590/htdocs/sites/all/modules/ctools/includes/css-cache.inc on line 52