Top Banner
© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software Engineers, HP Ignite-UX: Automatic HP- UX Installs
33

© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

Apr 01, 2015

Download

Documents

Ariana Lundon
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

© 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice

Scot Bean &Michael RobertsSoftware Engineers, HP

Ignite-UX: Automatic HP-UX Installs

Page 2: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 2

Agenda • Ignite-UX Overview• Automated HP-UX Install Methods−Cold Install−Golden Image

• Detailed Setup Steps• Traps & Tips• Customization & Maintenance

Page 3: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 3

What is Ignite-UX?• Free installation & deployment utility for HP-UX• Aliases− “Ignite”− “Instant Ignition”− “IUX”

• History−Released in June 1997 with HP-UX 10.30, version 1.02−Current version: C.6.2.241, May 2005

• Where to get it:− swinstall from any HP-UX install or application media−Download via http://www.docs.hp.com/en/IUX/

Page 4: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 4

Ignite Server GUI

Page 5: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 5

Ignite Client TUI

Page 6: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 6

LAN Install Process

Ignite ServerTarget (or Client)

Machine

1. Install Kernel:(W|I)INSTALL files,

via tftpReboot #1:

boots the install kernel

2. Content Files:via SD, NFS, FTP or remsh Reboot #2:

boots to new kernel

3. Final Configurationmachine-specific setup Reboot #3:

ready to use

Page 7: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 7

Why Automate Installs?Manual Automated

many complex menu decisions

“canned” scripts & config files

requires sys admin console time

“hands-off” execution

subject to human error repeatable resultsnavigating the menus is slower

faster installs

OK for one or two machines multiple, concurrent installsflexible for custom single installs

can customize once, then reuse

can initialize an empty machine

works only for operational targets

Page 8: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 8

Two Automation Methods“Cold Install” “Golden Image”

standard install built from original HP-UX media sources

install image is “cloned” from another machine

install files reside in SD depots: bundles, products, patches

install files are a gzip’ed archive

slower: individual items install faster: archive is copied over3rd party applications may require manual install afterwards

application bits are already there

less initial setup time more detailed setup & configuration

more flexible: depot maintenance

more rigid, but more repeatable

uses IUX make_depots cmd uses IUX make_sys_image cmd

both use the IUX bootsys command to autostart the install

Page 9: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 9

Performance StudyAutomated Install Time

020406080

100120140160180

D370 L2000 rp3410

Server Models: old --> new

Min

utes

Cold Install

Golden Image

Page 10: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 10

Which Method is Right for Me?• Consider Cold Install when:−all infrastructure and target platforms are new & fast− install baselines change often−your sys admin staff is new to HP-UX

• Consider Golden Image when:−you have the need for speed−you still support older, slower platforms− install baselines are static, to justify longer setup time−your sys admin staff has some experience− legal auditing requirements demand consistent SW

• Also, could use both methods, or a hybrid setup

Page 11: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 11

Case Studies• HP manufacturing:−uses a hybrid setup to pre-install shipped HP-UX software− common, core Golden Image laid down first− custom Cold Install depots added, per customer order

• Major university:−wipes student machines at the end of the semester− fast Golden Image resets student lab to clean baseline

• Software partners with test suites:− some use Golden Image for a fast, repeatable baseline−others use Cold Install because they always want the

latest releases, with a frequently changing baseline

Page 12: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 12

Cold Install Setup Steps

1. Copy install media to ignite server,use the make_depots command

2. Update the Ignite configuration,use the make_config command

Page 13: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 13

1. make_depotsa) Insert media in CD / DVD driveb) make_depots –r B.11.11 –s /dev/dsk/c0t0d0

Standard HP-UX install depot copied to /var/opt/ignite/depots/Rel_B.11.11/core

Ignite Server

Page 14: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 14

2. make_config• make_config –r B.11.11

sw_source "core" { description = "HP-UX Core Software" source_format = SD sd_server = "15.1.2.3" sd_depot_dir = "/var/opt/ignite/depots/Rel_B.11.11/core" source_type = "NET" load_order = 0} … New configuration file created in

/var/opt/ignite/data/Rel_B.11.11/core_cfg

