这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,12 @@ end
#### Properties
- `source` - Path to network accessible IBM MQ installation package.
- `accept_license` - Set this to `true` if you accept the terms of the IBM MQ license.
- `primary` - Set this to `true` to make this the primary MQ installation. Currently not supported to set this to `false`.
- `packages` - An array of package names to install. Defaults to:
- `primary` - Set this to `true` to make this the primary MQ installation. Currently not supported to set this to `false`.
- `packages` - An array of package names to install. Defaults to:
`%w(MQSeriesServer MQSeriesGSKit)`
- `uid` - The UID to use for the `mqm` user
- `gid` - The GID to use for the `mqm` user
- `fixpack` - Set this to `true` to have MQ fixpack installed. Note that fixpack should be installed in the same base packages installation. Defaults to: `nil`

## ibm_mq_queue_manager
The `ibm_mq_queue_manager` resource creates and starts IBM MQ queue managers.
Expand Down
10 changes: 8 additions & 2 deletions resources/installation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
property :primary, kind_of: [TrueClass, FalseClass], default: false
property :uid, kind_of: [String, Integer], default: nil
property :gid, kind_of: [String, Integer], default: nil
property :fixpack, kind_of: [TrueClass, FalseClass], default: nil

default_action :create

Expand All @@ -42,6 +43,11 @@
download_dir = "#{Chef::Config[:file_cache_path]}/ibm_mq"
download_path = "#{download_dir}/#{name}.tar.gz"
unpack_dir = "#{download_dir}/extract-#{name}"
if property_is_set?(:fixpack)
pkgs_dir = unpack_dir
else
pkgs_dir = "#{unpack_dir}/MQServer"
end

directory download_dir do
owner 'root'
Expand Down Expand Up @@ -79,7 +85,7 @@

execute 'createrepo-mq' do
user 'root'
cwd "#{unpack_dir}/MQServer"
cwd pkgs_dir
command 'createrepo .'
end

Expand Down Expand Up @@ -125,7 +131,7 @@
# Add a local yum repository
yum_repository "ibm-mq-chef-#{name}" do
description 'Packages for IBM MQ, used by Chef cookbook'
baseurl "file://#{unpack_dir}/MQServer"
baseurl "file://#{pkgs_dir}"
gpgcheck false
action :create
end
Expand Down
2 changes: 1 addition & 1 deletion test/cookbooks/ibm_mq_test/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
maintainer_email 'arthur.barr@uk.ibm.com'
license 'Apache 2.0'
description 'Tests for ibm_mq cookbook'
version '0.1.1'
version '0.2.1'
depends 'ibm_mq'
depends 'sysctl'