Skip to content

Commit

Permalink
Merge pull request #163 from Esri/v3.2.1
Browse files Browse the repository at this point in the history
Release v3.2.1
  • Loading branch information
pbobov authored Jul 6, 2018
2 parents e9bcffe + 75e3e5b commit 0f93375
Show file tree
Hide file tree
Showing 155 changed files with 4,163 additions and 1,135 deletions.
66 changes: 66 additions & 0 deletions cookbooks/arcgis-desktop/.kitchen.ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
driver:
name: ec2
region: us-west-2
instance_type: m4.large
aws_ssh_key_id: test-kitchen
subnet_id: subnet-74de082e
iam_profile_name: s3-test-kitchen
security_group_ids: ['sg-9abe55e5']
associate_public_ip: true
interface: dns
block_device_mappings:
- device_name: /dev/sda1
ebs:
volume_size: 100
delete_on_termination: true
tags:
created-by: 'test-kitchen'

transport:
ssh_key: /keys/test-kitchen.pem

provisioner:
name: chef_zero
product_name: chef
product_version: 13.3

platforms:
- name: windows-2016
- name: windows-2012r2
- name: windows-2008r2
- name: windows-81
- name: windows-7
- name: ubuntu-16.04
- name: centos-7
- name: centos-6

suites:
- name: desktop
driver:
tags:
Name: 'desktop'
run_list:
- recipe[download-setups-s3::desktop]
- recipe[arcgis-desktop]
attributes:
arcgis:
version: '10.6.1'
desktop:
software_class: 'Viewer'
seat_preference: 'Fixed'
desktop_config: true
excludes:
- ubuntu-16.04
- centos-7
- centos-6

- name: licensemanager
driver:
tags:
Name: 'licensemanager'
run_list:
- recipe[download-setups-s3::licensemanager]
- recipe[arcgis-desktop::licensemanager]
attributes:
arcgis:
version: '10.6.1'
11 changes: 10 additions & 1 deletion cookbooks/arcgis-desktop/Berksfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
def fixture(name)
cookbook name, path: "test/fixtures/cookbooks/#{name}"
end

source 'https://supermarket.chef.io'

metadata

cookbook 'windows', '~> 1.38'
group :integration do
cookbook 'aws'
cookbook 'seven_zip'
cookbook 'tar'
fixture 'download-setups-s3'
end
8 changes: 8 additions & 0 deletions cookbooks/arcgis-desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@ arcgis-desktop cookbook CHANGELOG

This file is used to list changes made in each version of the arcgis-desktop cookbook.

3.2.1
-----
- Added support for ArcGIS 10.6.1.
- Add ec2 test kitchen
- Split attributes into multiples files.
- Update default attributes of desktop and licensemanager setups.
- Remove unnecessary attributes.

3.2.0
-----
- Added support for ArcGIS 10.6.
Expand Down
1 change: 1 addition & 0 deletions cookbooks/arcgis-desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Requirements
* 10.5
* 10.5.1
* 10.6
* 10.6.1

### Supported ArcGIS software
* ArcGIS Desktop (Windows only)
Expand Down
48 changes: 4 additions & 44 deletions cookbooks/arcgis-desktop/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Cookbook Name:: arcgis-desktop
# Attributes:: default
#
# Copyright 2015 Esri
# Copyright 2018 Esri
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -18,53 +18,13 @@

default['arcgis']['run_as_user'] = 'arcgis'
default['arcgis']['run_as_password'] = 'Pa$$w0rdPa$$w0rd'
default['arcgis']['version'] = '10.6'
default['arcgis']['desktop']['version'] = node['arcgis']['version']
default['arcgis']['version'] = '10.6.1'

case node['platform']
when 'windows'
default['arcgis']['repository']['setups'] = ENV['USERPROFILE'] + '\\Documents'
default['arcgis']['python']['install_dir'] = 'C:\\Python27'

default['arcgis']['desktop']['setup'] = 'C:\\ArcGIS\\Desktop\\Setup.exe'
default['arcgis']['desktop']['lp-setup'] = 'C:\\ArcGIS\\DesktopLP\\SetupFiles\\setup.msi'
default['arcgis']['desktop']['install_dir'] = ENV['ProgramFiles(x86)'] + '\\ArcGIS'
default['arcgis']['desktop']['install_features'] = 'ALL'
default['arcgis']['desktop']['authorization_file'] = ''
default['arcgis']['desktop']['authorization_tool'] = ENV['ProgramFiles(x86)'] + '\\Common Files\\ArcGIS\\bin\\SoftwareAuthorization.exe'
default['arcgis']['desktop']['esri_license_host'] = ENV['COMPUTERNAME']
default['arcgis']['desktop']['software_class'] = 'Viewer'
default['arcgis']['desktop']['seat_preference'] = 'Fixed'
default['arcgis']['desktop']['desktop_config'] = true
default['arcgis']['desktop']['modifyflexdacl'] = false