cfg "HP-UX B.11.11 Default" { description “Default system configuration for B.11.11." "/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"}

“HP-UX B.11.11 Default” updated in master /var/opt/ignite/INDEX config file

Page 15: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 15

Cold Install Runbootsys –a –f –i “HP-UX B.11.11 Default” mytarget

Page 16: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 16

Golden Image Setup Steps

1. Setup NFS export area

2. Prepare clone machine

3. Create the Golden Image, use themake_sys_image command

4. Create a custom configuration file

5. Create a new INDEX entry

Page 17: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 17

• Ignite allows 3 different LAN protocols to transfer the Golden Image:− NFS: most popular− FTP: good second choice− remsh: last resort, possible security concerns here

• Let’s setup an NFS area for Golden Images− mkdir /var/opt/ignite/My_Golden_Images− echo

“/var/opt/ignite/My_Golden_Images -ro,anon=2” >> /etc/exports

− exportfs -av

1. Setup NFS export area

Page 18: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 18

a) installs, updates?• ensure clone machine has any required

applications and drivers installed• check the HP-UX patch level, and consider:

• swinstalling the latest SD patch• swinstalling a recent QPK bundle• run check_patches to verify patch installations

b) kernel parameters?• consider tuning the default parms to be more

generic

c) machine in use? • intrusive to live operations• DON’T try the next step on your live web server,

it may go offline• stop running applications, we need a quiet clone

2. Prepare clone machine

Page 19: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 19

3. Create the Golden Imagea) login to clone machine

b) ftp /opt/ignite/data/scripts/make_sys_image from the Ignite server to /tmp

c) /tmp/make_sys_image -s iserver -d /var/opt/ignite/My_Golden_Images

Ignite Server

Clone Machine

generic gzip archive

Page 20: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 20

4. Custom configuration filea) Back on ignite server now

b) Copy the Golden Image template config file cp /opt/ignite/data/examples/core11.cfg

/var/opt/ignite/data/Rel_B.11.11/golden_cfg

c) Customize golden_cfg parameters for your image:1. description: “My Golden Image”2. nfs_source: IP address of Ignite server & full path to image

(or ftp_source or remsh_source)3. sw_sel: edit appropriate “bitness” section (32/64, IA/PA)4. archive_path: myclone.gz5. impacts: image filesystem space requirements• run /opt/ignite/lbin/archive_impact –t –g myclone.gz• replace existing impacts lines with this output

Page 21: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 21

sw_source "core archive" { description = "My Golden Image" load_order = 0 source_format = archive source_type="NET" nfs_source = "15.1.2.3:/var/opt/ignite/My_Golden_Images”}

init sw_sel "my_golden_image" { description = "English HP-UX 11.11 CDE – 64 – Bit OS” sw_source = "core archive" sw_category = "HPUXEnvironments" archive_type = gzip tar archive_path = “myclone.gz" impacts = "/" 110Kb impacts = "/dev" 15Kb impacts = "/etc" 46385Kb impacts = "/home" 1Kb impacts = "/opt" 1441458Kb impacts = "/sbin" 37231Kb impacts = "/stand" 1091Kb impacts = "/usr" 826714Kb impacts = "/var" 160371Kb visible_if = can_run_64bit} = (can_run_64bit)

_hp_os_bitness = "64“ ...

4. Custom configuration file (cont.)

1

5

4

3

2

Page 22: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 22

5. New INDEX entry

a) Copy an existing stanza in /var/opt/ignite/INDEX

b) Customize INDEX parameters for your image:

…cfg “my_golden_image” { description “My Golden Image” "/opt/ignite/data/Rel_B.11.11/config" "/var/opt/ignite/data/Rel_B.11.11/golden_cfg" "/var/opt/ignite/config.local" } …

• The manage_index command can also do this for you

Page 23: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 23

Golden Image Runbootsys –a –f –i my_golden_image mytarget

Page 24: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 24

Automation: Traps & Tips

• General Traps & Tips

• Cold Install specific

• Golden Image specific

Page 25: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 25

General: Traps & Tips• instl_adm –T : verify your config files!• Maximize /var/opt/ignite/config.local −Put all common configuration parameters here:−Network settings, keyboards, etc.

• bootsys command−Use the –a option, or Ignite will wait for console input−Use the –f option, or Ignite can use previous defaults−Use touch /.bootsys_block to protect non-install

machines!−Automate bootsys calls via cron, or your own front-end

