Skip to content

Commit

Permalink
Merge pull request #55 from Esri/v2.3.1
Browse files Browse the repository at this point in the history
Release v2.3.1
  • Loading branch information
pbobov authored Dec 15, 2016
2 parents ec7d4d6 + cb67fab commit adea60f
Show file tree
Hide file tree
Showing 47 changed files with 1,492 additions and 343 deletions.
6 changes: 5 additions & 1 deletion cookbooks/arcgis-desktop/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,12 @@ arcgis-desktop cookbook CHANGELOG

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

2.3.0
2.3.1
-----
- Added support for ArcGIS 10.5.

2.3.0
-----
- Added support for ArcGIS 10.5 Beta.
- Split from arcgis 2.2.1 cookbook.

9 changes: 2 additions & 7 deletions cookbooks/arcgis-desktop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,8 @@ Requirements
------------

### Supported ArcGIS software
* ArcGIS for Desktop (Windows only)
* ArcGIS License Manager

### Supported ArcGIS software versions
* ArcGIS 10.4
* ArcGIS 10.4.1
* ArcGIS 10.5 Beta
* ArcGIS 10.4/10.4.1/10.5 for Desktop (Windows only)
* ArcGIS 10.4/10.4.1/10.5 License Manager

### Platforms
* Windows 7
Expand Down
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 for Desktop'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.3.0'
version '2.3.1'

depends 'windows'
depends 'limits'
Expand Down
7 changes: 6 additions & 1 deletion cookbooks/arcgis-geoevent/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@ arcgis-geoevent cookbook CHANGELOG

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

2.3.1
-----
- Configure 'arcgisgeoevent' system.d service.
- Added support for ArcGIS 10.5.

2.3.0
-----
- Split from 'arcgis' 2.2.1 cookbook.
- Added support for ArcGIS 10.5.
- Added support for ArcGIS 10.5 Beta.
7 changes: 1 addition & 6 deletions cookbooks/arcgis-geoevent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@ Requirements

### Supported ArcGIS software

* ArcGIS GeoEvent Extension for Server

### Supported ArcGIS software versions
* ArcGIS 10.4
* ArcGIS 10.4.1
* ArcGIS 10.5 Beta
* ArcGIS 10.4/10.4.1/10.5 GeoEvent Extension for Server

### Platforms

Expand Down
2 changes: 1 addition & 1 deletion cookbooks/arcgis-geoevent/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 GeoEvent Extension for Server'
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version '2.3.0'
version '2.3.1'

depends 'arcgis-server'

Expand Down
99 changes: 64 additions & 35 deletions cookbooks/arcgis-geoevent/providers/geoevent.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@
#

action :system do
powershell_script 'Open Ports required by GeoEvent Extension' do
code <<-EOH
netsh advfirewall firewall add rule name="Allow_ArcGISGeoEvent_Ports2" dir=in action=allow protocol=TCP localport="2181,2182,2190,27271,27272,27273,6143,6180,5565,5570,5575" description="Allows connections through all ports used by ArcGIS GeoEvent"
EOH
only_if { node['platform'] == 'windows' && ENV['arcgis_cloud_platform'] == 'aws'}
ignore_failure true
if node['platform'] == 'windows'
powershell_script 'Open Ports required by GeoEvent Extension' do
code <<-EOH
netsh advfirewall firewall add rule name="Allow_ArcGISGeoEvent_Ports2" dir=in action=allow protocol=TCP localport="2181,2182,2190,27271,27272,27273,6143,6180,5565,5570,5575" description="Allows connections through all ports used by ArcGIS GeoEvent"
EOH
only_if { node['platform'] == 'windows' && ENV['arcgis_cloud_platform'] == 'aws'}
ignore_failure true
end
end
end

Expand All @@ -43,18 +45,12 @@
else
cmd = @new_resource.setup
run_as_user = @new_resource.run_as_user
arcgisgeoevent = ::File.join(@new_resource.install_dir,
node['arcgis']['server']['install_subdir'],
'GeoEvent/bin/ArcGISGeoEvent-service')

cmd = Mixlib::ShellOut.new("su - #{run_as_user} -c \"#{cmd}\"",
{ :timeout => 3600 })
cmd.run_command
cmd.error!

configure_autostart(arcgisgeoevent)
end

new_resource.updated_by_last_action(true)
end