default['arcgis']['licensemanager']['setup'] = 'C:\\ArcGIS\\LicenseManager\\Setup.exe'
default['arcgis']['licensemanager']['lp-setup'] = 'C:\\ArcGIS\\LicenseManager\\SetupFiles\\setup.msi'
default['arcgis']['licensemanager']['install_dir'] = ENV['ProgramFiles(x86)'] + '\\ArcGIS'

case node['arcgis']['desktop']['version']
when '10.6'
default['arcgis']['desktop']['product_code'] = '{F8206086-367E-44E4-9E24-92E9E057A63D}'
default['arcgis']['licensemanager']['product_code'] = '{D6AF20B5-825F-44A9-915D-C2868CBD59F3}'
when '10.5.1'
default['arcgis']['desktop']['product_code'] = '{4740FC57-60FE-45BB-B513-3309F6B73183}'
default['arcgis']['licensemanager']['product_code'] = '{DF06C3DC-54B5-49A1-9756-B68FD65A0AD0}'
when '10.5'
default['arcgis']['desktop']['product_code'] = '{76B58799-3448-4DE4-BA71-0FDFAA2A2E9A}'
default['arcgis']['licensemanager']['product_code'] = '{3A024FEA-3E14-4257-87D0-8FCA03257560}'
when '10.4.1'
default['arcgis']['desktop']['product_code'] = '{CB0C9578-75CB-45E5-BD81-A600BA33B0C3}'
default['arcgis']['licensemanager']['product_code'] = '{D71379AF-A72B-4B10-A7BA-64BC6AF6841B}'
when '10.4'
default['arcgis']['desktop']['product_code'] = '{72E7DF0D-FFEE-43CE-A5FA-43DFC25DC087}'
default['arcgis']['licensemanager']['product_code'] = '{E1393226-725C-42F8-A672-4E5AC55EFBDE}'
else
throw 'Unsupported ArcGIS version'
end

default['arcgis']['desktop']['authorization_file_version'] = node['arcgis']['desktop']['version'].to_f.to_s
else # node['platform'] == 'linux'
default['arcgis']['licensemanager']['install_subdir'] = 'arcgis/license' + node['arcgis']['version']
default['arcgis']['licensemanager']['setup'] = '/tmp/licensemanager-cd/Setup'
default['arcgis']['licensemanager']['install_dir'] = '/'
default['arcgis']['repository']['setups'] = '/opt/arcgis'
default['arcgis']['python']['install_dir'] = '' # Not Needed on Linux
end
60 changes: 60 additions & 0 deletions cookbooks/arcgis-desktop/attributes/desktop.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#
# Cookbook Name:: arcgis-desktop
# Attributes:: desktop
#
# Copyright 2018 Esri
#
# 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.

default['arcgis']['desktop'].tap do |desktop|

case node['platform']
when 'windows'
desktop['setup_archive'] = ''
desktop['setup'] = ::File.join(node['arcgis']['repository']['setups'],
'ArcGIS ' + node['arcgis']['version'],
'Desktop', 'Setup.exe')
desktop['lp-setup'] = 'C:\\ArcGIS\\DesktopLP\\SetupFiles\\setup.msi'
desktop['install_dir'] = ENV['ProgramFiles(x86)'] + '\\ArcGIS'
desktop['install_features'] = 'ALL'
desktop['authorization_tool'] = ENV['ProgramFiles(x86)'] + '\\Common Files\\ArcGIS\\bin\\SoftwareAuthorization.exe'
desktop['esri_license_host'] = ENV['COMPUTERNAME']
desktop['software_class'] = 'Viewer'
desktop['seat_preference'] = 'Fixed'
desktop['desktop_config'] = true
desktop['modifyflexdacl'] = false

desktop['authorization_file'] = ''
desktop['authorization_file_version'] = node['arcgis']['version'].to_f.to_s

case node['arcgis']['version']
when '10.6.1'
desktop['product_code'] = '{FA2E2CBC-0697-4C71-913E-8C65B5A611E8}'
when '10.6'
desktop['product_code'] = '{F8206086-367E-44E4-9E24-92E9E057A63D}'
when '10.5.1'
desktop['product_code'] = '{4740FC57-60FE-45BB-B513-3309F6B73183}'
when '10.5'
desktop['product_code'] = '{76B58799-3448-4DE4-BA71-0FDFAA2A2E9A}'
when '10.4.1'
desktop['product_code'] = '{CB0C9578-75CB-45E5-BD81-A600BA33B0C3}'
when '10.4'
desktop['product_code'] = '{72E7DF0D-FFEE-43CE-A5FA-43DFC25DC087}'
else
Chef::Log.warn 'Unsupported ArcGIS version'
end
else # node['platform'] == 'linux'
# Not supported
end

