Skip to content

Commit

Permalink
Merge pull request #204 from Esri/v3.3.0
Browse files Browse the repository at this point in the history
Release v3.3.0
  • Loading branch information
pbobov authored Mar 21, 2019
2 parents 56b8a7d + 7689230 commit 0fb2143
Show file tree
Hide file tree
Showing 149 changed files with 4,040 additions and 985 deletions.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ Thumbs.db
.settings
.metadata
.buildpath
.vscode
Servers

*.class
Expand All @@ -53,3 +54,6 @@ Servers
target
build
*.launch

# Build Files #
.gradle/
18 changes: 9 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
[![Gitter chat](https://badges.gitter.im/gitterHQ/services.png)](https://gitter.im/arcgis-cookbook/Lobby)

Chef Cookbooks for ArcGIS
=========================

This repository contains ArcGIS Chef cookbooks used to help simplify and automate ArcGIS installation and configuration using IT automation tool [Chef](https://www.chef.io/chef/).

Included cookbooks:

* [arcgis-enterprise](cookbooks/arcgis-enterprise) (installs and configures ArcGIS Server, ArcGIS Data Store, Portal for ArcGIS, ArcGIS WebAdaptor)
* [arcgis-geoevent](cookbooks/arcgis-geoevent) (installs and configures ArcGIS GeoEvent Server)
* [arcgis-insights](cookbooks/arcgis-insights) (installs and configures Insights for ArcGIS)
* [arcgis-desktop](cookbooks/arcgis-desktop) (installs and configures ArcGIS Desktop)
* [arcgis-pro](cookbooks/arcgis-pro) (installs and configures ArcGIS Pro)
* [esri-tomcat](cookbooks/esri-tomcat) (installs and configures Apache Tomcat for using with ArcGIS Web Adaptor)
* [esri-iis](cookbooks/esri-iis) (enables IIS features required by ArcGIS Web Adaptor (IIS) and configures HTTPS binding.)
* [arcgis-enterprise](cookbooks/arcgis-enterprise) - installs and configures ArcGIS Server, ArcGIS Data Store, Portal for ArcGIS, ArcGIS WebAdaptor
* [arcgis-geoevent](cookbooks/arcgis-geoevent) - installs and configures ArcGIS GeoEvent Server
* [arcgis-insights](cookbooks/arcgis-insights) - installs and configures Insights for ArcGIS
* [arcgis-desktop](cookbooks/arcgis-desktop) - installs and configures ArcGIS Desktop
* [arcgis-pro](cookbooks/arcgis-pro) - installs and configures ArcGIS Pro
* [arcgis-repository](cookbooks/arcgis-repository) - downloads ArcGIS software setups from remote to local repositories
* [arcgis-egdb](cookbooks/arcgis-egdb) - creates enterprise geodatabases in SQL Server or PostgreSQL DBMS and registers them with ArcGIS Server
* [esri-tomcat](cookbooks/esri-tomcat) - installs and configures Apache Tomcat for using with ArcGIS Web Adaptor
* [esri-iis](cookbooks/esri-iis) - enables IIS features required by ArcGIS Web Adaptor (IIS) and configures HTTPS binding


Sample JSON attribute files for different ArcGIS deployment patterns are available at [roles](roles) folder.
Expand Down
1 change: 1 addition & 0 deletions cookbooks/arcgis-desktop/Berksfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ source 'https://supermarket.chef.io'
metadata

group :integration do
cookbook 'arcgis-repository', path: '../arcgis-repository'
cookbook 'aws'
cookbook 'seven_zip'
cookbook 'tar'
Expand Down
5 changes: 5 additions & 0 deletions cookbooks/arcgis-desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ arcgis-desktop cookbook CHANGELOG

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

3.3.0
-----
- Added support for ArcGIS 10.7.
- Added dependency on arcgis-repository cookbook to support global ArcGIS software repository in S3.

3.2.1
-----
- Added support for ArcGIS 10.6.1.
Expand Down
23 changes: 15 additions & 8 deletions cookbooks/arcgis-desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ Requirements
* 10.5.1
* 10.6
* 10.6.1
* 10.7

### Supported ArcGIS software

* ArcGIS Desktop (Windows only)
* ArcGIS License Manager
* ArcGIS License Manager

### Platforms

* Windows 7
* Windows 8 (8.1)
* Windows 10
Expand All @@ -27,25 +30,29 @@ Requirements

### Dependencies
The following cookbooks are required:

* windows
* arcgis-repository

Attributes
----------
* `node['arcgis']['version']` = ArcGIS version. Default value is `10.5`.
* `node['arcgis']['desktop']['setup']` = The location of ArcGIS Desktop setup executable. Default location is `C:\Temp\ArcGISDesktop\Setup.exe`.
* `node['arcgis']['desktop']['lp-setup']` = The location of language pack for ArcGIS Desktop. Default location is `nil`.

* `node['arcgis']['version']` = ArcGIS version. Default value is `10.7`.
* `node['arcgis']['desktop']['setup_archive']` = The location of ArcGIS Desktop setup archive. Default value depends on `node['arcgis']['version']` attribute value.
* `node['arcgis']['desktop']['setup']` = The location of ArcGIS Desktop setup executable. Default location is `%USERPROFILE#\Documents\ArcGIS10.7\Desktop\Setup.exe`.
* `node['arcgis']['desktop']['lp-setup']` = The location of language pack for ArcGIS Desktop. Default location is `C:\ArcGIS\DesktopLP\SetupFiles\setup.msi`.
* `node['arcgis']['desktop']['install_dir']` = ArcGIS Desktop installation directory. By default, ArcGIS Desktop is installed to `%ProgramFiles(x86)%\ArcGIS`.
* `node['arcgis']['desktop']['install_features']` = Comma-separated list of ArcGIS Desktop features to install. Default value is `ALL`.
* `node['arcgis']['desktop']['authorization_file']` = ArcGIS Desktop authorization file path. Default location and file name are `C:\\Temp\\license.ecp`.
* `node['arcgis']['desktop']['authorization_file_version']` = ArcGIS Desktop authorization file version. Default value is `10.4`.
* `node['arcgis']['desktop']['esri_license_host']` = Hostname of ArcGIS License Manager. Default hostname is `%COMPUTERNAME%`.
* `node['arcgis']['desktop']['software_class']` = ArcGIS Desktop software class <Viewer|Editor|Professional>. Default value is `Viewer`.
* `node['arcgis']['desktop']['seat_preference']` = ArcGIS Desktop license seat preference <Fixed|Float>. Default value is `Fixed`.
* `node['arcgis']['licensemanager']['setup']` = The location of ArcGIS License Manager setup executable. Default location is `C:\Temp\ArcGISLicenseManager\Setup.exe` on Windows, `/tmp/licensemanager-cd/Setup` on Linux.
* `node['arcgis']['licensemanager']['lp-setup']` = The location of language pack for ArcGIS License Manager. Default location is `nil`.
* `node['arcgis']['licensemanager']['setup_archive']` = The location of ArcGIS License Manager setup archive. Default value depends on `node['arcgis']['version']` attribute value.
* `node['arcgis']['licensemanager']['setup']` = The location of ArcGIS License Manager setup executable. Default location is `%USERPROFILE#\Documents\ArcGIS10.7\LicenseManager\Setup.exe` on Windows, and `/opt/arcgis/10.7/licensemanager/Setup` on Linux.
* `node['arcgis']['licensemanager']['lp-setup']` = The location of language pack for ArcGIS License Manager. Default location is `C:\ArcGIS\LicenseManager\SetupFiles\setup.msi`.
* `node['arcgis']['licensemanager']['install_dir']` = ArcGIS License Manager installation directory. By default, the license manager is installed to `%ProgramFiles(x86)%\ArcGIS` on Windows and `/` on Linux.


Recipes
-------
### arcgis-desktop::default
Expand Down Expand Up @@ -75,7 +82,7 @@ Esri welcomes contributions from anyone and everyone. Please see our [guidelines
Licensing
---------

Copyright 2018 Esri
Copyright 2019 Esri

Licensed under the Apache License, Version 2.0 (the "License");
You may not use this file except in compliance with the License.
Expand Down
6 changes: 3 additions & 3 deletions cookbooks/arcgis-desktop/attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@
# See the License for the specific language governing permissions and
# limitations under the License.

include_attribute 'arcgis-repository'

default['arcgis']['run_as_user'] = 'arcgis'
default['arcgis']['run_as_password'] = 'Pa$$w0rdPa$$w0rd'
default['arcgis']['version'] = '10.6.1'
default['arcgis']['version'] = '10.7'

case node['platform']
when 'windows'
default['arcgis']['repository']['setups'] = ENV['USERPROFILE'] + '\\Documents'
default['arcgis']['python']['install_dir'] = 'C:\\Python27'
else # node['platform'] == 'linux'
default['arcgis']['repository']['setups'] = '/opt/arcgis'
default['arcgis']['python']['install_dir'] = '' # Not Needed on Linux
end
14 changes: 10 additions & 4 deletions cookbooks/arcgis-desktop/attributes/desktop.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
when 'windows'
desktop['setup_archive'] = ''
desktop['setup'] = ::File.join(node['arcgis']['repository']['setups'],
'ArcGIS ' + node['arcgis']['version'],
'Desktop', 'Setup.exe')
'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'
Expand All @@ -38,7 +38,13 @@
desktop['authorization_file_version'] = node['arcgis']['version'].to_f.to_s

case node['arcgis']['version']
when '10.7'
desktop['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'],
'ArcGIS_Desktop_107_167519.exe').gsub('/', '\\')
desktop['product_code'] = '{BFB4F32E-38DF-4E8F-8180-C99FC9A14BBE}'
when '10.6.1'
desktop['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'],
'ArcGIS_Desktop_1061_163864.exe').gsub('/', '\\')
desktop['product_code'] = '{FA2E2CBC-0697-4C71-913E-8C65B5A611E8}'
when '10.6'
desktop['product_code'] = '{F8206086-367E-44E4-9E24-92E9E057A63D}'
Expand All @@ -51,10 +57,10 @@
when '10.4'
desktop['product_code'] = '{72E7DF0D-FFEE-43CE-A5FA-43DFC25DC087}'
else
Chef::Log.warn 'Unsupported ArcGIS version'
Chef::Log.warn 'Unsupported ArcGIS Desktop version'
end
else # node['platform'] == 'linux'
# Not supported
Chef::Log.warn "ArcGIS Desktop is not supported on #{node['platform']} platform."
end

end
15 changes: 11 additions & 4 deletions cookbooks/arcgis-desktop/attributes/licensemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
# limitations under the License.

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

case node['platform']
when 'windows'
licensemanager['setup'] = ::File.join(node['arcgis']['repository']['setups'],
Expand All @@ -27,7 +26,13 @@
licensemanager['install_dir'] = ENV['ProgramFiles(x86)'] + '\\ArcGIS'

case node['arcgis']['version']
when '10.7'
licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'],
'ArcGIS_License_Manager_Windows_2018_1_167080.exe').gsub('/', '\\')
licensemanager['product_code'] = '{E1C26E47-C6AB-4120-A3DE-2FA0F723C876}'
when '10.6.1'
licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'],
'ArcGIS_License_Manager_Windows_2018_0_163304.exe').gsub('/', '\\')
licensemanager['product_code'] = '{1914B5D6-02C2-4CA3-9CAB-EE76358228CF}'
when '10.6'
licensemanager['product_code'] = '{D6AF20B5-825F-44A9-915D-C2868CBD59F3}'
Expand All @@ -44,10 +49,12 @@
end
else # node['platform'] == 'linux'
licensemanager['setup'] = ::File.join(node['arcgis']['repository']['setups'],
node['arcgis']['version'],
'licensemanager', 'Setup')
node['arcgis']['version'],
'licensemanager', 'Setup')
licensemanager['install_dir'] = '/'
licensemanager['install_subdir'] = 'arcgis/license' + node['arcgis']['version']
end

licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'],
'ArcGIS_License_Manager_Linux_2018_1_167092.tar.gz')
end
end
3 changes: 2 additions & 1 deletion cookbooks/arcgis-desktop/metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
license 'Apache 2.0'
description 'Installs and configures ArcGIS Desktop'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '3.2.1'
version '3.3.0'

depends 'arcgis-repository'
depends 'windows'
depends 'limits'

Expand Down
28 changes: 25 additions & 3 deletions cookbooks/arcgis-desktop/providers/licensemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

action :system do
if node['platform'] == 'windows'
#TODO: Ensure License Manager system requirements on Windows
# TODO: Ensure License Manager system requirements on Windows
else
arcgis_desktop_user @new_resource.recipe_name + ':create-licensemanager-account'

#TODO: Ensure License Manager system requirements on redhat,centos
# TODO: Ensure License Manager system requirements on redhat,centos
case node['platform']
when 'redhat', 'centos'
['glibc.i686'].each do |pckg|
Expand All @@ -35,7 +35,7 @@
end
end
when 'suse'
#TODO: Ensure License Manager system requirements on suse
# TODO: Ensure License Manager system requirements on suse
else
# NOTE: ArcGIS products are not officially supported on debian linux family
end
Expand All @@ -44,6 +44,28 @@
new_resource.updated_by_last_action(true)
end

