This cookbook contains useful resources for using Chef with AIX systems.
- AIX 6.1
- AIX 7.1
- Chef 12.7+
- none
This cookbook ships multiple resources for writing cookbooks to manage AIX hosts. See the resources below:
Create an alternate disk on a free disk Update an existing alternate disk
create
- create an alternate rootvg diskcleanup
- cleanup an alternate rootvg diskwakeup
- wakeup an alternate rootvg diskrename
- rename an alternate rootvg disksleep
- put an alternate rootvg in sleepcustomize
- customize an alternate rootvg (update)
type
(optional) - size (choose the disk on which creating the alternate disk by it's size in MB)type
(optional) - name (choose the disk on which creating the alternate disk by it's name)type
(optional) - auto (automatically choose the disk on which creating the rootvg)value
(optional) - bigger (if type is auto choose a disk bigger than the current rootvg size)value
(optional) - equal (if type is auto choose a disk with the exact same size of the rootvg size)value
(optional) - size or name (if type is size or name it's the size or the exact name of the disk)altdisk_name
(optional) - name of the alternate disk to createchange_bootlist
(optional) (default false) - change the bootlist to boot to the new alternate diskimage_location
(optional) - directory containing filesets used for the cust operationnew_altdisk_name
(optional) - new name use for rename actionreset_devices
, (optional) kind_of: [true, false], default: false - Performs a device reset on the target. This causes the alternate disk install to not retain any user-defined device configurations.remain_nimclient
, (optional) kind_of: [true, false], default: false -/.rhosts
and/etc/niminfo
files are copied to the file system
aix_altdisk "cloning rootvg by name hdisk3" do
type :name
value "hdisk3"
end
aix_altdisk "cloning rootvg by size 66560" do
type :size
value "66560"
end
aix_altdisk "cloning rootvg by size 66561" do
type :size
value "66561"
end
aix_altdisk "cloning rootvg by auto" do
type :auto
value "bigger"
action :create
altdisk_name "myvg"
end
aix_altdisk "cleanup alternate rootvg" do
action :cleanup
altdisk_name "rootvg_alt"
end
aix_altdisk "altdisk_by_auto" do
type :auto
value "bigger"
change_bootlist true
action :create
end
aix_altdisk "altdisk_wake_up" do
action :wakeup
end
aix_altdisk "altdisk_update" do
image_location "/mnt/7100-03-05-1524"
action :customize
end
aix_altdisk "altdisk_sleep" do
action :sleep
end
aix_altdisk "rename altdisk" do
new_altdisk_name "altdisk_vg"
action :rename
end
Manage the inittab entries. Example:
runlevel
- the runlevel of the inittab entryprocessaction
- the action of the process (e.g. "once", "boot", etc.)command
- the command to runfollows
- add the entry after this one
aix_inittab 'my-awesome-aix-daemon' do
runlevel '2'
processaction 'once'
command '/opt/mycompany/libexec/mydaemon -d > /dev/console 2>&1'
action :install
end
Manage the services started by inetd
by editing /etc/inetd.conf
.
servicename
- name of the service as it appears in the first field of/etc/inetd.conf
type
- type of service. Valid values:dgram stream sunrpc_udp sunrpc_tcp
protocol
- protocol of service. Valid values:tcp udp tcp6 udp6
wait
- blocking, nonblocking, or SRC. Valid values:wait nowait SRC
user
- user to the run the service under. Default:root
program
- program to run (typically specified by full path)args
- program, with arguments
aix_subserver 'tftp' do
protocol 'udp'
action :disable
end
Manage the services started by /etc/rc.tcpip
.
immediate
(optional) - whether to start/stop the TCP/IP service immediately by contacting the SRC. It's much better to declaratively specify this separately using the built-inservice
resource in Chef.
aix_tcpservice 'xntpd' do
action :enabled
end
To install packages from the IBM AIX Toolbox for Linux off the IBM FTP site.
base_url
(optional) - the base URL to use to retrieve the package. If you are behind a firewall or your AIX system doesn't have access to the Internet, you can override this to an HTTP/FTP server where you have stored the RPMs.
aix_toolboxpackage "a2ps" do
action :install
end
Change any AIX device attribute.
need_reboot
(optional) - Add -P to the chdev command if device is busy (this parameter cannot be used with hot_change)hot_change
(optional) - Add -U to the chdev command for attribute with True+ (this parameter cannot be used with need_reboot)
aix_chdev 'sys0' do
attributes(maxuproc: '1026', ncargs: '1024')
need_reboot false
action :update
end
aix_chdev 'fcs0' do
attributes(num_cmd_elems: '200', max_xfer_size: '0x800000')
need_reboot true
action :update
end
aix_chdev 'ent0' do
attributes(poll_uplink: 'yes')
need_reboot true
action :update
end
aix_chdev 'hdisk1' do
attributes(reserve_policy: 'no_reserve')
hot_change true
action:update
end
Create, remove, modify AIX paging space.
name
- Name of the paging spacesize
- Size of the paging space in MBauto
- Active paging space on reboot (True,False)active
- Active/Desactive paging space (True,False)vgname
- Volume group name where the paging space should be created
change
- Modify the paging spaceremove
- Remove the paging spacecreate
- Create the paging space
aix_pagingspace "Changing paging space" do
name 'hd6'
size 1024
auto true
action :change
end
aix_pagingspace "Disabling paging space" do
name 'paging00'
active false
action :change
end
aix_pagingspace "Removing paging space" do
name 'paging00'
action :remove
end
aix_pagingspace "Creating paging space" do
name 'mypgsp'
size 1024
auto true
vgname 'rootvg'
action :create
end
aix_pagingspace "Creating paging space 2" do
name 'mypgsp2'
size 1024
auto true
active true
vgname 'rootvg'
action :create
end
Change any AIX no (network) tunables.
set_default
(optional) (default true) - All change are persistent to reboot (/etc/tunables/nextboot)bootlist
(optional) (default false) - If set to true, the bootlist is not changed
update
- update a list of tunablesreset
- reset a list of tunabesreset_all
- reset all tunables to defaultreset_all_with_reboot
- reset all tunables to default even if the ones that need a reboot
aix_no "changing no tunables" do
tunables(udp_recv_perf: '0', udprecvspace: '42083', psetimers: '23')
set_default
action :update
end
aix_no "reseting no tunables" do
tunables(udp_recv_perf: '0', udprecvspace: '0')
set_default false
action :reset
end
aix_no "reseting all no tunables" do
action: reset_all
end
aix_no "reseting all no tunables reboot needed" do
action: reset_all_with_reboot
end
Change any AIX unrestricted tunables(vmo, ioo, schedo).
mode
(mandatory) (no default) - must be :ioo, :vmo or :schedopermament
(optional) (default false) - All changes are persistentnextboot
(optional) (default false) - All changes applied on next boot only
update
- update a list of tunablesreset
- reset a list of tunabesreset_all
- reset all tunables to default
aix_tunables "reset schedo values" do
mode :schedo
action :reset_all
permanent
end
aix_tunables "change vpm_throughput_mode" do
mode :schedo
tunables(:vpm_throughput_mode => 2)
permanent
end
aix_tunables "change posix AIO servers" do
mode :ioo
tunables(posix_aio_minservers: 6, posix_aio_maxservers: 36)
end
aix_tunables "tune minperm%" do
mode :vmo
tunables( :"minperm%" => 6)
permanent
end
aix_tunables "tune tcp buffers" do
mode :no
tunables( :udp_recvspace => 655360, :udp_sendspace => 65536 )
permanent
end
Create, remove or update multibos on AIX.
update_device
(optional) - mount point used for update
create
- create (and update if needed) a bos instanceremove
- remove a standby bosupdate
- update all already create bosmount
- mount a standby bosumount
- umount a standby bos
aix_multibos "create a multibos no bootlist" do
action :create
bootlist true
end
aix_multibos "create and update a multibos" do
action :create
update_device "/mnt/7100-03-05-1524"
end
aix_multibos "remove standby multibos" do
action :remove
end
aix_multibos "update a multibos" do
action :update
update_device "/mnt/7100-03-05-1524"
end
aix_multibos "mount a bos" do
action :mount
end
aix_multibos "mount a bos" do
action :umount
end
Changes the attributes in the security stanza files.
file_name
(name_attribute) - security file to changeattribute
- array of attribute to changestanza
- stanza to change
aix_chsec '/etc/security/login.cfg' do
attributes(maxlogins: '16000', maxroles: '7', shells: '/bin/sh,/usr/bin/ksh')
stanza 'usw'
action :update
end
Add, change or remove entries in the /etc/hosts file.
name
- name of the host to change/add/deleteip_address
- ip addressnew_hostname
- new_hostame (use with change action)aliases
- aliases
To ensure an entry is added and stays set correctly, use both the :add and :change actions as shown in the 5th example below.
add
- add an entry in /etc/hostsdelete
- remove an entry in /etc/hostsdelete_all
- remove all entries in /etc/hostschange
- change an entry in /etc/hosts
aix_etchosts "test" do
ip_address "1.1.1.1"
action :add
end
aix_etchosts "test" do
ip_address "2.2.2.2"
action :change
end
aix_etchosts "test" do
new_hostname "test2"
action :change
end
aix_etchosts "test" do
ip_address "1.1.1.1"
aliases ["test2", "test3"]
action :add
end
aix_etchosts "test" do
action :delete
end
aix_etchosts '1.1.1.4' do
aliases ['test4', 'test5']
action [:add, :change]
end
aix_etchosts "1.1.1.4" do
action :delete
end
aix_etchosts "delete all entries" do
action :delete_all
end
Use suma to download fixes on a NIM server. You can download service pack, or technology level. You can also download latest service pack of latest technology level for the HIGHEST release in the client list. It means if you provide AIX 7.1 and 7.2 clients, only last 7.2 TL or SP is downloaded.
In some cases a metadata operation is performed to discover the oslevel build number or the latest service pack level.
The location directory is automatically created if it does not exist.
The following user process resource limits are recommended to run a suma recipe:
- fsize = -1
- nofiles = 20000 (or greater)
- data = -1
The NIM lpp_source resource is automatically created if needed. It meets the following requirement. Name contains build number and ends with the type of resource:
- 7100-04-00-0000-lpp_source
- 7100-03-01-1341-lpp_source
- 7100-03-02-1412-lpp_source
You can provide a NIM lpp_source as oslevel property.
Suma resource uses Ohai to discover nim environment. You may want to reload Ohai info after a successful download by adding:
-
the following resource to your recipe:
ohai 'reload_nim' do action :nothing plugin 'nim' end
-
the following notifies property to your resource:
aix_suma [...] notifies :reload, 'ohai[reload_nim]', :immediately end
aix_suma "download needed fixes to update client list to 7.1 TL3 SP1" do
oslevel "7100-03-01-1341"
location "/export/extra/nim"
targets "client1,client2,client3"
action :download
end
aix_suma "... perform suma metadata operation to discover build number" do
oslevel "7100-03-01"
location "/export/extra/nim"
targets "client1,client2,client3"
action :download
end
aix_suma "download needed fixes to update client list to 7.1 TL4" do
oslevel "7100-04"
location "/export/extra/nim"
targets "client1,client2,client3"
action :download
end
aix_suma "download needed fixes to update client list to last TL and last SP" do
oslevel "latest"
location "/export/extra/nim"
targets "client1,client2,client3"
action :download
end
aix_suma "update nim lpp_source with needed fixes" do
oslevel "7100-03-01-1341-lpp_source"
location "/export/extra/nim"
targets "client1,client2,client3"
action :download
end
oslevel
- service pack, technology level or 'latest' (with or without build number) (default: Latest)location
- directory to store downloaded fixes (default: /usr/sys/inst.images)targets
- space or comma separated list of clients to consider for update process (star wildcard accepted)preview_only
- preview only, no packages are downloaded
download
- preview and download fixes
Use nim to setup a NIM server or install packages, update service pack, or technology level. Your NIM lpp_source must match the exact oslevel output.
device
- NFS mount directory containing bos.sysmgt.nim.master packagelpp_source
- name of NIM lpp_source resource to install or latest_sp or latest_tltargets
- comma or space separated list of clients to update (star wildcard accepted)force
- if true, installed interim fixes will be automatically removed (default: false)async
- if true, customization is performed asynchronously (default: false) (cannot be used for latest_sp or latest_tl customization)
master_setup
- setup the NIM serverupdate
- install downloaded fixes
To install the following updates:
- 7100-04-00-0000-lpp_source
- 7100-03-01-1341-lpp_source
- 7100-03-02-1412-lpp_source
Use:
aix_nim "setup nim server" do
device "/mnt"
action :master_setup
end
aix_nim "asynchronously updating clients" do
lpp_source "7100-03-01-1341-lpp_source"
targets "client1,client2,client3"
async true
action :update
end
aix_nim "updating clients to latest SP (forced synchronous)" do
lpp_source "latest_sp"
targets "client1,client2,client3"
action :update
end
aix_nim "updating clients to latest TL (forced synchronous)" do
lpp_source "latest_tl"
targets "client1,client2,client3"
action :update
end
Use flrtvc tool to generate flrtvc report, download recommended efix, and install them to patch security and/or hiper vulnerabilities.
A nim lpp_source resource is automatically created for fixes to be installed. It is removed at the end of the installation.
If space is needed, filesystem is automatically extended by increment of 100MB.
targets
- comma or space separated list of clients to check (star wildcard accepted) (default: master)apar
- security or hiper data (default: both)filesets
- filter on fileset namecsv
- custom apar csv filepath
- directory where the report is savedclean
- clean temporary files and remove nim lpp_source resource (default: true)verbose
- save and display the report in verbose mode (default: false)check_only
- generate report only, no fixes are downloaded nor installed (default: false)download_only
- generate report and download fixes, do not install them (default: false)
install
- install flrtvc toolpatch
- generate report, download recommended fixes and patch the machine(s)
aix_flrtvc "install flrtvc tool (download unzip if needed)" do
action :install
end
aix_flrtvc "download and install recommended efixes locally" do
action :patch
end
aix_flrtvc "download and install security vulnerabilities on the remote targets" do
apar "security"
targets "client1,client2,client3"
action :patch
end
aix_flrtvc "download and install hiper issues" do
apar "hiper"
targets "client1,client2,client3"
action :patch
end
aix_flrtvc "download and install efix for printers fileset(s)" do
filesets "printers"
targets "client1,client2,client3"
action :patch
end
aix_flrtvc "use custom csv file" do
csv "/tmp/apar.csv"
targets "client1,client2,client3"
action :patch
end
aix_flrtvc "generate flrtvc report only" do
path '/tmp/flrtvc'
check_only true
action :patch
end
aix_flrtvc "download recommended efixes only" do
path '/tmp/flrtvc'
download_only true
action :patch
end
Use nimviosupdate to update a VIOS or a couple of VIOSes by installing software from the NIM server. Each action from the action list can be executed independently or together: check, altdisk_copy, update, altdisk_cleanup action_list:
- check: verify the redundancy of the 2 VIOSes for the update
- altdisk_copy: will make an alternate rootvg on an available disk
- update: install software on VIOSes from existing NIM lpp source
- altdisk_cleanup: to remove the altinst_rootvg
lpp_source
- Name of NIM lpp_source resource to installtargets
- Comma separated list of single or dual VIOSes to manage in a tuple format (required)altdisks
- List of hdisks on which the alternate disk copy will be created. A disk is automatically searched when no disk is specified for a VIOSaction_list
- Comma separated list of actions to perform on VIOSes and or VIOSes tuples (default: "check,altdisk_copy,update")updateios_flags
- Flags and update options for the updateios command (values: install, commit, cleanup or remove)accept_licenses
- (values: yes or no) (default: yes) To automatically accept license at software installationpreview
- (values: yes or no) (default: yes) To select the install preview mode.
update
- check, altdisk copy, update, cleanup depending on the action_list parameter.
aix_nimviosupdate "check the vios redundancy" do
targets "(vios1,vios2),(vios3,vios4)(vios5)"
action_list "check"
action :update
end
aix_nimviosupdate "build an alternate rootvg" do
targets "(vios1,vios2),(vios3,vios4),(vios5)"
altdisks "(hdisk1,hdisk2)(hdisk1,)()"
action_list "altdisk_copy"
action :update
end
aix_nimviosupdate "update VIOSes using lpp_source " do
lpp_source "lpp_source_name"
targets "(vios1,vios2),(vios3,vios4),(vios5)"
action_list "update"
updateios_flags "install"
accept_licenses "yes"
preview "no"
action :update
end
aix_nimviosupdate "remove alternate rootvg" do
targets "(vios1,vios2),(vios3,vios4),(vios5)"
action_list "altdisk_cleanup"
action :update
end
aix_nimviosupdate "check VIOSes tuples, make alternate rootvg, update VIOSes, remove alternate rootvg" do
lpp_source "lpp_source_name"
targets "(vios1,vios2),(vios3,vios4),(vios())"
altdisks "(,)(,),()"
updateios_flags "install"
accept_licenses "yes"
preview "no"
action_list "check,altdisk_copy,update,altdisk_cleanup"
action :update
end
Use niminit to configure the nimclient package. This will look if /etc/niminfo exists and create it if it does not exist. You can the use nimclient provider after niminiting the client.
name
- hostname of the nimclientmaster
- hostname of the nim masterpif_name
- interface nameconnect
- nimsh or shell
setup
- setup the nimclientremove
- remove nimclient configuration
aix_niminit node[:hostname] do
master "nimmaster"
connect "nimsh"
pif_name node[:network][:default_interface]
action :setup
end
aix_niminit node[:hostname] do
action :remove
end
aix_niminit node[:hostname] do
master "nimmaster"
connect "nimsh"
pif_name "en1"
action :setup
end
Use nimclient to install packages, update service pack, or technology level. Your NIM server should meet these requirements to work with the nimclient provider:
-
All resources name must end with the type of the resource (check example below):
- 7100-03-05-1514-lpp_source
- 7100-03-05-1514-spot
- myinstallpbundle-installp_bundle
-
All spot and lpp_source must match the exact oslevel output. To find the next available lpp_source or spot the provider is checking for your oslevel and comparing it with the lpp_source name
- 7100-03-01-1341-lpp_source
- 7100-03-02-1412-lpp_source
- 7100-03-03-1415-lpp_source
- 7100-03-04-1441-lpp_source
- 7100-03-05-1524-lpp_source
- 7100-03-01-1341-spot
- 7100-03-02-1412-spot
- 7100-03-03-1415-spot
- 7100-03-04-1441-spot
- 7100-03-05-1524-spot
Recommendation: create all the lpp_source with the simage attribute to avoid ambiguity.
$ lsnim -l 7100-03-05-1524-lpp_source
7100-03-05-1524-lpp_source:
class = resources
type = lpp_source
arch = power
Rstate = ready for use
prev_state = unavailable for use
location = /export/nim/lpp_source/7100-03-05-1524
simages = yes
alloc_count = 1
server = master
Here are a few examples of recipes using nimclient:
aix_nimclient "updating to latest available sp" do
installp_flags "aXYg"
lpp_source "latest_sp"
fixes "update_all"
action :cust
end
aix_nimclient "installing filesets from the latest available tl" do
installp_flags "aXYg"
lpp_source "latest_tl"
filesets ["openssh.base.client","openssh.base.server","openssh.license"]
action :cust
end
aix_nimclient "installing filesets from the next sp" do
installp_flags "aXYg"
lpp_source "next_sp"
filesets ["security.pkcs11.tools"]
action :cust
end
aix_nimclient "installing filesets" do
installp_flags "aXYg"
lpp_source "latest_sp"
filesets ["Java6_64.samples"]
action :cust
end
aix_nimclient "reset" do
action :reset
end
aix_nimclient "deallocate" do
action :deallocate
end
aix_nimclient "set date to nimmaster value" do
action :set_date
end
aix_nimclient "disable push operations" do
action :disable_push
end
aix_nimclient "enable push operations" do
action :enable_push
end
aix_nimclient "maintbooting client" do
spot "7100-03-01-1341-spot"
action :maint_boot
end
aix_nimclient "bos_inst client" do
spot "7100-03-01-1341-spot"
lpp_source "7100-03-01-1341-lpp_source"
action :bos_inst
end
aix_nimclient "allocating resources" do
installp_bundle "toolbox-installp_bundle"
lpp_source "7100-03-01-1341-lpp_source"
spot "7100-03-01-1341-spot"
action :allocate
end
spot
(optional) - name of the spotlpp_source
(optional) - name of the lpp_sourceinstallp_bundle
(optional) - name of the installp_bundlefilesets
- list of filesets to installfixes
- fixe to installinstallp_flags
- flags used for installp
allocate
- create (and update if needed) a bos instancedeallocate
- remove a standby boscust
- update all already create bosenable_push
- allow push operation from clientdisable_push
- disable push operation from clientset_date
- set date to that of the nim masterenable_crypto
- enable secure nimshdisable_crypto
- disable secure nimshreset
- reset the clientbos_inst
- enable bos_install installation (you need to reboot the virtual machine after that)maint_boot
- ennable maintenance boot (you need to reboot the virtual machine after that)
Change AIX bootlist.
mode
(mandatory) (no default) - must be :both, :normal or :servicedevices
(no default) - List boot devices to setupdevice_options
(optional) (default false) - Specify boot options for specific device
update
- update bootlistinvalidate
- invalidate the bootlist
aix_bootlist 'invalidate normal mode bootlist' do
action :invalidate
mode :normal
end
aix_bootlist 'set normal and service bootlist on hdisk0' do
mode :both
devices ["hdisk0"]
end
aix_bootlist 'set bootlist for normal mode' do
mode :normal
devices ["hdisk0","hdisk1"]
device_options("hdisk0" => "pathid=0", "hdisk1" => "pathid=0,1")
end
Install and remove fixes
fixes
(mandatory) - Array of fixes to install or removedirectory
(optional) - Directory where stands the fixes to install
install
- install fixesremove
- remove fixes
aix_fixes "removing all fixes" do
fixes ["all"]
action :remove
end
aix_fixes "installing fixes" do
fixes ["IV75031s5a.150716.71TL03SP05.epkg.Z", "IV77596s5a.150930.71TL03SP05.epkg.Z"]
directory "/root/chefclient"
action :install
end
aix_fixes "removing fix IV75031s5a" do
fixes ["IV75031s5a", "IV77596s5a"]
action :remove
end
Create or modify a LVM volume group
name
: Name of the volume groupphysical_volumes
: The device or list of devices to use as physical volumes (if they haven't already been initialized as * physical volumes, they will be initialized automatically)use_as_hot_spare
: (optional) Sets the sparing characteristics of the physical volume such that it can be used as a hot spare. Legal values are "y" or "n". "y" marks the disk as a hot spare within the volume group it belongs to. "n" removes the disk from the hot spare pool for the volume group.mirror_pool_name
: (optional) Assigns or reassigns the disk to the named mirror pool. The mirror pool is created if it does not exist already Mirror pool names can only contain alphanumeric characters, may not be longer than 15 characters, must be unique in the volume group.
create
- (default) Creates or modify a volume group
# Create volume groupe 'datavg1' with 2 disks
aix_volume_group 'datavg1' do
physical_volumes ['hdisk1', 'hdisk2']
action :create
end
# Modify existing volume groupe 'datavg1' and add new disk
aix_volume_group 'datavg1' do
physical_volumes ['hdisk1', 'hdisk2', 'hdisk3']
action :create
end
# Create a volume group called `datavg2` comprising 3 disks and assign them to a mirror pool.
aix_volume_group 'datavg2' do
physical_volumes ['hdisk4', 'hdisk5', 'hdisk6']
mirror_pool_name 'copy0pool'
action :create
end
# Add a disk as a hot spare to the same `datavg3` volume group
aix_volume_group 'datavg3' do
physical_volumes ['hdisk7']
use_as_hot_spare 'y'
action :add
end
Create or modify a LVM logical volume
name
: Name of the logical volumevolume_group
: Volume group in which to create the new logical volume (not required if the volume is declared inside of anlvm_volume_group
block)size
: Minimum size of the logical volume in MB. The actual size allocated my be slightly greater.copies
: (optional) Number of copies of each logical partition. Legal values are 1, 2, 3
create
- (default) Creates or modifies an AIX JFS2 logical volume
# create logical volume 'home' of 512MB with 2 copies in volume group 'datavg'
aix_logical_volume 'home' do
group 'datavg'
size 512 // MB
copies 2
action :create
end
Create, modify, mount or defrag a LVM filesystem
name
: Mount point of the filesystemlogical
: Specifies an existing logical volume on which to make the filesystemsize
: Size of the filesystem. It's can be a set of 512k blocks, a size in M or a size in G
create
: (default) Creates or modifies a filesystemmount
: Mount a filesystemumount
: Unmount a filesystemdefragfs
: Defrag a filesystem
# create filesystem of 256Mb in '/lvm/folder1' on logical volume 'part1'
aix_filesystem '/lvm/folder1' do
logical 'part1'
size '256M'
action :create
end
# mount '/lvm/folder1' filesystem
aix_filesystem '/lvm/folder1' do
action :mount
end
# defrag '/lvm/folder1' filesystem
aix_filesystem '/lvm/folder1' do
action :defragfs
end
# umount '/lvm/folder1' filesystem
aix_filesystem '/lvm/folder1' do
action :umount
end
Manage wpar
The cookbook itself will install the aix-wpar gem if the system as internet access.
Else you need to download the gem file here. And install the package on the AIX system:
/opt/chef/embedded/bin/gem install /tmp/aix-wpar-0.1.0.gem
name
: WPAR namehostname
: specify wpar hostname(can be different of wpar name)address
: ip address to use if no entry in /etc/hosts or DNS.interface
: network interface to userootvg
: to build a rootvg wparrootvg_disk
: hdisk to use for rootvg wparwparvg
: volume group to use for system wpar. Default: rootvgbackupimage
: backup image to restore when building wparcpu
: resource control CPU. Example: 10%-50%,100%memory
: resource control memory.autostart
: auto start wpar at boot.live_stream
: live stream wpar commands output
create
- create a wpardelete
- delete a wparstart
- start a wparstop
- stop a wparsync
- synchronize software between system and wparreset_all
- reset all tunables to default
aix_wpar 'create wpar' do
action :create
name 'testwpar'
hostname 'testwpar'
cpu '10%-50%,100%'
live_stream true
autostart true
end
aix_wpar 'stop wpar' do
action :stop
name 'testwpar'
live_stream true
end
aix_wpar 'sync wpar' do
action :sync
name 'testwpar'
end
aix_wpar 'delete wpar' do
action :delete
name 'testwpar2'
end
- Author:: Julian C. Dunn ([email protected])
- Author:: Christoph Hartmann ([email protected])
- Author:: Benoit Creau ([email protected])
- Author:: Alain Dejoux ([email protected])
- Author:: Alan Thatcher ([email protected])
- Author:: Laurent GAY for IBM ([email protected])
Copyright 2008-2017, Chef Software, Inc.
Copyright 2015-2016, Alain Dejoux <[email protected]>
Copyright 2015-2016, Benoit Creau <[email protected]>
Copyright 2015-2016, Bloomberg Finance L.P.
Copyright 2016, Atos <[email protected]>
Copyright 2016, International Business Machines Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.