end
53 changes: 53 additions & 0 deletions cookbooks/arcgis-desktop/attributes/licensemanager.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#
# Cookbook Name:: arcgis-desktop
# Attributes:: licensemanager
#
# Copyright 2018 Esri
#
# 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.

default['arcgis']['licensemanager'].tap do |licensemanager|

case node['platform']
when 'windows'
licensemanager['setup'] = ::File.join(node['arcgis']['repository']['setups'],
'ArcGIS ' + node['arcgis']['version'],
'LicenseManager', 'Setup.exe')
licensemanager['lp-setup'] = 'C:\\ArcGIS\\LicenseManager\\SetupFiles\\setup.msi'
licensemanager['install_dir'] = ENV['ProgramFiles(x86)'] + '\\ArcGIS'

case node['arcgis']['version']
when '10.6.1'
licensemanager['product_code'] = '{1914B5D6-02C2-4CA3-9CAB-EE76358228CF}'
when '10.6'
licensemanager['product_code'] = '{D6AF20B5-825F-44A9-915D-C2868CBD59F3}'
when '10.5.1'
licensemanager['product_code'] = '{DF06C3DC-54B5-49A1-9756-B68FD65A0AD0}'
when '10.5'
licensemanager['product_code'] = '{3A024FEA-3E14-4257-87D0-8FCA03257560}'
when '10.4.1'
licensemanager['product_code'] = '{D71379AF-A72B-4B10-A7BA-64BC6AF6841B}'
when '10.4'
licensemanager['product_code'] = '{E1393226-725C-42F8-A672-4E5AC55EFBDE}'
else
Chef::Log.warn 'Unsupported ArcGIS version'
end
else # node['platform'] == 'linux'
licensemanager['setup'] = ::File.join(node['arcgis']['repository']['setups'],
node['arcgis']['version'],
'licensemanager', 'Setup')
licensemanager['install_dir'] = '/'
licensemanager['install_subdir'] = 'arcgis/license' + node['arcgis']['version']
end

end
2 changes: 1 addition & 1 deletion cookbooks/arcgis-desktop/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
license 'Apache 2.0'
description 'Installs and configures ArcGIS Desktop'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.2.0'
version '3.2.1'

depends 'windows'
depends 'limits'
Expand Down
14 changes: 12 additions & 2 deletions cookbooks/arcgis-desktop/providers/desktop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,19 @@

action :system do
if node['platform'] == 'windows'
# TODO: Ensure Desktop system requirements
# TODO: Ensure Desktop system requirements
end


new_resource.updated_by_last_action(true)
end

action :unpack do
cmd = @new_resource.setup_archive
args = "/s /d \"#{@new_resource.setups_repo}\""
cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600 })
cmd.run_command
cmd.error!

new_resource.updated_by_last_action(true)
end

Expand Down
4 changes: 2 additions & 2 deletions cookbooks/arcgis-desktop/providers/licensemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
# NOTE: ArcGIS products are not officially supported on debian linux family
end
end

new_resource.updated_by_last_action(true)
end

Expand Down Expand Up @@ -91,7 +91,7 @@
cmd.run_command
cmd.error!
else
install_subdir = ::File.join(@new_resource.install_dir, node['arcgis']['licensemanager']['install_subdir'])
install_subdir = ::File.join(@new_resource.install_dir, node['arcgis']['licensemanager']['install_subdir'])
cmd = ::File.join(install_subdir, 'uninstallLicenseManager')
args = "-s"

Expand Down
9 changes: 9 additions & 0 deletions cookbooks/arcgis-desktop/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
action :system
end

arcgis_desktop_desktop 'Unpack ArcGIS Desktop Setup' do
setup_archive node['arcgis']['desktop']['setup_archive']
setups_repo node['arcgis']['repository']['setups']
only_if { ::File.exist?(node['arcgis']['desktop']['setup_archive']) &&
!::File.exist?(node['arcgis']['desktop']['setup']) }
not_if { Utils.product_installed?(node['arcgis']['desktop']['product_code']) }
action :unpack
end

arcgis_desktop_desktop 'Install ArcGIS Desktop' do
setup node['arcgis']['desktop']['setup']
product_code node['arcgis']['desktop']['product_code']
Expand Down
4 changes: 3 additions & 1 deletion cookbooks/arcgis-desktop/resources/desktop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@
# limitations under the License.
#

actions :system, :install, :uninstall, :authorize
actions :system, :unpack, :install, :uninstall, :authorize

attribute :setup_archive, :kind_of => String
attribute :setups_repo, :kind_of => String
attribute :setup, :kind_of => String
attribute :product_code, :kind_of => String
attribute :install_dir, :kind_of => String
Expand Down
Loading

0 comments on commit 0f93375

Please sign in to comment.