action :unpack do
if node['platform'] == 'windows'
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!
else
cmd = 'tar'
args = "xzvf \"#{@new_resource.setup_archive}\""
repo = ::File.join(@new_resource.setups_repo, node['arcgis']['version'])
FileUtils.mkdir_p(repo) unless ::File.directory?(repo)
cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600, :cwd => repo })
cmd.run_command
cmd.error!

FileUtils.chown_R @new_resource.run_as_user, nil, repo
end

new_resource.updated_by_last_action(true)
end

action :install do
if node['platform'] == 'windows'
cmd = @new_resource.setup
Expand Down
9 changes: 9 additions & 0 deletions cookbooks/arcgis-desktop/recipes/licensemanager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,15 @@
action :system
end

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

arcgis_desktop_licensemanager 'Install ArcGIS License Manager' do
setup node['arcgis']['licensemanager']['setup']
product_code node['arcgis']['licensemanager']['product_code']
Expand Down
4 changes: 3 additions & 1 deletion cookbooks/arcgis-desktop/resources/licensemanager.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
actions :system, :unpack, :install, :uninstall

attribute :setup_archive, :kind_of => String
attribute :setup_repo, :kind_of => String
attribute :setup, :kind_of => String
attribute :product_code, :kind_of => String
attribute :install_dir, :kind_of => String
Expand Down
22 changes: 22 additions & 0 deletions cookbooks/arcgis-egdb/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.vagrant
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~

# Bundler
Gemfile.lock
gems.locked
bin/*
.bundle/*

# test kitchen
.kitchen/
.kitchen.local.yml

# Chef
Berksfile.lock
.zero-knife.rb
Policyfile.lock.json
57 changes: 57 additions & 0 deletions cookbooks/arcgis-egdb/.kitchen.ec2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
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: 14.5

platforms:
- name: windows-2016
- name: ubuntu-16.04

suites:
- name: arcgis-egdb
driver:
tags:
Name: 'postgresql-egdb'
run_list:
- recipe[download-setups-s3::server]
- recipe[apt]
- recipe[arcgis-enterprise::system]
- recipe[arcgis-enterprise::server]
- recipe[postgresql-test::client]
- recipe[postgresql-test::server]
- recipe[arcgis-egdb::default]
attributes:
prebuilt_postgresql:
version: 9.6.9
arcgis:
version: '10.7'
server:
authorization_file: '/auth_files/ArcGIS_Server/Advanced/Server_Ent_Adv.ecp'
egdb:
engine: postgres
endpoint: localhost
master_username: postgres
master_password: changeit
db_username: sde
db_password: changeit
Loading

0 comments on commit 0fb2143

Please sign in to comment.