Expand Down Expand Up @@ -91,12 +87,10 @@
service_logon_user = ".\\#{@new_resource.run_as_user}"
end
service_name = 'ArcGISGeoEvent'
Utils.retry_ShellOut("net stop \"#{service_name}\" /yes",
10, 60, {:timeout => 600})
Utils.retry_ShellOut("sc.exe config \"#{service_name}\" obj= \"#{service_logon_user}\" password= \"#{@new_resource.run_as_password}\"",
#Utils.retry_ShellOut("net stop \"#{service_name}\" /yes", 10, 60, {:timeout => 600})
Utils.retry_ShellOut("sc.exe config \"#{service_name}\" obj= \"#{service_logon_user}\" password= \"#{@new_resource.run_as_password}\"",
1, 60, {:timeout => 600})
Utils.retry_ShellOut("net start \"#{service_name}\" /yes",
5, 60, {:timeout => 600})
#Utils.retry_ShellOut("net start \"#{service_name}\" /yes", 5, 60, {:timeout => 600})
end
end

Expand All @@ -106,8 +100,8 @@
supports :status => true, :restart => true, :reload => true
action :stop
end
else
service "ArcGISGeoEvent-service" do
else
service "arcgisgeoevent" do
supports :status => true, :restart => true, :reload => true
action :stop
end
Expand All @@ -120,30 +114,65 @@
supports :status => true, :restart => true, :reload => true
action [:enable, :start]
end
else
service "ArcGISGeoEvent-service" do
else
service "arcgisgeoevent" do
supports :status => true, :restart => true, :reload => true
action [:enable, :start]
end
end
end

action :configure_autostart do
Chef::Log.info('Configure ArcGIS GeoEvent Extension for Server to be started with the operating system.')

arcgisgeoevent = ::File.join(@new_resource.install_dir,
node['arcgis']['server']['install_subdir'],
'GeoEvent/bin/ArcGISGeoEvent-service')
if ['rhel', 'centos'].include?(node['platform_family'])
init_d = '/etc/rc.d/init.d/'
if node['platform'] == 'windows'
service "ArcGISGeoEvent" do
supports :status => true, :restart => true, :reload => true
action :enable
end
else
init_d = '/etc/init.d/'
end
Chef::Log.info('Configure ArcGIS GeoEvent Extension for Server to be started with the operating system.')

agsuser = node['arcgis']['run_as_user']
geehome = ::File.join(@new_resource.install_dir,
node['arcgis']['server']['install_subdir'],
'GeoEvent')

arcgisgeoevent = ::File.join(geehome, 'bin/ArcGISGeoEvent-service')

if node['init_package'] == 'init' # SysV
arcgisgeoevent_path = '/etc/init.d/arcgisgeoevent'
service_file = 'ArcGISGeoEvent-service.erb'
template_variables = ({ :geehome => geehome, :agsuser => agsuser })
else # node['init_package'] == 'systemd'
arcgisgeoevent_path = '/etc/systemd/system/arcgisgeoevent.service'
service_file = 'geoevent.service.erb'
template_variables = ({ :geehome => geehome, :agsuser => agsuser })
end

template arcgisgeoevent_path do
source service_file
cookbook 'arcgis-geoevent'
variables template_variables
owner agsuser
group 'root'
mode '0755'
notifies :run, 'execute[Load systemd unit file]', :immediately
not_if { ::File.exists?(arcgisgeoevent_path) }
end

execute 'Load systemd unit file' do
command 'systemctl daemon-reload'
action :nothing
only_if {( node['init_package'] == 'systemd' )}
notifies :restart, 'service[arcgisgeoevent]', :immediately
end

cmd = Mixlib::ShellOut.new("ln -s #{arcgisgeoevent} #{init_d}",
{ :timeout => 3600 })
cmd.run_command
cmd.error!
service 'arcgisgeoevent' do
supports :status => true, :restart => true, :reload => true
action :enable
end

new_resource.updated_by_last_action(true)
end
end

action :authorize do
Expand All @@ -159,7 +188,7 @@
else
args = "-f \"#{@new_resource.authorization_file}\""

cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}",
cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}",
{ :timeout => 600, :user => node['arcgis']['run_as_user'] })
cmd.run_command
cmd.error!
Expand Down
9 changes: 3 additions & 6 deletions cookbooks/arcgis-geoevent/recipes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,13 @@
not_if { ::File.exists?(::File.join(node['arcgis']['server']['install_dir'],
node['arcgis']['server']['install_subdir'],
'GeoEvent/bin/ArcGISGeoEvent-service')) }
notifies :configure_autostart, 'arcgis_geoevent_geoevent[Configure ArcGISGeoEvent service]', :immediately
end
action :install
end

if node['platform'] != 'windows'
arcgis_geoevent_geoevent 'Configure ArcGISGeoEvent service' do
install_dir node['arcgis']['server']['install_dir']
action :nothing
end
arcgis_geoevent_geoevent 'Configure ArcGISGeoEvent service' do
install_dir node['arcgis']['server']['install_dir']
action :configure_autostart
end

arcgis_geoevent_geoevent 'Start ArcGIS GeoEvent' do
Expand Down
Loading

0 comments on commit adea60f

Please sign in to comment.