• Run test Ignites on a variety of target platforms• Examine /var/opt/ignite/logs/* to troubleshoot• Use CM when editing your custom IUX config

files

Page 26: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 26

Cold Install: Traps & Tips

• Avoid global localization:init sw_sel "Global" = FALSEinit sw_sel "English" = TRUE

• Control custom installs with bootsys options:bootsys … -l HPUX11i-OE-MC=true …

• Customize and maintain install depots with swcopy

• Create a new depot when adding a new release

Page 27: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 27

Golden Image: Traps & Tips• How many images?− Itanium vs. PA-RISC, 32 bit vs. 64 bit, server vs. workstation?− one per model / role, or one for many models /roles?

• Select the best machine to clone:− one-to-one image: select the one with the most disparate I/O cards− one-to-many image: select the oldest model possible

• Consider some custom pre-image cleanups on the clone:− rm /var/adm/sw/*.log /var/adm/syslog/*.log /var/mail/*− crontab –e

• Keep the clone machine handy until image tests pass

• Use /tmp for image creation scripts and tools: NOT cloned• Add other-model firmware patches to clone with override:

touch /tmp/force_patch_install

Page 28: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 28

Customization & Maintenance• Ignite-UX has a rich configuration file syntax − Most users underutilize this syntax code− See man 4 instl_adm for all of the details (50

pages!)− See these examples of config file syntax in action:

• /opt/ignite/data/Rel_B.11.11/config• /opt/ignite/data/examples/*

• What we’ll cover here:− Common customizations− Shortcut to syntax with the save_config command− Sample custom config file− Add some patches to your image

Page 29: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 29

Common Customizations• 4 custom script types:

− post_config_script += "/var/opt/ignite/scripts/setup_NFS"− pre_load_script post_load_script final_script

• 4 custom command types:− pre_load_cmd += "echo In Preload"

− post_load_cmd post_config_cmd final_cmd

• If / Else logic:( system_name == "nopasswd" ) { root_password=""} else { root_password="\AxycAGJg16Dc"}

• Kernel parameters: set_kernel += "maxfiles 100" mod_kernel += "tunable maxfiles 200"

Page 30: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 30

save_config command• Take a shortcut when creating config files:

1. Find a machine you would like to copy or recreate2. Login and 3. ftp /opt/ignite/bin/save_config to the machine (* see notes)4. save_config –f myconfig

• myconfig has all of the Ignite syntax describing this machine

• Use pieces of this syntax to customize your configs

• Wildcards & variables can replace specific objects:− disk[*]− physical_volume_disk[*=_hp_root_group_disks]

Page 31: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 31

### My /var/opt/ignite/config.local file

### Decide on number of root disks to use(disk[_hp_root_disk].size > 8192MB) # current root disk > 8GB{ init _hp_root_grp_disks=1 # large disk drives here, need only 1}else{ ( system_name == "harry" | system_name == "moe" | system_name == “curly" ) { init _hp_root_grp_disks=3 # these older systems need 3 drives }}

### Network settingsdns_domain="acme.com"dns_nameserver[0] = "15.1.2.11“final route_gateway[0]="15.1.2.1"nis_domain="acme"

### Post-Ignite script# this sets up a nice default shell environmentpost_config_script += "/var/opt/ignite/scripts/fix_profile"

Sample custom config file

Page 32: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 32

Add Patches to Your Image

1. swcopy the patches you need to /var/opt/ignite/depots/Rel_B.11.11/my_patches

2. Use make_bundles, if needed, to create one bundle

3. Use make_config on the new depot, my_patches

4. Insert the new patch config into the INDEX file

…cfg “my_golden_image” { description “My Golden Image” "/opt/ignite/data/Rel_B.11.11/config" "/var/opt/ignite/data/Rel_B.11.11/golden_cfg" "/var/opt/ignite/data/Rel_B.11.11/my_patches_cfg" "/var/opt/ignite/config.local" } …

Page 33: © 2005 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice Scot Bean & Michael Roberts Software.

HPTF 2005 Ignite-UX: Automatic HP-UX Installs 33

References

• Web Docs−Main Ignite-UX website:

http://www.docs.hp.com/en/IUX/− Latest Ignite-UX Admin Guide (edition 19, June 2005):

http://docs.hp.com/en/B2355-90875/index.html− Latest 11.23 HP-UX Install Guide (edition 4, May 2005):

http://docs.hp.com/en/5991-0792/index.html− Latest 11.11 Enablement Matrix (required Ignite

revisions)http://docs.hp.com/en/5991-1131/5991-1131.pdf

• Man Pages−Basic Ignite server setup: man 5 ignite− Ignite configuration file syntax reference: man 4

instl_adm