Tuesday, 12 November 2013

Installing HP-UX clients from Golden Image

      


A Golden Image is a compressed archive of a current system. It contains all the software and hardware configurations on the existing system. This can be deployed to clients on the network who have similar hardware configurations.

Steps to clone a client using Golden Image.

 1. Edit the .rhosts file of the Ignite-UX server as well as client so that we can directly store the archive onto the server and reboot the client from the server directly for installation later on.

[ignite-server]# cat /.rhosts
10.237.93.112               root


2. Use the following directory for storing archives

[ignite-server]#pwd
/var/opt/ignite/archives


3. Add the following directories to the list of NFS-exported directories

[ignite-server]# vi /etc/exports

/var/opt/ignite/clients -anon=2
/var/opt/ignite/archives –anon=2
 
 
[ignite-server]#exportfs –av
 
 
 
4. From the client machine we will be running make_sys_image script so that the archive is stored on Ignite server at /var/opt/ignite/archives
 
[client]# pwd
/opt/ignite/data/scripts
[client]#./make_sys_image –s 10.237.93.115 –d /var/opt/ignite/archives 
 
    - where 10.237.93.115 is IP of Ignite server.
 
 
5. Once the archive creation is complete, from the Ignite-UX server we can edit our configuration file to reflect the changes we want to make.
We will copy the example file provided by HP to the directory where we will store our other configuration files.
 
[ignite-server]# cd /opt/ignite/data/examples
[ignite-server]# cp core11.cfg /var/opt/ignite/data/Rel_B.11.31/archive11.cfg
 
 
6. While creating Golden Image we need to manully calculate the archive_impact and the output will help us in deciding the size of mountpoints.
 
[ignite-server]#pwd
/var/opt/ignite/archives
[ignite-server]#ls
ggntest1.gz
[ignite-server]#/opt/ignite/lbin/archive_impact –t –g /var/opt/ignite/archives/ggntest1.gz > /tmp/GOLDEN.impacts
 
 
 
7. We can use the impact statements generated to edit our config files. The  file archive11.cfg is very critical and edit it very carefully.
 
[ignite-server]# vi /var/opt/ignite/data/Rel_B.11.31/archive11.cfg
 
........
 
 things to note here in this file are
 
 nfs_source = “10.237.93.115:/var/opt/ignite/archives”
 archive_path = “ggntest1.gz”
 
  - the archive_path is relative to the nfs_source specified earlier in the file. This file will be transferrd via nfs to the client. Also check the permissions on the archive file (755) otherwise ignite will throw a lot of errors.
 
post_load_script = "/opt/ignite/data/scripts/os_arch_post_l"
post_config_script = "/opt/ignite/data/scripts/os_arch_post_c"
 
These two scripts are also run to ensure that installation is complete.
 
All the impacts have to be filled up using the file generated previously.
 
impacts=”/” 2048000Kb
impacts=”tmp” 6144000Kb
.
.
 
 
 
8. Use the save_config command to create a configuration file for disks and hardware configuration (e.g hardware paths ). 
 
[client]# save_config -f /tmp/save_config.out vg00
 
Copy this over to the ignite server.
 
[client]#rcp /tmp/save_config.out 10.237.93.115:/var/opt/ignite/data/Rel_B.11.31/archive_disk.cfg
 
The file archive_disk.cfg contains hardware paths and entire volume group related information. Edit this file to reflect all the required customizations. If the client being installed is not of similar hardware configuration , then installation might fail.
 
 
 
9. In the INDEX file we need to create an entry for Golden Image so that it shows up at client config window and we can point to it while booting the client. We need to add the path to our custom configuration files so that these files are read while booting clients.
 
 Add the following lines below the default entries.
 
[ignite-server]#vi /var/opt/ignite/INDEX
.
.
cfg "Golden Image" {
 
        description "HP-UX B.11.31 Golden Image"
 
        "/var/opt/ignite/data/Rel_B.11.31/archive11.cfg"
 
        "/var/opt/ignite/data/Rel_B.11.31/archive_disk.cfg"
 
        "/var/opt/ignite/config.local"
 
}
 
 
 
 
 
10. Check the files for syntax errors as follows
 
[ignite-server]# instl_adm –T
       * Checking file: /opt/ignite/data/Rel_B.11.11/config
       * Checking file: /opt/ignite/data/Rel_B.11.11/hw_patches_cfg
       * Checking file: /var/opt/ignite/config.local
       .
       * Checking file: /opt/ignite/data/Rel_B.11.31/config
       * Checking file: /opt/ignite/data/Rel_B.11.31/hw_patches_cfg
       * Checking file: /var/opt/ignite/data/Rel_B.11.31/archive11.cfg
       * Checking file: /var/opt/ignite/data/Rel_B.11.31/archive_disk.cfg
 
[ignite-server]#manage_index –l
HP-UX B.11.11 Default
HP-UX B.11.23 Default
HP-UX B.11.31 Default
Golden Image
 
As our Golden Image is showing up in the index, we can boot the client and point it to install from the configuration.
 
11. Boot the client from the ignite server by using the following command.
 
[ignite-server]#bootsys –i “Golden Image” –f client
 

  
  
  
  
  
  
  
  
  
  
  
 
 
 

 
 
 
 
 
 
 
 


No comments:

Post a Comment