diff --git a/README.md b/README.md index 6290af7..0bb34a7 100644 --- a/README.md +++ b/README.md @@ -7,28 +7,34 @@ This repository contains ArcGIS Chef cookbooks used to help simplify and automat 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-notebooks](cookbooks/arcgis-notebooks) - installs and configures ArcGIS Notebook Server -* [arcgis-mission](cookbooks/arcgis-mission) - installs and configures ArcGIS Mission 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 +* [arcgis-desktop](cookbooks/arcgis-desktop) - installs and configures ArcGIS Desktop. +* [arcgis-egdb](cookbooks/arcgis-egdb) - creates enterprise geodatabases in SQL Server or PostgreSQL DBMS and registers them with ArcGIS Server. +* [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-mission](cookbooks/arcgis-mission) - installs and configures ArcGIS Mission Server. +* [arcgis-notebooks](cookbooks/arcgis-notebooks) - installs and configures ArcGIS Notebook Server. +* [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-workflow-manager](cookbooks/arcgis-workflow-manager) - installs and configures ArcGIS Workflow Manager Server. +* [esri-iis](cookbooks/esri-iis) - enables IIS features required by ArcGIS Web Adaptor (IIS) and configures HTTPS binding. +* [esri-tomcat](cookbooks/esri-tomcat) - installs and configures Apache Tomcat for using with ArcGIS Web Adaptor. Included ArcGIS deployment templates: -* [arcgis-datastore](templates/arcgis-datastore) -- Use this template to deploy and configure different [ArcGIS Data Store types](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-arcgis-data-store.htm). -* [arcgis-egdb](templates/arcgis-egdb) -- Lets you to create [enterprise geodatabases](https://enterprise.arcgis.com/en/server/latest/manage-data/windows/enterprise-geodatabases-and-arcgis-enterprise.htm) and register them with an ArcGIS Server site. -* [arcgis-enterprise-base](templates/arcgis-enterprise-base) -- Creates a [base ArcGIS Enterprise deployment](https://enterprise.arcgis.com/en/get-started/latest/windows/base-arcgis-enterprise-deployment.htm). -* [arcgis-geoevent](templates/arcgis-geoevent-server) -- Creates an [ArcGIS GeoEvent Server](https://enterprise.arcgis.com/en/geoevent/) deployment. -* [arcgis-mission-server](templates/arcgis-mission-server) -- Deploys [ArcGIS Mission Server](https://enterprise.arcgis.com/en/mission/) and federates it with an ArcGIS Enterprise deployment. -* [arcgis-notebook-server](templates/arcgis-notebook-server) -- Deploys [ArcGIS Notebook Server](https://enterprise.arcgis.com/en/notebook/) with an ArcGIS Enterprise deployment. -* [arcgis-portal](templates/arcgis-portal) -- Deploys [Portal for ArcGIS](https://enterprise.arcgis.com/en/portal/). -* [arcgis-server](templates/arcgis-server) -- Creates any of the following ArcGIS Server sites and federates them with an ArcGIS Enterprise deployment: GIS Server, ArcGIS GeoAnalytics Server, Raster Analytics Server, Image Server. +* [arcgis-datastore](templates/arcgis-datastore) - deploys different [ArcGIS Data Store types](https://enterprise.arcgis.com/en/portal/latest/administer/windows/what-is-arcgis-data-store.htm) and registers them with ArcGIS Server. +* [arcgis-desktop](templates/arcgis-desktop) - deploys [ArcGIS Desktop](https://desktop.arcgis.com/en/). +* [arcgis-egdb](templates/arcgis-egdb) - creates [enterprise GeoDatabases](https://enterprise.arcgis.com/en/server/latest/manage-data/windows/enterprise-geodatabases-and-arcgis-enterprise.htm) and registers them with ArcGIS Server. +* [arcgis-enterprise-base](templates/arcgis-enterprise-base) - deploys [base ArcGIS Enterprise](https://enterprise.arcgis.com/en/get-started/latest/windows/base-arcgis-enterprise-deployment.htm). +* [arcgis-geoevent](templates/arcgis-geoevent-server) - deploys [ArcGIS GeoEvent Server](https://enterprise.arcgis.com/en/geoevent/). +* [arcgis-license-manager](templates/arcgis-license-manager) - deploys [ArcGIS License Manager](https://desktop.arcgis.com/en/license-manager/latest/welcome.htm). +* [arcgis-mission-server](templates/arcgis-mission-server) - deploys [ArcGIS Mission Server](https://enterprise.arcgis.com/en/mission/) and federates it with Portal for ArcGIS. +* [arcgis-notebook-server](templates/arcgis-notebook-server) - deploys [ArcGIS Notebook Server](https://enterprise.arcgis.com/en/notebook/) with an ArcGIS Enterprise deployment. +* [arcgis-portal](templates/arcgis-portal) - deploys [Portal for ArcGIS](https://enterprise.arcgis.com/en/portal/). +* [arcgis-pro](templates/arcgis-pro) - deploys [ArcGIS Pro](https://www.esri.com/en-us/arcgis/products/arcgis-pro/overview). +* [arcgis-server](templates/arcgis-server) - deploys ArcGIS Server in GIS Server, ArcGIS GeoAnalytics Server, Raster Analytics Server or Image Server roles and federates it with Portal for ArcGIS. +* [arcgis-webadaptor](templates/arcgis-webadaptor) - deploys [ArcGIS Web Adaptor](https://enterprise.arcgis.com/en/server/latest/install/windows/about-the-arcgis-web-adaptor.htm). +* [arcgis-workflow-manager](templates/arcgis-workflow-manager) - deploys [ArcGIS Workflow Manager Server](https://enterprise.arcgis.com/en/workflow/). See [wiki](https://github.com/Esri/arcgis-cookbook/wiki) pages and cookbooks' README.md files for more information about using ArcGIS cookbooks. diff --git a/cookbooks/arcgis-desktop/CHANGELOG.md b/cookbooks/arcgis-desktop/CHANGELOG.md index 0259451..1d5ce49 100644 --- a/cookbooks/arcgis-desktop/CHANGELOG.md +++ b/cookbooks/arcgis-desktop/CHANGELOG.md @@ -3,6 +3,10 @@ arcgis-desktop cookbook CHANGELOG This file is used to list changes made in each version of the arcgis-desktop cookbook. +3.8.0 +----- +- Added support for ArcGIS Desktop 10.8.2 and ArcGIS License Manager 2021.0/2021.1 + 3.7.0 ----- - Added support for ArcGIS License Manager 2020.1 diff --git a/cookbooks/arcgis-desktop/README.md b/cookbooks/arcgis-desktop/README.md index 44f19d1..fa083e8 100644 --- a/cookbooks/arcgis-desktop/README.md +++ b/cookbooks/arcgis-desktop/README.md @@ -19,6 +19,7 @@ Requirements * 10.7.1 * 10.8 * 10.8.1 + * 10.8.2 * ArcGIS License Manager * 2018.0 @@ -28,6 +29,8 @@ Requirements * 2019.2 * 2020.0 * 2020.1 + * 2021.0 + * 2021.1 ### Platforms @@ -35,12 +38,14 @@ Requirements * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 +* Windows Server 2022 * Ubuntu 16.04, 18.04 * Rhel 6.5, 7.0 ArcGIS Desktop is supported only on Windows platforms. ### Dependencies + The following cookbooks are required: * windows @@ -60,24 +65,28 @@ Attributes * `node['arcgis']['desktop']['esri_license_host']` = Hostname of ArcGIS License Manager. Default hostname is `%COMPUTERNAME%`. * `node['arcgis']['desktop']['software_class']` = ArcGIS Desktop software class . Default value is `Viewer`. * `node['arcgis']['desktop']['seat_preference']` = ArcGIS Desktop license seat preference . Default value is `Fixed`. -* `node['arcgis']['licensemanager']['version']` = ArcGIS License Manager version. Default value is `2020.1`. +* `node['arcgis']['licensemanager']['version']` = ArcGIS License Manager version. Default value is `2021.1`. * `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\ArcGIS License Manager 2020.1\LicenseManager\Setup.exe` on Windows, and `/opt/arcgis/2020.1/LicenseManager_Linux/Setup` on Linux. +* `node['arcgis']['licensemanager']['setup']` = The location of ArcGIS License Manager setup executable. Default location is `%USERPROFILE%\Documents\ArcGIS License Manager 2021.0\LicenseManager\Setup.exe` on Windows, and `/opt/arcgis/2021.1/LicenseManager_Linux/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 + Installs and configures ArcGIS Desktop. ### arcgis-desktop::licensemanager + Installs and configures ArcGIS License Manager. ### arcgis-desktop::lp-install + Installs language packs for ArcGIS Desktop and ArcGIS License Manager. ### arcgis-desktop::uninstall + Uninstalls ArcGIS Desktop and ArcGIS License Manager. Usage diff --git a/cookbooks/arcgis-desktop/attributes/desktop.rb b/cookbooks/arcgis-desktop/attributes/desktop.rb index ead5b8f..5726419 100644 --- a/cookbooks/arcgis-desktop/attributes/desktop.rb +++ b/cookbooks/arcgis-desktop/attributes/desktop.rb @@ -38,6 +38,10 @@ desktop['authorization_file_version'] = node['arcgis']['version'].to_f.to_s case node['arcgis']['version'] + when '10.8.2' + desktop['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Desktop_1082_180378.exe').gsub('/', '\\') + desktop['product_code'] = '{791AB03F-1AF2-43FE-8F5D-8FDC9509D7CF}' when '10.8.1' desktop['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Desktop_1081_175110.exe').gsub('/', '\\') diff --git a/cookbooks/arcgis-desktop/attributes/licensemanager.rb b/cookbooks/arcgis-desktop/attributes/licensemanager.rb index b7aad7f..dc4e5e1 100644 --- a/cookbooks/arcgis-desktop/attributes/licensemanager.rb +++ b/cookbooks/arcgis-desktop/attributes/licensemanager.rb @@ -17,7 +17,7 @@ # limitations under the License. default['arcgis']['licensemanager'].tap do |licensemanager| - licensemanager['version'] = '2020.1' + licensemanager['version'] = '2021.1' case node['platform'] when 'windows' @@ -28,6 +28,14 @@ licensemanager['install_dir'] = ENV['ProgramFiles(x86)'] + '\\ArcGIS' case node['arcgis']['licensemanager']['version'] + when '2021.1' + licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_License_Manager_Windows_2021_1_180127.exe').gsub('/', '\\') + licensemanager['product_code'] = '{DA36A877-1BF2-4E28-9CE3-D3A07FB645A3}' + when '2021.0' + licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_License_Manager_Windows_2021_0_177928.exe').gsub('/', '\\') + licensemanager['product_code'] = '{9DDD72DA-75D2-4FB0-BC19-25F8B53254FF}' when '2020.1' licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_License_Manager_Windows_2020_1_176572.exe').gsub('/', '\\') @@ -82,6 +90,12 @@ licensemanager['install_subdir'] = 'arcgis/license' + node['arcgis']['licensemanager']['version'] case node['arcgis']['licensemanager']['version'] + when '2021.1' + licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_License_Manager_Linux_2021_1_180145.tar.gz') + when '2021.0' + licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_License_Manager_Linux_2021.0_177950.tar.gz') when '2020.1' licensemanager['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_License_Manager_Linux_2020_1_176584.tar.gz') diff --git a/cookbooks/arcgis-desktop/metadata.rb b/cookbooks/arcgis-desktop/metadata.rb index eb5f219..2002263 100644 --- a/cookbooks/arcgis-desktop/metadata.rb +++ b/cookbooks/arcgis-desktop/metadata.rb @@ -4,10 +4,10 @@ license 'Apache 2.0' description 'Installs and configures ArcGIS Desktop and ArcGIS License Manager' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-repository', '~> 3.8' depends 'windows', '~> 5.3' depends 'limits', '~> 1.0' diff --git a/cookbooks/arcgis-desktop/providers/desktop.rb b/cookbooks/arcgis-desktop/providers/desktop.rb index bbf05f1..b42de4c 100644 --- a/cookbooks/arcgis-desktop/providers/desktop.rb +++ b/cookbooks/arcgis-desktop/providers/desktop.rb @@ -43,9 +43,9 @@ cmd = @new_resource.setup if @new_resource.seat_preference == 'Fixed' - args = "/qn ADDLOCAL=\"#{@new_resource.install_features}\" INSTALLDIR=\"#{@new_resource.install_dir}\" INSTALLDIR1=\"#{@new_resource.python_dir}\" DESKTOP_CONFIG=\"#{@new_resource.desktop_config}\" MODIFYFLEXDACL=\"#{@new_resource.modifyflexdacl}\"" + args = "/qn ACCEPTEULA=Yes ADDLOCAL=\"#{@new_resource.install_features}\" INSTALLDIR=\"#{@new_resource.install_dir}\" INSTALLDIR1=\"#{@new_resource.python_dir}\" DESKTOP_CONFIG=\"#{@new_resource.desktop_config}\" MODIFYFLEXDACL=\"#{@new_resource.modifyflexdacl}\"" else - args = "/qn ADDLOCAL=\"#{@new_resource.install_features}\" INSTALLDIR=\"#{@new_resource.install_dir}\" INSTALLDIR1=\"#{@new_resource.python_dir}\" ESRI_LICENSE_HOST=\"#{@new_resource.esri_license_host}\" SOFTWARE_CLASS=\"#{@new_resource.software_class}\" SEAT_PREFERENCE=\"#{@new_resource.seat_preference}\" DESKTOP_CONFIG=\"#{@new_resource.desktop_config}\" MODIFYFLEXDACL=\"#{@new_resource.modifyflexdacl}\"" + args = "/qn ACCEPTEULA=Yes ADDLOCAL=\"#{@new_resource.install_features}\" INSTALLDIR=\"#{@new_resource.install_dir}\" INSTALLDIR1=\"#{@new_resource.python_dir}\" ESRI_LICENSE_HOST=\"#{@new_resource.esri_license_host}\" SOFTWARE_CLASS=\"#{@new_resource.software_class}\" SEAT_PREFERENCE=\"#{@new_resource.seat_preference}\" DESKTOP_CONFIG=\"#{@new_resource.desktop_config}\" MODIFYFLEXDACL=\"#{@new_resource.modifyflexdacl}\"" end cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600 }) diff --git a/cookbooks/arcgis-desktop/providers/licensemanager.rb b/cookbooks/arcgis-desktop/providers/licensemanager.rb index 7858873..8d17540 100644 --- a/cookbooks/arcgis-desktop/providers/licensemanager.rb +++ b/cookbooks/arcgis-desktop/providers/licensemanager.rb @@ -73,7 +73,7 @@ if node['platform'] == 'windows' cmd = @new_resource.setup - args = "/qn ADDLOCAL=ALL INSTALLDIR=\"#{@new_resource.install_dir}\" INSTALLDIR1=\"#{@new_resource.python_dir}\"" + args = "/qn ACCEPTEULA=Yes ADDLOCAL=ALL INSTALLDIR=\"#{@new_resource.install_dir}\"" cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}") cmd.run_command diff --git a/cookbooks/arcgis-desktop/recipes/licensemanager.rb b/cookbooks/arcgis-desktop/recipes/licensemanager.rb index 9f210ac..f6937ec 100644 --- a/cookbooks/arcgis-desktop/recipes/licensemanager.rb +++ b/cookbooks/arcgis-desktop/recipes/licensemanager.rb @@ -36,7 +36,6 @@ setup node['arcgis']['licensemanager']['setup'] product_code node['arcgis']['licensemanager']['product_code'] install_dir node['arcgis']['licensemanager']['install_dir'] - python_dir node['arcgis']['python']['install_dir'] run_as_user node['arcgis']['run_as_user'] if node['platform'] == 'windows' not_if { Utils.product_installed?(node['arcgis']['licensemanager']['product_code']) } diff --git a/cookbooks/arcgis-desktop/resources/licensemanager.rb b/cookbooks/arcgis-desktop/resources/licensemanager.rb index 82485ca..a17f9ba 100644 --- a/cookbooks/arcgis-desktop/resources/licensemanager.rb +++ b/cookbooks/arcgis-desktop/resources/licensemanager.rb @@ -24,7 +24,6 @@ attribute :setup, :kind_of => String attribute :product_code, :kind_of => String attribute :install_dir, :kind_of => String -attribute :python_dir, :kind_of => String attribute :run_as_user, :kind_of => String def initialize(*args) diff --git a/cookbooks/arcgis-egdb/README.md b/cookbooks/arcgis-egdb/README.md index 908138e..98e80d3 100644 --- a/cookbooks/arcgis-egdb/README.md +++ b/cookbooks/arcgis-egdb/README.md @@ -10,8 +10,12 @@ arcgis-egdb cookbook creates enterprise geodatabases in SQL Server or PostgreSQL * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 -* Ubuntu 14.04, 16.04, 18.04 -* RHEL 6.5, 7.0 +* Windows Server 2022 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 ## Database Servers diff --git a/cookbooks/arcgis-egdb/metadata.rb b/cookbooks/arcgis-egdb/metadata.rb index e5765dd..d1c289e 100644 --- a/cookbooks/arcgis-egdb/metadata.rb +++ b/cookbooks/arcgis-egdb/metadata.rb @@ -12,6 +12,7 @@ supports 'windows' supports 'ubuntu' supports 'redhat' +supports 'oracle' recipe 'arcgis-egdb::default', 'Creates EGDBs in the specified DBMS and registers them with ArcGIS Server' recipe 'arcgis-egdb::sql_alias', 'Creates EGDBHOST alias for SQL Server endpoint domain' diff --git a/cookbooks/arcgis-enterprise/CHANGELOG.md b/cookbooks/arcgis-enterprise/CHANGELOG.md index 4e083ef..453bb9d 100644 --- a/cookbooks/arcgis-enterprise/CHANGELOG.md +++ b/cookbooks/arcgis-enterprise/CHANGELOG.md @@ -3,6 +3,10 @@ arcgis-enterprise cookbook CHANGELOG This file is used to list changes made in each version of the arcgis-enterprise cookbook. +3.8.0 +----- +- Added support for ArcGIS Enterprise 10.9.1. + 3.7.0 ----- - Added support for ArcGIS Enterprise 10.9. diff --git a/cookbooks/arcgis-enterprise/README.md b/cookbooks/arcgis-enterprise/README.md index 3a46292..8b3ffd0 100644 --- a/cookbooks/arcgis-enterprise/README.md +++ b/cookbooks/arcgis-enterprise/README.md @@ -13,6 +13,7 @@ Requirements * 10.8 * 10.8.1 * 10.9 +* 10.9.1 ### Supported ArcGIS software @@ -30,8 +31,12 @@ Requirements * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 -* Ubuntu 14.04, 16.04, 18.04 -* Rhel 6.5, 7.0 +* Windows Server 2022 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 ### Dependencies @@ -51,7 +56,7 @@ Attributes #### General -* `node['arcgis']['version']` = ArcGIS version. Default value is `10.8.1`. +* `node['arcgis']['version']` = ArcGIS version. Default value is `10.9.1`. * `node['arcgis']['run_as_user']` = Account used to run ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store. Default account name is `arcgis`. * `node['arcgis']['run_as_password']` = Password for the account used to run ArcGIS Server, Portal for ArcGIS, and ArcGIS Data Store. Default value is`Pa$$w0rdPa$$w0rd`. @@ -125,6 +130,7 @@ Portal for ArcGIS, and ArcGIS Data Store. Default value is`Pa$$w0rdPa$$w0rd`. * `node['arcgis']['server']['allowed_admin_access_ips']` = A comma separated list of client machine IP addresses that are allowed access to ArcGIS Server. `''`. * `node['arcgis']['server']['ports]` = Ports opened in Windows firewall for ArcGIS Server. Default ports are `1098,4000-4004,6006,6080,6099,6443`. * `node['arcgis']['server']['geoanalytics_ports]` = Ports opened in Windows firewall for ArcGIS GeoAnalytics Server. Default ports are `2181,2182,2190,7077,12181,12182,12190,56540-56545`. +* `node['arcgis']['server']['pull_license]` = If set to `true`, server_node recipe pulls ArcGIS Server license from other server machines in the site. The default value is `false`. #### Web Adaptor @@ -397,6 +403,10 @@ Installs ArcGIS Server, Portal for ArcGIS, ArcGIS Data Store, and ArcGIS Web Ada Uninstalls ArcGIS Server, Portal for ArcGIS, ArcGIS Data Store, and ArcGIS Web Adaptors for server and portal. +### arcgis-enterprise::unfederate_server + +Unfederates server from Portal for ArcGIS. + ### arcgis-enterprise::unregister_machine Unregisters the local server machine from the ArcGIS Server site. diff --git a/cookbooks/arcgis-enterprise/attributes/datastore.rb b/cookbooks/arcgis-enterprise/attributes/datastore.rb index 4f5cdff..497e5b0 100644 --- a/cookbooks/arcgis-enterprise/attributes/datastore.rb +++ b/cookbooks/arcgis-enterprise/attributes/datastore.rb @@ -47,6 +47,10 @@ data_store['local_backup_dir'] = 'C:\\arcgisbackup' case node['arcgis']['version'] + when '10.9.1' + data_store['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_DataStore_Windows_1091_180054.exe').gsub('/', '\\') + data_store['product_code'] = '{30BB3697-7815-406B-8F0C-EAAFB723AA97}' when '10.9' data_store['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_DataStore_Windows_109_177788.exe').gsub('/', '\\') @@ -106,6 +110,9 @@ data_store['lp-setup'] = node['arcgis']['data_store']['setup'] case node['arcgis']['version'] + when '10.9.1' + data_store['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_DataStore_Linux_1091_180204.tar.gz') when '10.9' data_store['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_DataStore_Linux_109_177887.tar.gz') diff --git a/cookbooks/arcgis-enterprise/attributes/default.rb b/cookbooks/arcgis-enterprise/attributes/default.rb index 4680ce8..d6d1040 100644 --- a/cookbooks/arcgis-enterprise/attributes/default.rb +++ b/cookbooks/arcgis-enterprise/attributes/default.rb @@ -27,7 +27,7 @@ default['arcgis']['run_as_msa'] = false -default['arcgis']['version'] = '10.9' +default['arcgis']['version'] = '10.9.1' default['arcgis']['cache_authorization_files'] = false default['arcgis']['configure_windows_firewall'] = false @@ -53,7 +53,7 @@ else # node['platform'] == 'linux' default['arcgis']['packages'] = case node['platform'] - when 'redhat', 'centos', 'amazon' + when 'redhat', 'centos', 'amazon', 'oracle' ['gettext'] when 'suse' ['gettext-runtime'] diff --git a/cookbooks/arcgis-enterprise/attributes/portal.rb b/cookbooks/arcgis-enterprise/attributes/portal.rb index d3fba94..91c5425 100644 --- a/cookbooks/arcgis-enterprise/attributes/portal.rb +++ b/cookbooks/arcgis-enterprise/attributes/portal.rb @@ -105,6 +105,10 @@ portal['data_dir'] = 'C:\\arcgisportal' case node['arcgis']['version'] + when '10.9.1' + portal['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'Portal_for_ArcGIS_Windows_1091_180052.exe').gsub('/', '\\') + portal['product_code'] = '{B5C5195E-2446-45F9-B49E-CC0E1C358E7C}' when '10.9' portal['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Portal_for_ArcGIS_Windows_109_177786.exe').gsub('/', '\\') @@ -194,6 +198,9 @@ portal['lp-setup'] = node['arcgis']['server']['setup'] case node['arcgis']['version'] + when '10.9.1' + portal['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'Portal_for_ArcGIS_Linux_1091_180199.tar.gz') when '10.9' portal['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Portal_for_ArcGIS_Linux_109_177885.tar.gz') diff --git a/cookbooks/arcgis-enterprise/attributes/server.rb b/cookbooks/arcgis-enterprise/attributes/server.rb index 5646c62..857ed6f 100644 --- a/cookbooks/arcgis-enterprise/attributes/server.rb +++ b/cookbooks/arcgis-enterprise/attributes/server.rb @@ -70,6 +70,7 @@ server['configure_autostart'] = true server['install_system_requirements'] = true server['use_join_site_tool'] = false + server['pull_license'] = false server['soc_max_heap_size'] = 64 server['protocol'] = 'HTTPS' server['authentication_mode'] = 'ARCGIS_TOKEN' @@ -124,6 +125,12 @@ server['local_directories_root'] = 'C:\\arcgisserver' case node['arcgis']['version'] + when '10.9.1' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Server_Windows_1091_180041.exe').gsub('/', '\\') + server['product_code'] = '{E4A5FD24-5C61-4846-B084-C7AD4BB1CF19}' + default['arcgis']['python']['runtime_environment'] = File.join(node['arcgis']['python']['install_dir'], + "ArcGISx6410.9").gsub('/', '\\') when '10.9' server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Server_Windows_109_177775.exe').gsub('/', '\\') @@ -242,6 +249,9 @@ server['lp-setup'] = node['arcgis']['server']['setup'] case node['arcgis']['version'] + when '10.9.1' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Server_Linux_1091_180182.tar.gz') when '10.9' server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Server_Linux_109_177864.tar.gz') diff --git a/cookbooks/arcgis-enterprise/attributes/webadaptor.rb b/cookbooks/arcgis-enterprise/attributes/webadaptor.rb index 9f7b18e..5c2f5bd 100644 --- a/cookbooks/arcgis-enterprise/attributes/webadaptor.rb +++ b/cookbooks/arcgis-enterprise/attributes/webadaptor.rb @@ -21,8 +21,7 @@ web_adaptor['admin_access'] = false web_adaptor['install_system_requirements'] = true web_adaptor['setup_archive'] = '' - web_adaptor['product_code'] = '' - web_adaptor['product_code2'] = '' + web_adaptor['product_codes'] = [] web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\Tools\\ConfigureWebAdaptor.exe' case node['platform'] @@ -34,101 +33,253 @@ web_adaptor['install_dir'] = '' case node['arcgis']['version'] + when '10.9.1' + web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Web_Adaptor_for_Microsoft_IIS_1091_180055.exe').gsub('/', '\\') + web_adaptor['product_codes'] = [ + '{BC399DA9-62A6-4978-9B75-32F46D3737F7}', '{F48C3ABF-AF5F-4326-9876-E748DB244DB7}', + '{AC4AD5BF-E0B4-4EE6-838E-93EE66D986EF}', '{F96ECEFD-2015-4275-B15D-363F53407390}', + '{21B1638E-47E7-4147-B739-EB341F99986F}', '{78ABEA6E-4832-4087-B7BB-04746D1E83E8}', + '{A624163D-A110-4959-BD82-98CB7CE6ECBE}', '{7A6E0537-43A2-4925-8F8A-E19715B21392}', + '{4AE1AE3D-2471-4393-B0D9-ECB4D1368EB9}', '{C72DE321-E19C-4737-9513-AE39B1A32953}', + '{49F98C43-955D-4BD8-A585-07BA45D72D0A}', '{5DD68937-54F9-4015-A8DA-4602AFCA8986}', + '{D3C16E17-DAB1-4025-A029-46C7598DCA4A}', '{A2CBD39F-C2DE-4983-9C70-7F108B52F402}', + '{CA174887-E7C6-4DE9-8797-72CBD7FC4B1C}', '{B658575F-82ED-49BE-980C-D4A5089FCA7A}', + '{CBEE526A-29B6-46FE-B7F8-B930A785CFF8}', '{76618450-9F2C-4FCC-9CDA-01A61F9E1953}', + '{17591EF3-221C-4DD1-B773-6C9617925B5F}', '{566920BF-1EF3-4E62-B2BF-029475E35AAB}', + '{4A3B27C6-7CB1-4DE8-BCB1-221B9A23E2E1}' + ] + web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\10.9.1\\Tools\\ConfigureWebAdaptor.exe' when '10.9' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Web_Adaptor_for_Microsoft_IIS_109_177789.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{1FD4759C-6858-42AD-A1DC-6DA0C3B1D28C}' - web_adaptor['product_code2'] = '{E3CBD7DB-60AE-45F3-B281-F9556781E602}' + web_adaptor['product_codes'] = [ + '{1FD4759C-6858-42AD-A1DC-6DA0C3B1D28C}', '{E3CBD7DB-60AE-45F3-B281-F9556781E602}', + '{D712233D-C35F-4A04-A7E8-6D3F00A40544}', '{D5EBAE28-7A5C-41E7-A04F-A1AAFF75C8AC}', + '{2F798220-41AF-4D8D-B425-98095F3DC287}', '{06B94095-F4F9-4434-8358-2E84965B6301}', + '{F2C06411-06A3-4617-8577-7975BD6CC32E}', '{10C21BB5-7E8C-47F6-AB6E-AC62300EA034}', + '{B0D3E289-039D-470C-A9DC-1EB9713B2458}', '{35838A3A-D572-4B2B-8C83-4F8A99324F92}', + '{CEEC063C-D280-490E-B795-373E7DE6266A}', '{4CB4458D-C08A-4DE8-9D0B-45C4E0B849F9}', + '{83605278-1596-4C33-8484-CF2BD4C07587}', '{A2AE04B5-879C-4E0A-B237-D642D8BBE3C7}', + '{38E1E357-BA81-4135-A11A-51FBC9C858DC}', '{947676E2-B5A6-49CB-A5AA-DFEB54D8F064}', + '{8E838EF7-0B7D-4E2A-AF21-4639AC6E5492}', '{37913C5B-A6BA-4F1D-B12F-AD505B91D05A}', + '{1C9C9C3C-CE4D-4F42-8A3B-78ECA6C57B8E}', '{0C000BEA-E770-4138-A707-CCB02E64469A}', + '{D5CEFB24-D0FD-4C73-8685-205222E08C12}' + ] web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\10.9\\Tools\\ConfigureWebAdaptor.exe' when '10.8.1' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Web_Adaptor_for_Microsoft_IIS_1081_175217.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{9695EF78-A2A8-4383-AFBF-627C55FE31DC}' - web_adaptor['product_code2'] = '{56F26E70-2C61-45BC-A624-E100175086F7}' + web_adaptor['product_codes'] = [ + '{9695EF78-A2A8-4383-AFBF-627C55FE31DC}', '{56F26E70-2C61-45BC-A624-E100175086F7}', + '{996B7BC1-3AF4-4633-AF5F-F7BE67448F51}', '{0FB565D2-7C0E-4723-B086-C67443ADE5FD}', + '{246A7BFA-BE78-4031-A36D-F7BB95FFC5E2}', '{7D3E447C-3DB7-488D-AB11-C84A02476FF5}', + '{1B5B7A25-F639-44F8-987B-6CD8F88967BE}', '{4242D730-262E-45E0-8E1F-9060F03452C3}', + '{7CF4D730-F1D6-4D01-B750-D1BA7E55C3CC}', '{179DB6A6-DFE4-4AF1-92D5-2FDDD831A783}', + '{0F67B656-1ED6-4C87-9DB3-DA51ABEE40C0}', '{86F8D877-87EA-4296-9D48-64D7AE94330B}', + '{80FEB406-8086-42FE-B14B-C45A96B36894}', '{5990ACD0-4A80-4115-BFAE-F8DEB498A7C0}', + '{12E78447-5AD7-41DB-82E5-BEDAAE7242C0}', '{25A1ECD8-4FAA-4271-9586-6FD94549365D}', + '{221CCAE0-DA79-4C5E-ABCA-396E827334B1}', '{508FBAA8-FD44-4998-B797-1666BD41D804}', + '{23EB5093-17EE-45A0-AE9F-C96B6456C15F}', '{BEB8559D-6843-4EED-A2ED-7BA9325EF482}', + '{A12D63AE-3DE9-45A0-8799-F2BFF29A1665}' + ] web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\10.8.1\\Tools\\ConfigureWebAdaptor.exe' when '10.8' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_108_172749.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{D6059C27-7199-4A94-806B-6C40EFD02828}' - web_adaptor['product_code2'] = '{E77ED9CA-7DC8-45FC-A8BB-57AD2096EF8A}' + web_adaptor['product_codes'] = [ + '{D6059C27-7199-4A94-806B-6C40EFD02828}', '{E77ED9CA-7DC8-45FC-A8BB-57AD2096EF8A}', + '{068CA630-558A-4C4A-983F-ECF5F8183FC9}', '{F168EBD1-CEDA-469B-89E4-E79C85253CB6}', + '{96229607-EC9D-4805-AF94-E1AC47676586}', '{D89375FD-6CAC-4204-8761-22F51B39E6A1}', + '{BABA485F-681E-4B5D-95EF-54CC738F4A0C}', '{AEFE7DEE-1EEE-4F99-BCA7-2193B86C7058}', + '{FC4B3333-7AEB-46C6-AD90-E071A18D653F}', '{119C0DB0-02B8-442C-B3F5-999D99C9D42F}', + '{89946E15-3E27-4F13-946F-30205F18D34B}', '{5B21D9CD-DDC8-4768-88F6-3C0633E7B97E}', + '{C0752042-FAAC-4A94-B5A4-918BE46B7595}', '{751ED05E-63BF-407C-9039-C72F33CC73D4}', + '{720EDDD5-B0FD-4E53-8F80-0F328EA8ABE0}', '{5FBFC270-1AEE-4E41-B7A2-47F7C742EF95}', + '{A46D3ECC-39D2-459C-9BC3-1C780CA5BCF1}', '{CAE80A6F-8046-47CE-B3F6-D2ACEDDDA99A}', + '{0B5C6775-B1D2-4D41-B233-FC2CDC913FEE}', '{278663A9-7CA3-40D5-84EA-CA7A9CABACB6}', + '{9452D085-0F4F-4869-B8B4-D660B4DD8692}' + ] web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\10.8\\Tools\\ConfigureWebAdaptor.exe' when '10.7.1' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_1071_169690.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{5ECEF84F-592C-47D1-B7C5-9F3D7E2AB7CE}' - web_adaptor['product_code2'] = '{5F1D01EA-296E-4226-A704-6A90E2916782}' + web_adaptor['product_codes'] = ['{5ECEF84F-592C-47D1-B7C5-9F3D7E2AB7CE}', '{5F1D01EA-296E-4226-A704-6A90E2916782}'] web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\10.7.1\\Tools\\ConfigureWebAdaptor.exe' when '10.7' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_107_167634.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{F343B520-F769-4D93-86D2-663168AC6975}' - web_adaptor['product_code2'] = '{58A76431-E1A9-4D11-BB89-0D12C6E77C78}' + web_adaptor['product_codes'] = ['{F343B520-F769-4D93-86D2-663168AC6975}', '{58A76431-E1A9-4D11-BB89-0D12C6E77C78}'] web_adaptor['config_web_adaptor_exe'] = '\\ArcGIS\\WebAdaptor\\IIS\\10.7\\Tools\\ConfigureWebAdaptor.exe' when '10.6.1' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_1061_163981.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{1B4E7470-72F4-4169-92B9-EF1BDF8AE4AF}' - web_adaptor['product_code2'] = '{3FA8B44E-E0E3-4245-A662-6B81E1E75048}' + web_adaptor['product_codes'] = ['{1B4E7470-72F4-4169-92B9-EF1BDF8AE4AF}', '{3FA8B44E-E0E3-4245-A662-6B81E1E75048}'] Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' when '10.6' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_106_161833.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{4FB9D475-9A23-478D-B9F7-05EBA2073FC7}' - web_adaptor['product_code2'] = '{38DBD944-7F0E-48EB-9DCB-98A0567FB062}' + web_adaptor['product_codes'] = ['{4FB9D475-9A23-478D-B9F7-05EBA2073FC7}', '{38DBD944-7F0E-48EB-9DCB-98A0567FB062}'] Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' when '10.5.1' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_1051_156367.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{0A9DA130-E764-485F-8C1A-AD78B04AA7A4}' - web_adaptor['product_code2'] = '{B8A6A873-ED78-47CE-A9B4-AB3192C47604}' + web_adaptor['product_codes'] = ['{0A9DA130-E764-485F-8C1A-AD78B04AA7A4}', '{B8A6A873-ED78-47CE-A9B4-AB3192C47604}'] Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' when '10.5' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_105_154007.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{87B4BD93-A5E5-469E-9224-8A289C6B2F10}' - web_adaptor['product_code2'] = '{604CF558-B7E1-4271-8543-75E260080DFA}' + web_adaptor['product_codes'] = ['{87B4BD93-A5E5-469E-9224-8A289C6B2F10}', '{604CF558-B7E1-4271-8543-75E260080DFA}'] Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' when '10.4.1' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_1041_151933.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{F53FEE2B-54DD-4A6F-8545-6865F4FBF6DC}' - web_adaptor['product_code2'] = '{475ACDE5-D140-4F10-9006-C804CA93D2EF}' + web_adaptor['product_codes'] = ['{F53FEE2B-54DD-4A6F-8545-6865F4FBF6DC}', '{475ACDE5-D140-4F10-9006-C804CA93D2EF}'] Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' when '10.4' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Web_Adaptor_for_Microsoft_IIS_104_149435.exe').gsub('/', '\\') - web_adaptor['product_code'] = '{B83D9E06-B57C-4B26-BF7A-004BE10AB2D5}' - web_adaptor['product_code2'] = '{E2C783F3-6F85-4B49-BFCD-6D6A57A2CFCE}' + web_adaptor['product_codes'] = ['{B83D9E06-B57C-4B26-BF7A-004BE10AB2D5}', '{E2C783F3-6F85-4B49-BFCD-6D6A57A2CFCE}'] Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' else Chef::Log.warn 'Unsupported ArcGIS Web Adaptor version' end - - # Product codes used to uninstall ArcGIS Web Adaptor. - # The list includes the first two product codes form each supported ArcGIS version. - web_adaptor['product_codes'] = [ - '{1FD4759C-6858-42AD-A1DC-6DA0C3B1D28C}', - '{E3CBD7DB-60AE-45F3-B281-F9556781E602}', - '{B83D9E06-B57C-4B26-BF7A-004BE10AB2D5}', - '{E2C783F3-6F85-4B49-BFCD-6D6A57A2CFCE}', - '{F53FEE2B-54DD-4A6F-8545-6865F4FBF6DC}', - '{475ACDE5-D140-4F10-9006-C804CA93D2EF}', - '{87B4BD93-A5E5-469E-9224-8A289C6B2F10}', - '{604CF558-B7E1-4271-8543-75E260080DFA}', - '{0A9DA130-E764-485F-8C1A-AD78B04AA7A4}', - '{B8A6A873-ED78-47CE-A9B4-AB3192C47604}', - '{4FB9D475-9A23-478D-B9F7-05EBA2073FC7}', - '{38DBD944-7F0E-48EB-9DCB-98A0567FB062}', - '{1B4E7470-72F4-4169-92B9-EF1BDF8AE4AF}', - '{3FA8B44E-E0E3-4245-A662-6B81E1E75048}', - '{F343B520-F769-4D93-86D2-663168AC6975}', - '{58A76431-E1A9-4D11-BB89-0D12C6E77C78}', - '{5ECEF84F-592C-47D1-B7C5-9F3D7E2AB7CE}', - '{5F1D01EA-296E-4226-A704-6A90E2916782}', - '{D6059C27-7199-4A94-806B-6C40EFD02828}', - '{E77ED9CA-7DC8-45FC-A8BB-57AD2096EF8A}', - '{9695EF78-A2A8-4383-AFBF-627C55FE31DC}', - '{56F26E70-2C61-45BC-A624-E100175086F7}' + + # Product codes used to uninstall ArcGIS Web Adaptor during upgrades. + # The list includes the first two-four product codes form each supported ArcGIS version. + web_adaptor['all_product_codes'] = [ + '{BC399DA9-62A6-4978-9B75-32F46D3737F7}', '{F48C3ABF-AF5F-4326-9876-E748DB244DB7}', # 10.9.1 + '{AC4AD5BF-E0B4-4EE6-838E-93EE66D986EF}', '{F96ECEFD-2015-4275-B15D-363F53407390}', + '{21B1638E-47E7-4147-B739-EB341F99986F}', '{78ABEA6E-4832-4087-B7BB-04746D1E83E8}', + '{A624163D-A110-4959-BD82-98CB7CE6ECBE}', '{7A6E0537-43A2-4925-8F8A-E19715B21392}', + '{4AE1AE3D-2471-4393-B0D9-ECB4D1368EB9}', '{C72DE321-E19C-4737-9513-AE39B1A32953}', + '{49F98C43-955D-4BD8-A585-07BA45D72D0A}', '{5DD68937-54F9-4015-A8DA-4602AFCA8986}', + '{D3C16E17-DAB1-4025-A029-46C7598DCA4A}', '{A2CBD39F-C2DE-4983-9C70-7F108B52F402}', + '{CA174887-E7C6-4DE9-8797-72CBD7FC4B1C}', '{B658575F-82ED-49BE-980C-D4A5089FCA7A}', + '{CBEE526A-29B6-46FE-B7F8-B930A785CFF8}', '{76618450-9F2C-4FCC-9CDA-01A61F9E1953}', + '{17591EF3-221C-4DD1-B773-6C9617925B5F}', '{566920BF-1EF3-4E62-B2BF-029475E35AAB}', + '{4A3B27C6-7CB1-4DE8-BCB1-221B9A23E2E1}', + '{1FD4759C-6858-42AD-A1DC-6DA0C3B1D28C}', '{E3CBD7DB-60AE-45F3-B281-F9556781E602}', # 10.9 + '{D712233D-C35F-4A04-A7E8-6D3F00A40544}', '{D5EBAE28-7A5C-41E7-A04F-A1AAFF75C8AC}', + '{2F798220-41AF-4D8D-B425-98095F3DC287}', '{06B94095-F4F9-4434-8358-2E84965B6301}', + '{F2C06411-06A3-4617-8577-7975BD6CC32E}', '{10C21BB5-7E8C-47F6-AB6E-AC62300EA034}', + '{B0D3E289-039D-470C-A9DC-1EB9713B2458}', '{35838A3A-D572-4B2B-8C83-4F8A99324F92}', + '{CEEC063C-D280-490E-B795-373E7DE6266A}', '{4CB4458D-C08A-4DE8-9D0B-45C4E0B849F9}', + '{83605278-1596-4C33-8484-CF2BD4C07587}', '{A2AE04B5-879C-4E0A-B237-D642D8BBE3C7}', + '{38E1E357-BA81-4135-A11A-51FBC9C858DC}', '{947676E2-B5A6-49CB-A5AA-DFEB54D8F064}', + '{8E838EF7-0B7D-4E2A-AF21-4639AC6E5492}', '{37913C5B-A6BA-4F1D-B12F-AD505B91D05A}', + '{1C9C9C3C-CE4D-4F42-8A3B-78ECA6C57B8E}', '{0C000BEA-E770-4138-A707-CCB02E64469A}', + '{D5CEFB24-D0FD-4C73-8685-205222E08C12}', + '{9695EF78-A2A8-4383-AFBF-627C55FE31DC}', '{56F26E70-2C61-45BC-A624-E100175086F7}', # 10.8.1 + '{996B7BC1-3AF4-4633-AF5F-F7BE67448F51}', '{0FB565D2-7C0E-4723-B086-C67443ADE5FD}', + '{246A7BFA-BE78-4031-A36D-F7BB95FFC5E2}', '{7D3E447C-3DB7-488D-AB11-C84A02476FF5}', + '{1B5B7A25-F639-44F8-987B-6CD8F88967BE}', '{4242D730-262E-45E0-8E1F-9060F03452C3}', + '{7CF4D730-F1D6-4D01-B750-D1BA7E55C3CC}', '{179DB6A6-DFE4-4AF1-92D5-2FDDD831A783}', + '{0F67B656-1ED6-4C87-9DB3-DA51ABEE40C0}', '{86F8D877-87EA-4296-9D48-64D7AE94330B}', + '{80FEB406-8086-42FE-B14B-C45A96B36894}', '{5990ACD0-4A80-4115-BFAE-F8DEB498A7C0}', + '{12E78447-5AD7-41DB-82E5-BEDAAE7242C0}', '{25A1ECD8-4FAA-4271-9586-6FD94549365D}', + '{221CCAE0-DA79-4C5E-ABCA-396E827334B1}', '{508FBAA8-FD44-4998-B797-1666BD41D804}', + '{23EB5093-17EE-45A0-AE9F-C96B6456C15F}', '{BEB8559D-6843-4EED-A2ED-7BA9325EF482}', + '{A12D63AE-3DE9-45A0-8799-F2BFF29A1665}', + '{D6059C27-7199-4A94-806B-6C40EFD02828}', '{E77ED9CA-7DC8-45FC-A8BB-57AD2096EF8A}', # 10.8 + '{068CA630-558A-4C4A-983F-ECF5F8183FC9}', '{F168EBD1-CEDA-469B-89E4-E79C85253CB6}', + '{96229607-EC9D-4805-AF94-E1AC47676586}', '{D89375FD-6CAC-4204-8761-22F51B39E6A1}', + '{BABA485F-681E-4B5D-95EF-54CC738F4A0C}', '{AEFE7DEE-1EEE-4F99-BCA7-2193B86C7058}', + '{FC4B3333-7AEB-46C6-AD90-E071A18D653F}', '{119C0DB0-02B8-442C-B3F5-999D99C9D42F}', + '{89946E15-3E27-4F13-946F-30205F18D34B}', '{5B21D9CD-DDC8-4768-88F6-3C0633E7B97E}', + '{C0752042-FAAC-4A94-B5A4-918BE46B7595}', '{751ED05E-63BF-407C-9039-C72F33CC73D4}', + '{720EDDD5-B0FD-4E53-8F80-0F328EA8ABE0}', '{5FBFC270-1AEE-4E41-B7A2-47F7C742EF95}', + '{A46D3ECC-39D2-459C-9BC3-1C780CA5BCF1}', '{CAE80A6F-8046-47CE-B3F6-D2ACEDDDA99A}', + '{0B5C6775-B1D2-4D41-B233-FC2CDC913FEE}', '{278663A9-7CA3-40D5-84EA-CA7A9CABACB6}', + '{9452D085-0F4F-4869-B8B4-D660B4DD8692}', + '{5ECEF84F-592C-47D1-B7C5-9F3D7E2AB7CE}', '{5F1D01EA-296E-4226-A704-6A90E2916782}', # 10.7.1 + '{7368D3C8-F13B-4786-AE38-B51952F43867}', '{2C838C64-DF81-4A64-8618-072AD30D51C1}', + '{D4054E1B-C75C-4F69-BBB7-DBE77250F345}', '{C2C75F23-3E15-43E4-A902-673569F3F0DF}', + '{F633A04F-D08B-4EBF-B746-00ADA0334CE3}', '{7D13D8C5-751F-44B1-BEAE-C9EB8E13FDF8}', + '{ACAA0479-B7C5-44A1-B5FD-34A018EA2137}', '{E0343824-0C94-4A6C-96F7-AA5E1D8F8437}', + '{8D108926-DC71-493D-B2C9-8BAE04DD9047}', '{A19DF635-25F0-4371-AC42-A4EECAF8BD75}', + '{78F54FC8-C530-4D7E-91CC-48B9BC364535}', '{CEFB5C80-707B-471A-B8BF-5EC333F1A8B2}', + '{BE892BB6-842B-4A18-A0B7-E89C5AAAD1A3}', '{A11006D2-3C1A-4D56-917D-4417D3341ADD}', + '{763E3951-E827-492B-8E86-F526F251083E}', '{57C506AE-3BB7-4936-9154-7A2744735456}', + '{4E2BA3D3-EFD2-4FCE-91C0-1D15457F8F08}', '{1BBB3C99-8EF5-4225-B5DD-799E50582BF7}', + '{F6E99E06-B303-4965-9566-2F21EE7FD130}', + '{F343B520-F769-4D93-86D2-663168AC6975}', '{58A76431-E1A9-4D11-BB89-0D12C6E77C78}', # 10.7 + '{E7B9D4A3-4E55-49F8-B34C-CA8745FFD894}', '{D89709DB-8B6D-431A-95D4-FFEB69C474D5}', + '{858283F5-B9E9-4688-BF3C-BD3F3FD169D8}', '{DE2BA579-D2F0-4068-9C52-8AC24022F13D}', + '{48405A7D-CFA4-4F6F-BB8C-B36A22E99B07}', '{BEC99E10-7AB1-4B90-9C81-D2CBFCAD4239}', + '{C0C178B9-EBC6-46C5-B009-186661E9AEA3}', '{0D5F9D8E-B221-4C74-87C3-13050F906A94}', + '{52EC0A7A-9BBA-4F47-9C52-2E1D1D09D9B4}', '{6CF9C794-AEC2-45EF-A11A-83938F01A1E9}', + '{F36AF2F5-2E37-409B-9E71-D2D2B1D4A22F}', '{4F54A93E-2F0F-4515-99AA-83BF88961D5F}', + '{A04ACEF7-4E22-4F4F-8608-9FD335572C6F}', '{0D562427-2AB5-46C6-998E-4C33D642DE10}', + '{8C15E459-D24F-46E0-B945-CD4812A040AC}', '{24821676-BD09-49CA-95B4-591BBE86118A}', + '{3C4D06FD-8194-4062-AB04-E87003CBE908}', '{71044157-41F9-4AEC-B6B1-834FBA256135}', + '{C4ECCD46-EC43-4C44-8147-916649A2BA1B}', + '{1B4E7470-72F4-4169-92B9-EF1BDF8AE4AF}', '{3FA8B44E-E0E3-4245-A662-6B81E1E75048}', # 10.6.1 + '{8D6EE2C0-A393-49CD-A048-1D9FD435D7B8}', '{6C05375F-78A5-4DF7-A157-C2A6E0D7BAD2}', + '{1F1EEC9F-80D5-48DD-B8BC-EB3D0404D9AD}', '{2CA5FC7F-1165-4870-9C16-004ACC848435}', + '{E23D8BB8-0FEB-4316-8E09-80772FD1B5E0}', '{C67E73AB-8278-49C9-9CA8-A714E20B8124}', + '{E527C0BD-E026-46D8-9461-2A7EEFBDA35A}', '{D5DF4279-E3FF-4261-AB85-93F8BDE90D8D}', + '{8D439456-493A-4B48-A542-492AABD9CF7D}', '{D61CE1AE-2DB8-4D46-AC7F-3BEAB7C29A59}', + '{9B07A4CE-58C6-4689-B37B-EFF565712CF2}', '{C97C2CEF-F939-496E-8CB7-8756856CBBC6}', + '{59079961-A0BA-48DD-9B07-45437FCBC42A}', '{5372DAF1-7EB6-4822-843E-0B2F7A7B052B}', + '{D807F4E9-0F87-4B3C-8F93-456251226187}', '{7BEB71AD-3958-41FB-8EC3-64DBE4775760}', + '{286D4CB5-777E-4AA1-B2EB-D6A3A4212107}', '{37F3B528-915F-4528-949B-F199E4B3B4AA}', + '{6FEB4C76-14AC-4A70-BE45-6CBAED529CAF}', + '{4FB9D475-9A23-478D-B9F7-05EBA2073FC7}', '{38DBD944-7F0E-48EB-9DCB-98A0567FB062}', # 10.6 + '{8214B9D8-49D9-43DB-8632-AE2BAD4B21E9}', '{B3FD1FE3-4851-4657-9754-73876D4CB265}', + '{88CDE5E9-23B8-4077-9E69-9CD3715BE805}', '{E7630CBC-96DE-4665-9C2A-D682CFFD5B0E}', + '{E2601F84-D2E5-4DD4-B0EC-6AED75CB77D9}', '{75FB755F-AF36-484E-98A8-FADA56574D25}', + '{AA32D01D-27CD-4842-90CF-F22C1BD6309B}', '{CF126207-4C89-44AA-8783-9BAA2BA5F106}', + '{9F8694BE-613F-4195-AA42-B849E84D059A}', '{2C3BE00F-57BE-4D0B-81BC-3378D823CF0E}', + '{EAC54B65-D6BC-41DC-8C82-5E99D7FD4271}', '{76C17CB6-106C-41F8-89BA-41C086E69238}', + '{4493EB64-CAE0-439F-8FA6-897677D5A6C8}', '{0C59A27D-B4B6-4A23-8873-897B870F6E2B}', + '{B46B6E63-D8E1-4EA4-9A9B-D98DFAA6644D}', '{89E6330E-6139-4F4B-BA9F-ACD59065230D}', + '{238E647E-53DF-4B8B-B436-ADA5004065DE}', '{30EF8944-904A-45D3-96D4-7DF3B0FE01D5}', + '{06012CC0-5C12-4499-B5CC-99E9D547A2FD}', + '{0A9DA130-E764-485F-8C1A-AD78B04AA7A4}', '{B8A6A873-ED78-47CE-A9B4-AB3192C47604}', # 10.5.1 + '{7DEAE915-5FAC-4534-853D-B4FC968DBDEB}', '{AC10F3CF-A5C1-44B0-8271-27F26D323D14}', + '{5F748B0C-3FB6-42FF-A82D-C1573D3C1469}', '{428DE39D-BF23-42B5-A70E-F5DD5DD21C2C}', + '{98B1DE9B-0ECF-4CAA-A29A-B89B2E8F38F1}', '{4876508B-31CF-4328-BE11-FFF1B07A3923}', + '{D803A89F-4762-4EFD-8219-55F4C3047EDE}', '{4A5F404B-391F-4D13-9EE4-5B9AC434FD5A}', + '{99FFFA13-2A40-4AA4-AAC1-9891F2515DB1}', '{2B04DE60-3E79-4B44-9A93-40CAC72DE2FB}', + '{D595C9E2-BBA0-4708-A871-1166CD0CFB61}', '{50825C57-5040-436D-B64C-A53FFB897E9D}', + '{5D750A11-BC80-45CE-B0DD-33BA8A5D8224}', '{60390703-9077-4DDE-8BB1-A025AB0FE75B}', + '{BF75DC6C-F1A5-4A3C-A6A6-76BCB5DB5881}', '{96B29B2F-888A-4C2B-B8C3-97E9A7849F2F}', + '{7FDD9158-2E93-4E12-A249-CD9D5445C527}', '{A868CBAC-D9A2-41A7-8A5B-069AB63FEC7B}', + '{83462AE4-27BB-4B63-9E3E-F435BD03BB12}', + '{87B4BD93-A5E5-469E-9224-8A289C6B2F10}', '{604CF558-B7E1-4271-8543-75E260080DFA}', # 10.5 + '{9666ABD8-8485-4383-B3DD-4D1598F582A3}', '{58264BBA-5F61-41D9-839A-00B6C2C66A63}', + '{5988C905-772F-4F62-8339-1796C38674B7}', '{ADD5FF4F-EB57-4460-BD33-D55562AE6FA7}', + '{3294151B-CA4C-4A89-BBC7-DCE521D8A327}', '{EF65064A-96C8-4EA1-B76D-B9BCC97EF76A}', + '{6B2FA0A8-6F2C-4359-B7A4-D2F9FD63EE97}', '{ACF59C57-A613-44CC-A927-1D8C2B280516}', + '{2E5E4CDE-9964-4B40-A1F1-843C62AC789E}', '{2901A5D3-C16D-4993-A306-86261B0430B1}', + '{AC910B51-6077-4055-B042-D72CA0D23D69}', '{8F36D583-35F0-43F2-8F8F-5B696F87183A}', + '{37C2CAE2-4A81-4289-B318-93D63C63AA47}', '{CC345B69-1E26-4C56-B640-92BCBADBDF06}', + '{F0FAE80D-0C51-4D9D-A79B-057396A2456D}', '{5BA355D1-D9B6-4CA0-B1C6-694377084464}', + '{25118D44-AD2D-423F-85F0-5D730A2691B7}', '{D4855344-CEE0-47A3-BD50-D7E2A674D04E}', + '{9CD66AA3-F0DA-46CC-A5DD-0BB5B23499AD}', + '{F53FEE2B-54DD-4A6F-8545-6865F4FBF6DC}', '{475ACDE5-D140-4F10-9006-C804CA93D2EF}', # 10.4.1 + '{0547D7D8-7188-4103-9387-A99FE15215AF}', '{25DFAFFF-07CE-42A2-B157-541D7980A3DA}', + '{771998A8-A440-4F5F-B55A-0FE2C594208B}', '{C120DC32-DBEA-4CB1-94E4-F50A7EE09F5C}', + '{3294151B-CA4C-4A89-BBC7-DCE521D8A327}', '{E04FB941-248D-4806-9871-04DB306EEA91}', + '{66CD667D-440D-4CF1-9ECB-C6C77A7A0520}', '{7938463B-E744-4332-8617-39E91B10FC15}', + '{C22C2AF5-D58E-4A4D-85DF-E3A38C83F37A}', '{9AF62D15-755B-43DE-878A-DBA23D33B28A}', + '{D4F22207-C5FA-49B0-9466-9E4D37435882}', '{C8ADE9B2-3BC8-4417-97D0-785BA0CD86D9}', + '{C85A40C5-00B9-4CDE-9299-397BFD5A2EAF}', '{E0BD73FB-4028-4A5D-9A24-9FA0BD614D4B}', + '{83CF76EC-F959-46B3-9067-F59B2A846D2F}', '{F7D6BD55-8D07-4A57-8284-ADACE0F567D8}', + '{C56A0E47-D4E1-4762-9BAF-07A19A154EE6}', '{09AC608B-7CE4-4280-9F4E-F2988A58428D}', + '{5695B2B6-A25E-4013-B5F8-30686FDDFE0D}', + '{B83D9E06-B57C-4B26-BF7A-004BE10AB2D5}', '{E2C783F3-6F85-4B49-BFCD-6D6A57A2CFCE}', # 10.4 + '{901578F9-BC82-498D-A008-EC3F53F6C943}', '{E3849BEC-6CAF-463F-8EFA-169116A32554}', + '{EE889E4F-85C7-4B8A-9DAA-5103C9E14FD6}', '{89D96D88-CC2F-4E9B-84DD-5C976A4741EE}', + '{0913DB77-F27B-4FDE-9F51-01BB97BBEBB9}', '{99B6A03C-D208-4E2E-B374-BA7972334396}', + '{A0F3D072-0CD1-43D7-AFDA-8F47B15C217C}', '{0FE26871-21C3-4561-B52E-A8FED5C8E821}', + '{1D1F3C15-F368-44AF-9728-6CF031D478AF}', '{CE5EC52D-B54D-4381-9F6E-2C08F7721620}', + '{E71AEC5B-25F0-47E5-B52C-847A1B779E48}', '{5DA1F056-A3F1-46D5-8F2E-74E72F85B51B}', + '{1EB3D37A-902A-43E2-9EAA-1B43BA10C369}', '{839FFEB7-76B5-4CBB-A05E-E2276FC3421D}', + '{594E1C33-1C6D-49B4-A83F-2A780193B75F}', '{34330B0C-34CD-4DCF-A68D-FDE7A1834659}', + '{42A96EC7-7CA9-4F68-B946-E9BF84713605}', '{A1A8DAE4-B6F9-446F-8F6A-487F1E07A434}', + '{3BF277C6-6A88-4F72-A08C-54F1E45F44E5}' ] else # node['platform'] == 'linux' web_adaptor['setup'] = ::File.join(node['arcgis']['repository']['setups'], @@ -137,6 +288,9 @@ web_adaptor['lp-setup'] = node['arcgis']['web_adaptor']['setup'] case node['arcgis']['version'] + when '10.9.1' + web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Web_Adaptor_Java_Linux_1091_180206.tar.gz') when '10.9' web_adaptor['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Web_Adaptor_Java_Linux_109_177888.tar.gz') diff --git a/cookbooks/arcgis-enterprise/attributes/webstyles.rb b/cookbooks/arcgis-enterprise/attributes/webstyles.rb index 6ac53a8..c263f96 100644 --- a/cookbooks/arcgis-enterprise/attributes/webstyles.rb +++ b/cookbooks/arcgis-enterprise/attributes/webstyles.rb @@ -24,6 +24,10 @@ 'ArcGISWebStyles', 'Setup.exe').tr('/', '\\') case node['arcgis']['version'] + when '10.9.1' + webstyles['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'Portal_for_ArcGIS_Web_Styles_Windows_1091_180053.exe').tr('/', '\\') + webstyles['product_code'] = '{2E63599E-08C2-4401-8FD7-95AAA64EA087}' when '10.9' webstyles['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Portal_for_ArcGIS_Web_Styles_Windows_109_177787.exe').tr('/', '\\') @@ -49,6 +53,10 @@ 'WebStyles', 'WebStyles-Setup.sh') case node['arcgis']['version'] + when '10.9.1' + webstyles['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'Portal_for_ArcGIS_Web_Styles_Linux_1091_180201.tar.gz') + when '10.9' webstyles['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'Portal_for_ArcGIS_Web_Styles_Linux_109_177886.tar.gz') diff --git a/cookbooks/arcgis-enterprise/libraries/datastore_tools.rb b/cookbooks/arcgis-enterprise/libraries/datastore_tools.rb new file mode 100644 index 0000000..69b7355 --- /dev/null +++ b/cookbooks/arcgis-enterprise/libraries/datastore_tools.rb @@ -0,0 +1,261 @@ +# +# Copyright 2021 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. + +require 'json' + +# +# ArcGIS helper classes +# +module ArcGIS + # + # Helper class to invoke ArcGIS Data Store CLI tools. + # + class DataStoreTools + + # Tools execution timeouts + CONFIGURE_SERVICE_ACCOUNT_TIMEOUT = 3600 + DESCRIBE_DATASTORE_TIMEOUT = 600 + CONFIGURE_BACKUP_LOCATION_TIMEOUT = 600 + CONFIGURE_DATASTORE_TIMEOUT = 10800 + PREPARE_UPGRADE_TIMEOUT = 600 + REMOVE_MACHINE_TIMEOUT = 600 + + # Names of properties returned by describedatastore tool + BACKUP_LOCATION = 'Backup location' + + @version = nil + @platform = nil + @tools_dir = nil + @environment = nil + @run_as_user = nil + + def initialize(version, platform, install_dir, install_subdir, run_as_user = nil) + @version = version + @platform = platform + + dir = platform == 'windows' ? install_dir : ::File.join(install_dir, install_subdir) + + @tools_dir = ::File.join(dir, 'tools') + @environment = { 'AGSDATASTORE' => dir } + @run_as_user = run_as_user + end + + def configure_service_account(run_as_user, run_as_password) + if @platform == 'windows' + args = "/username \"#{run_as_user}\" /password \"#{run_as_password.gsub("&", "^&")}\"" + + tool = ::File.join(@tools_dir, 'configureserviceaccount') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => CONFIGURE_SERVICE_ACCOUNT_TIMEOUT, + :environment => @environment) + + cmd.run_command + + Chef::Log.debug('STDOUT < ' + cmd.stdout) + Chef::Log.debug('STDERR < ' + cmd.stderr) + + cmd.error! + end + end + + def last_known_status(data_dir) + tilecache_config_json = ::File.join(data_dir, 'etc', 'tilecache-config.json') + + if ::File.exist?(tilecache_config_json) + config = JSON.parse(File.read(tilecache_config_json)) + return config['localstore.lastknownstatus'] if config.has_key?('localstore.lastknownstatus') + end + + nil + end + + def configure_datastore(stores, server_url, username, password, data_dir, mode = nil) + args = "\"#{server_url}\" \"#{username}\" \"#{password}\" \"#{data_dir}\" --stores #{stores}" + + # Only add --mode parameter for post 10.8.1 tilecache data stores + # if the last known status is not 'Upgrading'. + if !mode.nil? && !mode.empty? && + Gem::Version.new(@version) >= Gem::Version.new('10.8.1') && + stores.downcase.include?('tilecache') && + last_known_status(data_dir) != 'Upgrading' + args += " --mode #{mode}" + end + + if @platform == 'windows' + tool = ::File.join(@tools_dir, 'configuredatastore') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => CONFIGURE_DATASTORE_TIMEOUT, + :environment => @environment) + else + tool = ::File.join(@tools_dir, 'configuredatastore.sh') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => CONFIGURE_DATASTORE_TIMEOUT, + :user => @run_as_user) + end + + cmd.run_command + + Chef::Log.debug('STDOUT < ' + cmd.stdout) + Chef::Log.debug('STDERR < ' + cmd.stderr) + + cmd.error! + end + + def describe_datastore(store) + if @platform == 'windows' + tool = ::File.join(@tools_dir, 'describedatastore') + cmd = Mixlib::ShellOut.new("\"#{tool}\"", + :timeout => DESCRIBE_DATASTORE_TIMEOUT, + :environment => @environment) + else + tool = ::File.join(@tools_dir, 'describedatastore.sh') + cmd = Mixlib::ShellOut.new("\"#{tool}\"", + :timeout => DESCRIBE_DATASTORE_TIMEOUT, + :user => @run_as_user) + end + + cmd.run_command + + Chef::Log.debug('STDOUT < ' + cmd.stdout) + Chef::Log.debug('STDERR < ' + cmd.stderr) + + cmd.error! + + properties = {} + in_store = false + + # Parse the command stdout + cmd.stdout.each_line do |line| + if line.start_with?('Information for ') + in_store = line.include?(display_store_name(store)) + elsif in_store && (line.length > 36) && !line.start_with?('=') + key = line[0..35].delete!('.') + value = line[36..-1].strip + properties[key] = value + end + end + + properties + end + + def backup_location(store) + describe_datastore(store)[BACKUP_LOCATION] + end + + def configure_backup_location(store, backup_location, operation) + current_backup_location = backup_location(store) + + if !current_backup_location.nil? && Utils.same_file?(current_backup_location, backup_location) + Chef::Log.info("#{store} backup location was not changed.") + return + end + + args = "--location \"#{backup_location}\" --operation #{operation} --store #{store} --prompt no" + + if @platform == 'windows' + tool = ::File.join(@tools_dir, 'configurebackuplocation') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => CONFIGURE_BACKUP_LOCATION_TIMEOUT, + :environment => @environment) + else + tool = ::File.join(@tools_dir, 'configurebackuplocation.sh') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => CONFIGURE_BACKUP_LOCATION_TIMEOUT, + :user => @run_as_user) + end + + cmd.run_command + + Chef::Log.debug('STDOUT < ' + cmd.stdout) + Chef::Log.debug('STDERR < ' + cmd.stderr) + + if cmd.error? && cmd.stderr.include?('Operation is not supported under this configuration.') + Chef::Log.debug(cmd.stderr) + + if operation != 'change' # prevent unlimited recursion + configure_backup_location(store, backup_location, 'change') + end + elsif cmd.error? && cmd.stderr.include?('already exists') + # Ignore the error if the backup location already exists. + Chef::Log.debug(cmd.stderr) + else + cmd.error! + end + + Chef::Log.info("#{store} backup location was changed to '#{backup_location}'.") + end + + def prepare_upgrade(store, server_url, username, password, data_dir) + args = "--server-url \"#{server_url}\" --server-admin \"#{username}\" --server-password \"#{password}\" --data-dir \"#{data_dir}\" --store \"#{store}\" --prompt no" + + if @platform == 'windows' + tool = ::File.join(@tools_dir, 'prepareupgrade') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => PREPARE_UPGRADE_TIMEOUT, + :environment => @environment) + else + tool = ::File.join(@tools_dir, 'prepareupgrade.sh') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => PREPARE_UPGRADE_TIMEOUT, + :user => @run_as_user) + end + + cmd.run_command + + Chef::Log.debug('STDOUT < ' + cmd.stdout) + Chef::Log.debug('STDERR < ' + cmd.stderr) + + cmd.error! + end + + def remove_machine(store, hostidentifier, force) + args = "#{hostidentifier} --store #{store} --force #{force} --prompt no" + + if @platform == 'windows' + tool = ::File.join(@tools_dir, 'removemachine') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => REMOVE_MACHINE_TIMEOUT, + :environment => @environment) + else + tool = ::File.join(@tools_dir, 'removemachine.sh') + cmd = Mixlib::ShellOut.new("\"#{tool}\" #{args}", + :timeout => REMOVE_MACHINE_TIMEOUT, + :user => @run_as_user) + end + + cmd.run_command + + Chef::Log.debug('STDOUT < ' + cmd.stdout) + Chef::Log.debug('STDERR < ' + cmd.stderr) + + cmd.error! + end + + private + + def display_store_name(store) + case store.downcase + when 'relational' + 'relational' + when 'tilecache' + 'tile cache' + when 'spatiotemporal' + 'spatiotemporal' + else + 'undefined' + end + end + end +end diff --git a/cookbooks/arcgis-enterprise/libraries/portal_admin_client.rb b/cookbooks/arcgis-enterprise/libraries/portal_admin_client.rb index ea0568d..7193283 100644 --- a/cookbooks/arcgis-enterprise/libraries/portal_admin_client.rb +++ b/cookbooks/arcgis-enterprise/libraries/portal_admin_client.rb @@ -40,12 +40,8 @@ def initialize(portal_url, admin_username, admin_password) @admin_password = admin_password end - def wait_until_available - Utils.wait_until_url_available(@portal_url + '/portaladmin') - end - - def wait_until_unavailable - Utils.wait_until_url_unavailable(@portal_url + '/portaladmin') + def wait_until_available(redirects = 0) + Utils.wait_until_url_available(@portal_url + '/portaladmin', redirects) end def site_exist? @@ -306,7 +302,8 @@ def local_machine_name end end - Socket.gethostname + # None of the portal machines have local IP addresses. Return the first machine name. + machines[0]['machineName'] end # Returns portal admin API URL for SSL certificates. @@ -363,7 +360,7 @@ def ssl_certificate_exist?(cert_alias) validate_response(response) - JSON.parse(response.body)['entryType'] == 'PrivateKeyEntry' + ['PrivateKeyEntry', 'trustedCertEntry'].include?(JSON.parse(response.body)['entryType']) rescue Exception false end @@ -536,6 +533,22 @@ def federate_server(server_url, admin_url, username, password) JSON.parse(response.body)['serverId'] end + def unfederate_server(server_id, force = true) + token = generate_token(@generate_token_url) + + request = Net::HTTP::Post.new(URI.parse(@portal_url + + "/portaladmin/federation/servers/#{server_id}/unfederate").request_uri) + request.add_field('Referer', 'referer') + + request.set_form_data('token' => token, + 'forceUnfederate' => force, + 'f' => 'json') + + response = send_request(request) + + validate_response(response) + end + def update_server(server_id, server_role, function) token = generate_token(@generate_token_url) @@ -555,6 +568,24 @@ def update_server(server_id, server_role, function) JSON.parse(response.body)['serverId'] end + def system_properties + uri = URI.parse(@portal_url + '/portaladmin/system/properties') + + token = generate_token(@generate_token_url) + + uri.query = URI.encode_www_form('token' => token, + 'f' => 'json') + + request = Net::HTTP::Get.new(uri.request_uri) + request.add_field('Referer', 'referer') + + response = send_request(request) + + validate_response(response) + + JSON.parse(response.body) + end + def update_system_properties(system_properties) return if system_properties.empty? diff --git a/cookbooks/arcgis-enterprise/libraries/server_admin_client.rb b/cookbooks/arcgis-enterprise/libraries/server_admin_client.rb index fe9c08c..e3eb2eb 100644 --- a/cookbooks/arcgis-enterprise/libraries/server_admin_client.rb +++ b/cookbooks/arcgis-enterprise/libraries/server_admin_client.rb @@ -46,8 +46,8 @@ def generate_token_url=(generate_token_url) @generate_token_url = generate_token_url end - def wait_until_available - Utils.wait_until_url_available(@server_url + '/admin/?f=json') + def wait_until_available(redirects = 0) + Utils.wait_until_url_available(@server_url + '/admin/?f=json', redirects) end def site_exist? @@ -232,13 +232,14 @@ def create_site(server_directories_root, validate_response(response) end - def join_site(primary_server_url) + def join_site(primary_server_url, pull_license = false) request = Net::HTTP::Post.new(URI.parse( @server_url + '/admin/joinSite').request_uri) request.set_form_data('username' => @admin_username, 'password' => @admin_password, 'adminURL' => primary_server_url + '/admin', + 'pullLicense' => pull_license, 'f' => 'json') response = send_request(request, @server_url) @@ -743,6 +744,23 @@ def delete_service(service_name) validate_response(response) end + def system_properties + request = Net::HTTP::Post.new(URI.parse(@server_url + '/admin/system/properties').request_uri) + + request.add_field('Referer', 'referer') + + token = generate_token() + + request.set_form_data('token' => token, + 'f' => 'json') + + response = send_request(request, @server_url) + + validate_response(response) + + JSON.parse(response.body) + end + def update_system_properties(properties) request = Net::HTTP::Post.new(URI.parse(@server_url + '/admin/system/properties/update').request_uri) diff --git a/cookbooks/arcgis-enterprise/libraries/utils.rb b/cookbooks/arcgis-enterprise/libraries/utils.rb index 8892eb0..0c2778b 100644 --- a/cookbooks/arcgis-enterprise/libraries/utils.rb +++ b/cookbooks/arcgis-enterprise/libraries/utils.rb @@ -29,7 +29,7 @@ module Utils MAX_RETRIES = 100 SLEEP_TIME = 10.0 - def self.url_available?(url) + def self.url_available?(url, redirects = 0) uri = URI.parse(url) http = Net::HTTP.new(uri.host, uri.port) @@ -45,17 +45,33 @@ def self.url_available?(url) request.add_field('Accept-Language', 'en-US') response = http.request(request) + Chef::Log.debug format('%s HTTP response code: %d', url, response.code.to_i) + + if redirects > 0 && response.code.to_i >= 300 && response.code.to_i < 400 + Chef::Log.debug format('Checking availability of redirected URL: %s', response['location']) + return url_available?(response['location'], redirects - 1) + end + return response.code.to_i < 400 rescue Exception => ex + Chef::Log.debug ex.message return false end end - def self.wait_until_url_available(url) + def self.wait_until_url_available(url, redirects = 0) + starting = Process.clock_gettime(Process::CLOCK_MONOTONIC) MAX_RETRIES.times do - break if self.url_available?(url) + if url_available?(url, redirects) + elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - starting + Chef::Log.debug format('URL %s became available after %0.2f seconds.', url, elapsed) + return + end sleep(SLEEP_TIME) end + + elapsed = Process.clock_gettime(Process::CLOCK_MONOTONIC) - starting + Chef::Log.warn format('Util.wait_until_url_available timed out for %s after %0.2f seconds.', url, elapsed) end def self.product_key_exists?(path) @@ -247,4 +263,10 @@ def self.file_key_value_updated?(file, key, value) return ::File.open(file).each_line.any? { |line| line.chomp == "#{key}=#{value}" } end + def self.same_file?(path1, path2) + canonical_path1 = path1.nil? ? nil : path1.gsub('\\', '/').chomp('/') + canonical_path2 = path2.nil? ? nil : path2.gsub('\\', '/').chomp('/') + canonical_path1 == canonical_path2 + end + end diff --git a/cookbooks/arcgis-enterprise/metadata.rb b/cookbooks/arcgis-enterprise/metadata.rb index ae0cfd3..6138c47 100644 --- a/cookbooks/arcgis-enterprise/metadata.rb +++ b/cookbooks/arcgis-enterprise/metadata.rb @@ -4,10 +4,10 @@ license 'Apache 2.0' description 'Installs and configures ArcGIS Enterprise' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-repository', '~> 3.8' depends 'hostsfile', '~> 3.0' depends 'limits', '~> 1.0' depends 'windows', '~> 5.3' @@ -19,6 +19,9 @@ supports 'windows' supports 'ubuntu' supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' recipe 'arcgis-enterprise::clean', 'Deletes local directories created by ArcGIS software' recipe 'arcgis-enterprise::datastore', 'Installs and configures ArcGIS Data Store on primary machine' @@ -61,6 +64,7 @@ recipe 'arcgis-enterprise::stop_server', 'Stops ArcGIS Server on the machine' recipe 'arcgis-enterprise::stop_machine', 'Stops server machine in the ArcGIS Server site' recipe 'arcgis-enterprise::system', 'System requirements' +recipe 'arcgis-enterprise::unfederate_server', 'Unfederates server from Portal for ArcGIS' recipe 'arcgis-enterprise::unregister_machine', 'Unregisters server machine from the ArcGIS Server site' recipe 'arcgis-enterprise::unregister_machines', 'Unregisters from the ArcGIS Server site all the server machines except for the local machine' recipe 'arcgis-enterprise::unregister_stopped_machines', 'Unregisters all unavailable server machines in \'default\' cluster from the ArcGIS Server site' diff --git a/cookbooks/arcgis-enterprise/providers/datastore.rb b/cookbooks/arcgis-enterprise/providers/datastore.rb index 8948388..eb2c32d 100644 --- a/cookbooks/arcgis-enterprise/providers/datastore.rb +++ b/cookbooks/arcgis-enterprise/providers/datastore.rb @@ -212,16 +212,14 @@ action :update_account do if node['platform'] == 'windows' - configureserviceaccount = ::File.join(@new_resource.install_dir, 'tools', - 'configureserviceaccount.bat') - run_as_password = @new_resource.run_as_password.gsub("&", "^&") - args = "/username \"#{@new_resource.run_as_user}\" "\ - "/password \"#{run_as_password}\"" - - cmd = Mixlib::ShellOut.new("cmd.exe /C \"\"#{configureserviceaccount}\" #{args}\"", - { :timeout => 3600 }) - cmd.run_command - cmd.error! + datastore_tools = ArcGIS::DataStoreTools.new(node['arcgis']['version'], + node['platform'], + @new_resource.install_dir, + node['arcgis']['data_store']['install_subdir'], + @new_resource.run_as_user) + + datastore_tools.configure_service_account(@new_resource.run_as_user, + @new_resource.run_as_password) # Update logon account of the windows service directly in addition to running configureserviceaccount.bat Utils.sc_config('ArcGIS Data Store', @new_resource.run_as_user, @new_resource.run_as_password) @@ -373,55 +371,33 @@ end action :configure do - begin - server_admin_url = "#{@new_resource.server_url}/admin" - - Utils.wait_until_url_available(server_admin_url) + server_admin_url = "#{@new_resource.server_url}/admin" - if node['platform'] == 'windows' - cmd = ::File.join(@new_resource.install_dir, 'tools\\configuredatastore') - args = "\"#{server_admin_url}\" \"#{@new_resource.username}\" \"#{@new_resource.password}\" \"#{@new_resource.data_dir}\" --stores #{@new_resource.types}" + Utils.wait_until_url_available(server_admin_url) - if !@new_resource.mode.nil? && !@new_resource.mode.empty? && - Gem::Version.new(node['arcgis']['version']) >= Gem::Version.new('10.8.1') && - @new_resource.types.downcase.include?('tilecache') - args += " --mode #{@new_resource.mode}" - end - - env = { 'AGSDATASTORE' => @new_resource.install_dir } + datastore_tools = ArcGIS::DataStoreTools.new(node['arcgis']['version'], + node['platform'], + @new_resource.install_dir, + node['arcgis']['data_store']['install_subdir'], + @new_resource.run_as_user) - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 10800, :environment => env }) - cmd.run_command - cmd.error! - else - install_subdir = ::File.join(@new_resource.install_dir, - node['arcgis']['data_store']['install_subdir']) - cmd = ::File.join(install_subdir, 'tools/configuredatastore.sh') - args = "\"#{server_admin_url}\" \"#{@new_resource.username}\" \"#{@new_resource.password}\" \"#{@new_resource.data_dir}\" --stores #{@new_resource.types}" - - if !@new_resource.mode.nil? && !@new_resource.mode.empty? && - Gem::Version.new(node['arcgis']['version']) >= Gem::Version.new('10.8.1') && - @new_resource.types.downcase.include?('tilecache') - args += " --mode #{@new_resource.mode}" - end - - run_as_user = @new_resource.run_as_user - - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 10800, :user => run_as_user }) - cmd.run_command - cmd.error! - end + datastore_tools.configure_datastore(@new_resource.types, + server_admin_url, + @new_resource.username, + @new_resource.password, + @new_resource.data_dir, + @new_resource.mode) - new_resource.updated_by_last_action(true) - rescue Exception => e - Chef::Log.error "Failed to configure ArcGIS Data Store. " + e.message - raise e - end + new_resource.updated_by_last_action(true) end action :configure_backup_location do + datastore_tools = ArcGIS::DataStoreTools.new(node['arcgis']['version'], + node['platform'], + @new_resource.install_dir, + node['arcgis']['data_store']['install_subdir'], + @new_resource.run_as_user) + operation = 'change' # At 10.8 tilecache backup location is no longer registered by default @@ -430,75 +406,36 @@ operation = 'register' end - if node['platform'] == 'windows' - cmd = ::File.join(@new_resource.install_dir, 'tools\\configurebackuplocation') - args = "--location \"#{@new_resource.backup_location}\" --operation #{operation} --store #{@new_resource.store} --prompt no" - env = { 'AGSDATASTORE' => @new_resource.install_dir } - - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, :environment => env }) - cmd.run_command - if cmd.error? && (cmd.stderr.include?('Operation is not supported under this configuration.') || - cmd.stderr.include?('Backup location already exists.')) - Chef::Log.debug(cmd.stderr) - - cmd = ::File.join(@new_resource.install_dir, 'tools\\configurebackuplocation') - args = "--location \"#{@new_resource.backup_location}\" --operation change --store #{@new_resource.store} --prompt no" - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, :environment => env }) - cmd.run_command - end - - cmd.error! - else - install_subdir = ::File.join(@new_resource.install_dir, - node['arcgis']['data_store']['install_subdir']) - cmd = ::File.join(install_subdir, 'tools/configurebackuplocation.sh') - args = "--location \"#{@new_resource.backup_location}\" --operation #{operation} --store #{@new_resource.store} --prompt no" - run_as_user = @new_resource.run_as_user - - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, :user => run_as_user }) - cmd.run_command - - if cmd.error? && (cmd.stderr.include?('Operation is not supported under this configuration.') || - cmd.stderr.include?('Backup location already exists.')) - Chef::Log.debug(cmd.stderr) - - cmd = ::File.join(install_subdir, 'tools/configurebackuplocation.sh') - args = "--location \"#{@new_resource.backup_location}\" --operation change --store #{@new_resource.store} --prompt no" - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, :user => run_as_user }) - cmd.run_command - end - - cmd.error! + # Because relational data stores always have default backups of 'fs' type, + # configuring backup locations of 's3' type for relational data stores + # need to use '--operation register' rather than '--operation change'. + if @new_resource.store == 'relational' && @new_resource.backup_type == 's3' + operation = 'register' end + datastore_tools.configure_backup_location(@new_resource.store, @new_resource.backup_location, operation) + new_resource.updated_by_last_action(true) end action :prepare_upgrade do - @new_resource.types.split(',').each do |type| - if node['platform'] == 'windows' - cmd = ::File.join(@new_resource.install_dir, 'tools\\prepareupgrade.bat') - args = "--store \"#{type}\" --server-url \"#{@new_resource.server_url}\" --server-admin \"#{@new_resource.username}\" --server-password \"#{@new_resource.password}\" --data-dir \"#{@new_resource.data_dir}\" --prompt no" - env = { 'AGSDATASTORE' => @new_resource.install_dir } - else - install_subdir = ::File.join(@new_resource.install_dir, - node['arcgis']['data_store']['install_subdir']) - cmd = ::File.join(install_subdir, 'tools/prepareupgrade.sh') - args = "--store \"#{type}\" --server-url \"#{@new_resource.server_url}\" --server-admin \"#{@new_resource.username}\" --server-password \"#{@new_resource.password}\" --data-dir \"#{@new_resource.data_dir}\" --prompt no" - end - - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, - :environment => env}) - cmd.run_command - cmd.error! - end - - new_resource.updated_by_last_action(true) + server_admin_url = "#{@new_resource.server_url}/admin" + + Utils.wait_until_url_available(server_admin_url) + + datastore_tools = ArcGIS::DataStoreTools.new(node['arcgis']['version'], + node['platform'], + @new_resource.install_dir, + node['arcgis']['data_store']['install_subdir'], + @new_resource.run_as_user) + + @new_resource.types.split(',').each do |store| + datastore_tools.prepare_upgrade(store, + server_admin_url, + @new_resource.username, + @new_resource.password, + @new_resource.data_dir) + end end action :configure_hostidentifiers_properties do @@ -515,37 +452,20 @@ hostidentifier = @new_resource.hostidentifier force = @new_resource.force_remove_machine ? 'true' : 'false' - if hostidentifier.nil? || hostidentifier.empty? - if @new_resource.preferredidentifier == 'hostname' - hostidentifier = node['hostname'] - else - hostidentifier = node['ipaddress'] - end + if hostidentifier.nil? || hostidentifier.empty? + hostidentifier = @new_resource.preferredidentifier == 'hostname' ? + node['hostname'] : node['ipaddress'] end - @new_resource.types.split(',').each do |type| - if node['platform'] == 'windows' - cmd = ::File.join(@new_resource.install_dir, 'tools\\removemachine') - args = "#{hostidentifier} --store #{type} --force #{force} --prompt no" - env = { 'AGSDATASTORE' => @new_resource.install_dir } + datastore_tools = ArcGIS::DataStoreTools.new(node['arcgis']['version'], + node['platform'], + @new_resource.install_dir, + node['arcgis']['data_store']['install_subdir'], + @new_resource.run_as_user) - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, :environment => env }) - cmd.run_command - cmd.error! - else - install_subdir = ::File.join(@new_resource.install_dir, - node['arcgis']['data_store']['install_subdir']) - cmd = ::File.join(install_subdir, 'tools/removemachine.sh') - args = "#{hostidentifier} --store #{type} --force #{force} --prompt no" - run_as_user = @new_resource.run_as_user - - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", - { :timeout => 600, :user => run_as_user }) - cmd.run_command - cmd.error! - end - end + @new_resource.types.split(',').each do |store| + datastore_tools.remove_machine(store, hostidentifier, force) + end new_resource.updated_by_last_action(true) end diff --git a/cookbooks/arcgis-enterprise/providers/portal.rb b/cookbooks/arcgis-enterprise/providers/portal.rb index 4826a21..6324064 100644 --- a/cookbooks/arcgis-enterprise/providers/portal.rb +++ b/cookbooks/arcgis-enterprise/providers/portal.rb @@ -82,7 +82,7 @@ "#{password} "\ "#{@new_resource.setup_options}" - cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 14400 }) + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 28800 }) cmd.run_command cmd.error! else @@ -99,9 +99,9 @@ end if node['arcgis']['run_as_superuser'] - cmd = Mixlib::ShellOut.new("su #{run_as_user} -c \"#{cmd} #{args}\"", { :timeout => 14400 }) + cmd = Mixlib::ShellOut.new("su #{run_as_user} -c \"#{cmd} #{args}\"", { :timeout => 28800 }) else - cmd = Mixlib::ShellOut.new("#{cmd} #{args}", {:user => run_as_user, :timeout => 14400}) + cmd = Mixlib::ShellOut.new("#{cmd} #{args}", {:user => run_as_user, :timeout => 28800}) end cmd.run_command cmd.error! @@ -413,9 +413,13 @@ portal_admin_client.wait_until_available - Chef::Log.info 'Setting the portal system properties...' - - portal_admin_client.update_system_properties(@new_resource.system_properties) + if portal_admin_client.system_properties != @new_resource.system_properties + Chef::Log.info 'Setting the portal system properties...' + portal_admin_client.update_system_properties(@new_resource.system_properties) + Chef::Log.info 'Portal system properties were updated.' + else + Chef::Log.info 'Portal system properties were not changed.' + end portal_admin_client.edit_log_settings(@new_resource.log_level, @new_resource.log_dir, @@ -468,10 +472,6 @@ @new_resource.username, @new_resource.password) - unless @new_resource.root_cert.empty? || @new_resource.root_cert_alias.empty? - portal_admin_client.add_root_cert(@new_resource.root_cert, @new_resource.root_cert_alias, 'false') - end - cert_alias = portal_admin_client.server_ssl_certificate unless cert_alias == @new_resource.cert_alias @@ -492,6 +492,25 @@ end end +action :import_root_cert do + unless @new_resource.root_cert.empty? || @new_resource.root_cert_alias.empty? + portal_admin_client = ArcGIS::PortalAdminClient.new(@new_resource.portal_url, + @new_resource.username, + @new_resource.password) + + unless portal_admin_client.ssl_certificate_exist?(@new_resource.root_cert_alias) + portal_admin_client.add_root_cert(@new_resource.root_cert, + @new_resource.root_cert_alias, 'false') + + sleep(60.0) # wait for portal restart + + portal_admin_client.wait_until_available + + new_resource.updated_by_last_action(true) + end + end +end + action :register_server do portal_admin_client = ArcGIS::PortalAdminClient.new(@new_resource.portal_url, @new_resource.username, @@ -543,9 +562,14 @@ @new_resource.server_username, @new_resource.server_password) - # Wait until both Portal and Server are available. - portal_admin_client.wait_until_available - server_admin_client.wait_until_available + # Wait until Portal admin URL is available. + portal_admin_client.wait_until_available(5) + + # Wait until Server admin URL is available. + server_admin_client.wait_until_available(5) + + # Wait until Server web context health check URL is available. + Utils.wait_until_url_available(@new_resource.server_url + '/rest/info/healthcheck?f=json') servers = portal_admin_client.servers @@ -562,6 +586,29 @@ end end +action :unfederate_server do + portal_admin_client = ArcGIS::PortalAdminClient.new(@new_resource.portal_url, + @new_resource.username, + @new_resource.password) + + # Wait until Portal admin URL is available. + portal_admin_client.wait_until_available + + servers = portal_admin_client.servers + + server = servers.detect { |s| s['url'] == @new_resource.server_url } + + if server.nil? + Chef::Log.info("Server #{@new_resource.server_url} is not federated with the portal") + else + portal_admin_client.unfederate_server(server['id']) + + Chef::Log.info("Server #{@new_resource.server_url} is now unfederated from the portal") + + new_resource.updated_by_last_action(true) + end +end + action :enable_server_function do portal_admin_client = ArcGIS::PortalAdminClient.new(@new_resource.portal_url, @new_resource.username, @@ -576,7 +623,7 @@ server = servers.detect { |s| s['url'] == @new_resource.server_url } if server.nil? - Chef::Log.info("Server #{@new_resource.server_url} was not federated with the portal") + Chef::Log.info("Server #{@new_resource.server_url} is not federated with the portal") else Chef::Log.info("Enabling '#{@new_resource.server_function}' on Server (#{server['id']})...") server_role = @new_resource.is_hosting ? "HOSTING_SERVER" : "FEDERATED_SERVER" @@ -590,9 +637,22 @@ action :stop do if node['platform'] == 'windows' - if Utils.service_started?('Portal for ArcGIS') + # Log server.xml file size before and after the portal service stop + server_xml = ::File.join(node['arcgis']['portal']['install_dir'], + 'framework\\runtime\\tomcat\\conf\\server.xml') + server_xml_size = ::File.size(server_xml) + # Chef::Log.info("Portal server.xml file size before service stop is #{server_xml_size} bytes.") + Utils.stop_service('Portal for ArcGIS') + + server_xml_size = ::File.size(server_xml) + # Chef::Log.info("Portal server.xml file size after service stop is #{server_xml_size} bytes.") + Chef::Log.warn("Portal server.xml file is empty.") if server_xml_size == 0 + + # Sleep to prevent frequent restarts of the service + sleep(60) + new_resource.updated_by_last_action(true) end else @@ -627,8 +687,22 @@ end if !Utils.service_started?('Portal for ArcGIS') + # Log server.xml file size before and after the portal service start + server_xml = ::File.join(node['arcgis']['portal']['install_dir'], + 'framework\\runtime\\tomcat\\conf\\server.xml') + server_xml_size = ::File.size(server_xml) + # Chef::Log.info("Portal server.xml file size before service start is #{server_xml_size} bytes.") + Utils.sc_enable('Portal for ArcGIS') Utils.start_service('Portal for ArcGIS') + + server_xml_size = ::File.size(server_xml) + # Chef::Log.info("Portal server.xml file size after service start is #{server_xml_size} bytes.") + Chef::Log.warn("Portal server.xml file is empty.") if server_xml_size == 0 + + # Sleep to prevent frequent restarts of the service + sleep(60) + new_resource.updated_by_last_action(true) end else diff --git a/cookbooks/arcgis-enterprise/providers/server.rb b/cookbooks/arcgis-enterprise/providers/server.rb index 6754718..6576091 100644 --- a/cookbooks/arcgis-enterprise/providers/server.rb +++ b/cookbooks/arcgis-enterprise/providers/server.rb @@ -123,9 +123,6 @@ cmd.error! end - # Wait for Server installation to finish - sleep(180.0) - new_resource.updated_by_last_action(true) end @@ -366,7 +363,8 @@ primary_admin_client.wait_until_site_exist - admin_client.join_site(@new_resource.primary_server_url) + admin_client.join_site(@new_resource.primary_server_url, + @new_resource.pull_license) end new_resource.updated_by_last_action(true) @@ -403,13 +401,17 @@ @new_resource.password) admin_client.wait_until_available - Chef::Log.info('Updating ArcGIS Server system properties...') - - admin_client.update_system_properties(@new_resource.system_properties) - - new_resource.updated_by_last_action(true) + if admin_client.system_properties != @new_resource.system_properties + Chef::Log.info('Updating ArcGIS Server system properties...') + admin_client.update_system_properties(@new_resource.system_properties) + Chef::Log.info 'ArcGIS Server system properties were updated.' + new_resource.updated_by_last_action(true) + else + Chef::Log.info 'ArcGIS Server system properties were not changed.' + new_resource.updated_by_last_action(false) + end rescue Exception => e - Chef::Log.error "Failed to update ArcGIS Server system properties. " + e.message + Chef::Log.error 'Failed to update ArcGIS Server system properties. ' + e.message raise e end end @@ -452,8 +454,9 @@ admin_client.set_server_admin_url(machine_name, @new_resource.server_admin_url) admin_client.set_server_ssl_certificate(machine_name, @new_resource.cert_alias) + # Editing the machine configuration causes the machine to be restarted. + admin_client.wait_until_available sleep(60.0) - admin_client.wait_until_available new_resource.updated_by_last_action(true) @@ -488,6 +491,12 @@ @new_resource.allow_direct_access, @new_resource.allowed_admin_access_ips) + # Security configuration update causes the SOAP and REST service endpoints + # to be redeployed with the new configuration on every server machine in the site. + admin_client.wait_until_available + sleep(60.0) + admin_client.wait_until_available + new_resource.updated_by_last_action(true) rescue Exception => e diff --git a/cookbooks/arcgis-enterprise/providers/webadaptor.rb b/cookbooks/arcgis-enterprise/providers/webadaptor.rb index f14a3ad..37c3e6e 100644 --- a/cookbooks/arcgis-enterprise/providers/webadaptor.rb +++ b/cookbooks/arcgis-enterprise/providers/webadaptor.rb @@ -54,11 +54,19 @@ if node['platform'] == 'windows' # uninstall older WA versions installed_code = Utils.wa_product_code(@new_resource.instance_name, - node['arcgis']['web_adaptor']['product_codes']) + node['arcgis']['web_adaptor']['all_product_codes']) if !installed_code.nil? + # Stop IIS before uninstalling ArcGIS Web Adaptor to make sure the all the + # Web Adaptor's web apps files in C:\wwwroot directory are closed and + # deleted by the uninstall. + Utils.retry_ShellOut('net stop W3SVC /yes', 5, 60, {:timeout => 3600}) + cmd = Mixlib::ShellOut.new("msiexec /qn /x #{installed_code}", {:timeout => 3600}) cmd.run_command cmd.error! + + # Start IIS after ArcGIS Web Adaptor is uninstalled. + Utils.retry_ShellOut('net start W3SVC /yes', 5, 60, {:timeout => 3600}) end cmd = @new_resource.setup diff --git a/cookbooks/arcgis-enterprise/recipes/clean.rb b/cookbooks/arcgis-enterprise/recipes/clean.rb index 82518ac..e492036 100644 --- a/cookbooks/arcgis-enterprise/recipes/clean.rb +++ b/cookbooks/arcgis-enterprise/recipes/clean.rb @@ -19,7 +19,8 @@ [ node['arcgis']['server']['directories_root'], node['arcgis']['portal']['data_dir'], - node['arcgis']['data_store']['data_dir'] ].each do |dir| + node['arcgis']['data_store']['data_dir'], + node['arcgis']['data_store']['local_backup_dir'] ].each do |dir| directory dir do recursive true action :delete diff --git a/cookbooks/arcgis-enterprise/recipes/datastore.rb b/cookbooks/arcgis-enterprise/recipes/datastore.rb index 499fa19..0f43dd2 100644 --- a/cookbooks/arcgis-enterprise/recipes/datastore.rb +++ b/cookbooks/arcgis-enterprise/recipes/datastore.rb @@ -60,9 +60,9 @@ install_dir node['arcgis']['data_store']['install_dir'] run_as_user node['arcgis']['run_as_user'] store store_type + backup_type store_type_backup_type backup_location store_type_backup_location only_if { store_type_backup_type != 'none' } - ignore_failure true # Temporary workaround action :configure_backup_location end end diff --git a/cookbooks/arcgis-enterprise/recipes/enable_geoanalytics.rb b/cookbooks/arcgis-enterprise/recipes/enable_geoanalytics.rb index e89256e..3e3b92d 100644 --- a/cookbooks/arcgis-enterprise/recipes/enable_geoanalytics.rb +++ b/cookbooks/arcgis-enterprise/recipes/enable_geoanalytics.rb @@ -2,7 +2,7 @@ # Cookbook Name:: arcgis-enterprise # Recipe:: enable_geoanalytics # -# Copyright 2018 Esri +# Copyright 2021 Esri # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,9 +25,7 @@ server_admin_url node['arcgis']['server']['private_url'] server_username node['arcgis']['server']['admin_username'] server_password node['arcgis']['server']['admin_password'] - is_hosting false + is_hosting node['arcgis']['server']['is_hosting'] server_function 'GeoAnalytics' action :enable_server_function end - - diff --git a/cookbooks/arcgis-enterprise/recipes/enable_rasteranalytics.rb b/cookbooks/arcgis-enterprise/recipes/enable_rasteranalytics.rb index fbe3e9f..73e0067 100644 --- a/cookbooks/arcgis-enterprise/recipes/enable_rasteranalytics.rb +++ b/cookbooks/arcgis-enterprise/recipes/enable_rasteranalytics.rb @@ -2,7 +2,7 @@ # Cookbook Name:: arcgis-enterprise # Recipe:: enable_rasteranalytics # -# Copyright 2018 Esri +# Copyright 2021 Esri # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -25,8 +25,7 @@ server_admin_url node['arcgis']['server']['private_url'] server_username node['arcgis']['server']['admin_username'] server_password node['arcgis']['server']['admin_password'] - is_hosting false + is_hosting node['arcgis']['server']['is_hosting'] server_function 'RasterAnalytics' action :enable_server_function end - diff --git a/cookbooks/arcgis-enterprise/recipes/enterprise_uninstalled.rb b/cookbooks/arcgis-enterprise/recipes/enterprise_uninstalled.rb index ce3a389..1bee18e 100644 --- a/cookbooks/arcgis-enterprise/recipes/enterprise_uninstalled.rb +++ b/cookbooks/arcgis-enterprise/recipes/enterprise_uninstalled.rb @@ -23,12 +23,10 @@ run_as_user node['arcgis']['run_as_user'] if node['platform'] == 'windows' product_code Utils.wa_product_code(node['arcgis']['portal']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]) + node['arcgis']['web_adaptor']['product_codes']) only_if { !Utils.wa_product_code(node['arcgis']['portal']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? + node['arcgis']['web_adaptor']['product_codes']).nil? } else only_if { @@ -45,12 +43,10 @@ run_as_user node['arcgis']['run_as_user'] if node['platform'] == 'windows' product_code Utils.wa_product_code(node['arcgis']['server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]) + node['arcgis']['web_adaptor']['product_codes']) only_if { !Utils.wa_product_code(node['arcgis']['server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? + node['arcgis']['web_adaptor']['product_codes']).nil? } else only_if { diff --git a/cookbooks/arcgis-enterprise/recipes/federation.rb b/cookbooks/arcgis-enterprise/recipes/federation.rb index e101586..651a072 100644 --- a/cookbooks/arcgis-enterprise/recipes/federation.rb +++ b/cookbooks/arcgis-enterprise/recipes/federation.rb @@ -17,6 +17,21 @@ # limitations under the License. # +# Import public key of ArcGIS Server SSL certificate into portal as +# root/intermediate certificate. +arcgis_enterprise_portal 'Import Root Certificates' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + root_cert node['arcgis']['portal']['root_cert'] + root_cert_alias node['arcgis']['portal']['root_cert_alias'] + not_if { node['arcgis']['portal']['root_cert'].empty? || + node['arcgis']['portal']['root_cert_alias'].empty?} + retries 5 + retry_delay 30 + action :import_root_cert +end + arcgis_enterprise_portal 'Federate Server' do portal_url node['arcgis']['portal']['private_url'] username node['arcgis']['portal']['admin_username'] diff --git a/cookbooks/arcgis-enterprise/recipes/install_portal.rb b/cookbooks/arcgis-enterprise/recipes/install_portal.rb index 7151232..b3fba70 100644 --- a/cookbooks/arcgis-enterprise/recipes/install_portal.rb +++ b/cookbooks/arcgis-enterprise/recipes/install_portal.rb @@ -50,17 +50,6 @@ action :unpack end -# Create portal data directory -# directory node['arcgis']['portal']['data_dir'] do -# owner node['arcgis']['run_as_user'] -# group node['arcgis']['run_as_user'] -# if node['platform'] != 'windows' -# mode '0700' -# end -# recursive true -# action :create -# end - arcgis_enterprise_portal 'Install Portal for ArcGIS' do install_dir node['arcgis']['portal']['install_dir'] product_code node['arcgis']['portal']['product_code'] diff --git a/cookbooks/arcgis-enterprise/recipes/install_portal_wa.rb b/cookbooks/arcgis-enterprise/recipes/install_portal_wa.rb index ee40418..f39a475 100644 --- a/cookbooks/arcgis-enterprise/recipes/install_portal_wa.rb +++ b/cookbooks/arcgis-enterprise/recipes/install_portal_wa.rb @@ -25,8 +25,7 @@ !::File.exist?(node['arcgis']['web_adaptor']['setup']) } if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['portal']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], @@ -43,8 +42,7 @@ instance_name node['arcgis']['portal']['wa_name'] if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['portal']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], diff --git a/cookbooks/arcgis-enterprise/recipes/install_server.rb b/cookbooks/arcgis-enterprise/recipes/install_server.rb index 7e43f22..9d2ea14 100644 --- a/cookbooks/arcgis-enterprise/recipes/install_server.rb +++ b/cookbooks/arcgis-enterprise/recipes/install_server.rb @@ -70,17 +70,39 @@ action :install end +arcgis_enterprise_server 'Configure arcgisserver service' do + install_dir node['arcgis']['server']['install_dir'] + only_if { node['arcgis']['server']['configure_autostart'] } + action :configure_autostart +end + +# AWS specific actions to disable EC2StartupObserver Node Agent plugin. + # Disable all NodeAgent plugins on AWS/EC2 template ::File.join(node['arcgis']['server']['install_dir'], node['arcgis']['server']['install_subdir'], 'framework', 'etc', 'NodeAgentExt.xml') do source 'NodeAgentExt.xml.erb' + notifies :delete, 'file[Delete hostname.properties]', :immediately + notifies :stop, 'arcgis_enterprise_server[Stop ArcGIS Server after replacing NodeAgentExt.xml]', :immediately only_if { node['arcgis']['cloud']['provider'] == 'ec2' && node['arcgis']['server']['disable_nodeagent_plugins'] } end -arcgis_enterprise_server 'Configure arcgisserver service' do - install_dir node['arcgis']['server']['install_dir'] - only_if { node['arcgis']['server']['configure_autostart'] } - action :configure_autostart +# Delete hostname.properties file after NodeAgentExt.xml is replaced +file 'Delete hostname.properties' do + path ::File.join(node['arcgis']['server']['install_dir'], + node['arcgis']['server']['install_subdir'], + 'framework', 'etc', 'hostname.properties') + action :nothing +end + +# Restart ArcGIS Server after deleting hostname.properties +arcgis_enterprise_server 'Stop ArcGIS Server after replacing NodeAgentExt.xml' do + notifies :start, 'arcgis_enterprise_server[Start ArcGIS Server after replacing NodeAgentExt.xml]', :immediately + action :nothing +end + +arcgis_enterprise_server 'Start ArcGIS Server after replacing NodeAgentExt.xml' do + action :nothing end diff --git a/cookbooks/arcgis-enterprise/recipes/install_server_wa.rb b/cookbooks/arcgis-enterprise/recipes/install_server_wa.rb index 719c5fe..42e9c6a 100644 --- a/cookbooks/arcgis-enterprise/recipes/install_server_wa.rb +++ b/cookbooks/arcgis-enterprise/recipes/install_server_wa.rb @@ -25,8 +25,7 @@ !::File.exist?(node['arcgis']['web_adaptor']['setup']) } if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], @@ -43,8 +42,7 @@ instance_name node['arcgis']['server']['wa_name'] if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], diff --git a/cookbooks/arcgis-enterprise/recipes/lp-install.rb b/cookbooks/arcgis-enterprise/recipes/lp-install.rb index e936b2b..8feb3aa 100644 --- a/cookbooks/arcgis-enterprise/recipes/lp-install.rb +++ b/cookbooks/arcgis-enterprise/recipes/lp-install.rb @@ -30,7 +30,7 @@ windows_package 'Install webadaptorLP' do source node['arcgis']['web_adaptor']['lp-setup'] action :install - only_if Utils.product_installed?(node['arcgis']['web_adaptor']['product_code']) + only_if Utils.product_installed?(node['arcgis']['web_adaptor']['product_codes'][0]) end windows_package 'Install Datastore HelpLP' do source node['arcgis']['data_store']['lp-setup'] diff --git a/cookbooks/arcgis-enterprise/recipes/portal.rb b/cookbooks/arcgis-enterprise/recipes/portal.rb index 99e407a..3ce1099 100644 --- a/cookbooks/arcgis-enterprise/recipes/portal.rb +++ b/cookbooks/arcgis-enterprise/recipes/portal.rb @@ -85,6 +85,13 @@ action :create_site end +directory node['arcgis']['portal']['log_dir'] do + owner node['arcgis']['run_as_user'] + mode '0755' if node['platform'] != 'windows' + recursive true + action :create +end + arcgis_enterprise_portal 'Set Portal System Properties' do portal_url node['arcgis']['portal']['url'] username node['arcgis']['portal']['admin_username'] @@ -98,6 +105,19 @@ action :set_system_properties end +arcgis_enterprise_portal 'Import Root Certificates' do + portal_url node['arcgis']['portal']['url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + root_cert node['arcgis']['portal']['root_cert'] + root_cert_alias node['arcgis']['portal']['root_cert_alias'] + not_if { node['arcgis']['portal']['root_cert'].empty? || + node['arcgis']['portal']['root_cert_alias'].empty?} + retries 5 + retry_delay 30 + action :import_root_cert +end + arcgis_enterprise_portal 'Configure HTTPS' do portal_url node['arcgis']['portal']['url'] username node['arcgis']['portal']['admin_username'] @@ -105,9 +125,8 @@ keystore_file node['arcgis']['portal']['keystore_file'] keystore_password node['arcgis']['portal']['keystore_password'] cert_alias node['arcgis']['portal']['cert_alias'] - root_cert node['arcgis']['portal']['root_cert'] - root_cert_alias node['arcgis']['portal']['root_cert_alias'] - not_if { node['arcgis']['portal']['keystore_file'].empty? } + not_if { node['arcgis']['portal']['keystore_file'].empty? || + node['arcgis']['portal']['cert_alias'].empty? } retries 5 retry_delay 30 action :configure_https diff --git a/cookbooks/arcgis-enterprise/recipes/portal_standby.rb b/cookbooks/arcgis-enterprise/recipes/portal_standby.rb index becee75..dad05b2 100644 --- a/cookbooks/arcgis-enterprise/recipes/portal_standby.rb +++ b/cookbooks/arcgis-enterprise/recipes/portal_standby.rb @@ -47,16 +47,11 @@ action :start end -# Authorize portal on the machine or validate the license file if -# user type licensing is used -arcgis_enterprise_portal 'Authorize Portal for ArcGIS' do - authorization_file node['arcgis']['portal']['authorization_file'] - authorization_file_version node['arcgis']['portal']['authorization_file_version'] - user_license_type_id node['arcgis']['portal']['user_license_type_id'] - portal_url node['arcgis']['portal']['url'] - username node['arcgis']['portal']['admin_username'] - password node['arcgis']['portal']['admin_password'] - action :authorize +directory node['arcgis']['portal']['log_dir'] do + owner node['arcgis']['run_as_user'] + mode '0755' if node['platform'] != 'windows' + recursive true + action :create end arcgis_enterprise_portal 'Join Portal Site' do diff --git a/cookbooks/arcgis-enterprise/recipes/server.rb b/cookbooks/arcgis-enterprise/recipes/server.rb index 29dbcaf..7c4eb2d 100644 --- a/cookbooks/arcgis-enterprise/recipes/server.rb +++ b/cookbooks/arcgis-enterprise/recipes/server.rb @@ -30,7 +30,8 @@ retries 2 retry_delay 30 notifies :stop, 'arcgis_enterprise_server[Stop ArcGIS Server]', :immediately - not_if { ::File.exists?(node['arcgis']['server']['cached_authorization_file']) && + not_if { node['arcgis']['cache_authorization_files'] && + ::File.exists?(node['arcgis']['server']['cached_authorization_file']) && FileUtils.compare_file(node['arcgis']['server']['authorization_file'], node['arcgis']['server']['cached_authorization_file']) } action :authorize diff --git a/cookbooks/arcgis-enterprise/recipes/server_node.rb b/cookbooks/arcgis-enterprise/recipes/server_node.rb index 150d965..292db75 100644 --- a/cookbooks/arcgis-enterprise/recipes/server_node.rb +++ b/cookbooks/arcgis-enterprise/recipes/server_node.rb @@ -42,7 +42,9 @@ retries 2 retry_delay 30 notifies :stop, 'arcgis_enterprise_server[Stop ArcGIS Server]', :immediately - not_if { ::File.exists?(node['arcgis']['server']['cached_authorization_file']) && + not_if { node['arcgis']['server']['pull_license'] } + not_if { node['arcgis']['cache_authorization_files'] && + ::File.exists?(node['arcgis']['server']['cached_authorization_file']) && FileUtils.compare_file(node['arcgis']['server']['authorization_file'], node['arcgis']['server']['cached_authorization_file']) } action :authorize @@ -60,6 +62,14 @@ action :nothing end +# Create 'C:\Program Files\ESRI' directory with read/write access for run_as_user +if node['platform'] == 'windows' + directory ::File.join(ENV['ProgramW6432'], 'ESRI') do + rights :full_control, node['arcgis']['run_as_user'] + only_if { node['arcgis']['server']['pull_license'] } + end +end + # Set hostname in hostname.properties file template ::File.join(node['arcgis']['server']['install_dir'], node['arcgis']['server']['install_subdir'], @@ -101,6 +111,7 @@ server_url node['arcgis']['server']['url'] install_dir node['arcgis']['server']['install_dir'] use_join_site_tool node['arcgis']['server']['use_join_site_tool'] + pull_license node['arcgis']['server']['pull_license'] if node['arcgis']['server']['use_join_site_tool'] config_store_connection_string node['arcgis']['server']['config_store_connection_string'] config_store_connection_secret node['arcgis']['server']['config_store_connection_secret'] diff --git a/cookbooks/arcgis-enterprise/recipes/unfederate_server.rb b/cookbooks/arcgis-enterprise/recipes/unfederate_server.rb new file mode 100644 index 0000000..adab59f --- /dev/null +++ b/cookbooks/arcgis-enterprise/recipes/unfederate_server.rb @@ -0,0 +1,28 @@ +# +# Cookbook Name:: arcgis-enterprise +# Recipe:: unfederate_server +# +# Copyright 2021 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. +# + +arcgis_enterprise_portal 'Unfederate Server' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + server_url node['arcgis']['server']['web_context_url'] + retries 5 + retry_delay 30 + action :unfederate_server +end diff --git a/cookbooks/arcgis-enterprise/recipes/unregister_server_wa.rb b/cookbooks/arcgis-enterprise/recipes/unregister_server_wa.rb index ad20731..9730fee 100644 --- a/cookbooks/arcgis-enterprise/recipes/unregister_server_wa.rb +++ b/cookbooks/arcgis-enterprise/recipes/unregister_server_wa.rb @@ -23,7 +23,5 @@ install_dir node['arcgis']['server']['install_dir'] username node['arcgis']['server']['admin_username'] password node['arcgis']['server']['admin_password'] - retries 5 - retry_delay 30 action :unregister_web_adaptors end diff --git a/cookbooks/arcgis-enterprise/resources/datastore.rb b/cookbooks/arcgis-enterprise/resources/datastore.rb index 0f280c7..c6f4aba 100644 --- a/cookbooks/arcgis-enterprise/resources/datastore.rb +++ b/cookbooks/arcgis-enterprise/resources/datastore.rb @@ -37,6 +37,7 @@ attribute :username, :kind_of => String attribute :password, :kind_of => String attribute :store, :kind_of => String, :default => 'relational' +attribute :backup_type, :kind_of => String, :default => 'fs' attribute :backup_location, :kind_of => String attribute :setup_options, :kind_of => String, :default => '' attribute :preferredidentifier, :kind_of => String, :default => 'hostname' diff --git a/cookbooks/arcgis-enterprise/resources/portal.rb b/cookbooks/arcgis-enterprise/resources/portal.rb index 96b321c..1981a07 100644 --- a/cookbooks/arcgis-enterprise/resources/portal.rb +++ b/cookbooks/arcgis-enterprise/resources/portal.rb @@ -21,8 +21,9 @@ :update_account, :configure_autostart, :authorize, :create_site, :join_site, :set_system_properties, :configure_https, :unregister_standby, :register_server, :federate_server, - :enable_server_function, :set_allssl, :set_identity_store, - :configure_hostidentifiers_properties + :unfederate_server, :enable_server_function, :set_allssl, + :set_identity_store, :configure_hostidentifiers_properties, + :import_root_cert attribute :setup_archive, :kind_of => String attribute :setups_repo, :kind_of => String diff --git a/cookbooks/arcgis-enterprise/resources/server.rb b/cookbooks/arcgis-enterprise/resources/server.rb index 7de41f7..2ea792a 100644 --- a/cookbooks/arcgis-enterprise/resources/server.rb +++ b/cookbooks/arcgis-enterprise/resources/server.rb @@ -67,6 +67,7 @@ attribute :log_dir, :kind_of => String attribute :max_log_file_age, :kind_of => Integer, :default => 90 attribute :use_join_site_tool, :kind_of => [TrueClass, FalseClass], :default => false +attribute :pull_license, :kind_of => [TrueClass, FalseClass], :default => false attribute :user_store_config, :kind_of => Hash, :default => {} attribute :role_store_config, :kind_of => Hash, :default => {} attribute :privileges, :kind_of => Hash, :default => {} diff --git a/cookbooks/arcgis-geoevent/CHANGELOG.md b/cookbooks/arcgis-geoevent/CHANGELOG.md index 1f9166b..e6ae426 100644 --- a/cookbooks/arcgis-geoevent/CHANGELOG.md +++ b/cookbooks/arcgis-geoevent/CHANGELOG.md @@ -3,6 +3,10 @@ arcgis-geoevent cookbook CHANGELOG This file is used to list changes made in each version of the arcgis-geoevent cookbook. +3.8.0 +----- +- Added support for ArcGIS GeoEvent Server 10.9.1. + 3.7.0 ----- - Added support for ArcGIS GeoEvent Server 10.9. diff --git a/cookbooks/arcgis-geoevent/README.md b/cookbooks/arcgis-geoevent/README.md index de9a6aa..80200af 100644 --- a/cookbooks/arcgis-geoevent/README.md +++ b/cookbooks/arcgis-geoevent/README.md @@ -13,6 +13,7 @@ Requirements * 10.8 * 10.8.1 * 10.9 +* 10.9.1 ### Supported ArcGIS software @@ -26,8 +27,13 @@ Requirements * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 -* Ubuntu 14.04, 16.04, 18.04 -* Rhel 6.5, 7.0 +* Windows Server 2022 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 + ### Dependencies @@ -50,6 +56,14 @@ Attributes Recipes ------- +### arcgis-geoevent::admin_reset + +Administratively resets GeoEvent Server. + +> Deletes the Apache ZooKeeper files (to administratively clear the GeoEvent Server configuration), the product’s runtime files (to force the system framework to be rebuilt), and removes previously received event messages (by deleting Kafka topic queues from disk) is how system administrators reset a GeoEvent Server instance to look like the product has just been installed. + +> If you have custom components in the C:\Program Files\ArcGIS\Server\GeoEvent\deploy folder, move these from the \deploy folder to a local temporary folder, while GeoEvent Server is running, to prevent the component from being restored (from the distributed configuration store) when GeoEvent Server is restarted. Also, make sure you have a copy of the most recent XML export of your GeoEvent Server configuration if you want to save the elements you have created. + ### arcgis-geoevent::default Installs and configures ArcGIS GeoEvent Server. diff --git a/cookbooks/arcgis-geoevent/attributes/default.rb b/cookbooks/arcgis-geoevent/attributes/default.rb index b1301fa..a35547a 100644 --- a/cookbooks/arcgis-geoevent/attributes/default.rb +++ b/cookbooks/arcgis-geoevent/attributes/default.rb @@ -39,6 +39,10 @@ geoevent['lp-setup'] = 'C:\\ArcGIS\\GeoEvent\\SetupFiles\\setup.msi' case node['arcgis']['version'] + when '10.9.1' + geoevent['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_GeoEvent_Server_1091_180081.exe').gsub('/', '\\') + geoevent['product_code'] = '{F5C3D729-0B74-419D-9154-D05C63606A94}' when '10.9' geoevent['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_GeoEvent_Server_109_177813.exe').gsub('/', '\\') @@ -69,6 +73,9 @@ geoevent['lp-setup'] = '/arcgis/geo-event-cdLP/Language-Pack-Setup.sh' case node['arcgis']['version'] + when '10.9.1' + geoevent['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_GeoEvent_Server_1091_180218.tar.gz') when '10.9' geoevent['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_GeoEvent_Server_109_177900.tar.gz') diff --git a/cookbooks/arcgis-geoevent/libraries/utils.rb b/cookbooks/arcgis-geoevent/libraries/utils.rb deleted file mode 100644 index 8769e85..0000000 --- a/cookbooks/arcgis-geoevent/libraries/utils.rb +++ /dev/null @@ -1,91 +0,0 @@ -# -# Copyright 2015 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. - -require 'net/http' -require 'uri' -require 'json' - -if RUBY_PLATFORM =~ /mswin|mingw32|windows/ - require 'win32/registry' -end - -# -# Utilities used by various arcgis cookbook resources. -# -module Utils - MAX_RETRIES = 30 - SLEEP_TIME = 10.0 - - def self.wait_until_url_available(url) - uri = URI.parse(url) - - http = Net::HTTP.new(uri.host, uri.port) - http.read_timeout = 600 - - if uri.scheme == 'https' - http.use_ssl = true - http.verify_mode = OpenSSL::SSL::VERIFY_NONE - end - - MAX_RETRIES.times do - begin - request = Net::HTTP::Get.new(uri.request_uri) - request.add_field('Accept-Language', 'en-US') - response = http.request(request) - - if response.code.to_i < 400 - Chef::Log.info("URL #{url} is available.") - break - end - - Chef::Log.debug("URL #{url} is not yet available. HTTP response code = #{response.code} (#{response.message})") - rescue Exception => ex - Chef::Log.debug("URL #{url} is not yet available. #{ex.message}") - end - - sleep(SLEEP_TIME) - end - end - - def self.product_key_exists?(path) - begin - key = Win32::Registry::HKEY_LOCAL_MACHINE.open(path, ::Win32::Registry::KEY_READ | 0x100) - display_name = key['DisplayName'] - key.close() - return !display_name.nil? - rescue - return false - end - end - - def self.product_installed?(product_code) - self.product_key_exists?('SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\' + product_code) || - self.product_key_exists?('SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\' + product_code) - end - - def self.retry_ShellOut(command, retries, retry_delay, hash = {}) - for i in 1..retries - cmd = Mixlib::ShellOut.new(command, hash) - cmd.run_command - - return cmd.exitstatus unless cmd.error? - - cmd.error! if i == retries - - sleep(retry_delay) - end - end - -end diff --git a/cookbooks/arcgis-geoevent/metadata.rb b/cookbooks/arcgis-geoevent/metadata.rb index 223a763..a6ff2fa 100644 --- a/cookbooks/arcgis-geoevent/metadata.rb +++ b/cookbooks/arcgis-geoevent/metadata.rb @@ -4,16 +4,20 @@ license 'Apache 2.0' description 'Installs and configures ArcGIS GeoEvent Server' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-enterprise', '~> 3.7' -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-enterprise', '~> 3.8' +depends 'arcgis-repository', '~> 3.8' supports 'windows' supports 'ubuntu' supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' +recipe 'arcgis-geoevent::admin_reset', 'Administratively resets GeoEvent Server' recipe 'arcgis-geoevent::default', 'Installs and configures ArcGIS GeoEvent Server' recipe 'arcgis-geoevent::lp-install', 'Installs language pack for ArcGIS GeoEvent Server' recipe 'arcgis-geoevent::start_server', 'Starts ArcGIS GeoEvent Server' diff --git a/cookbooks/arcgis-geoevent/providers/geoevent.rb b/cookbooks/arcgis-geoevent/providers/geoevent.rb index ea26023..f9f8f50 100644 --- a/cookbooks/arcgis-geoevent/providers/geoevent.rb +++ b/cookbooks/arcgis-geoevent/providers/geoevent.rb @@ -187,6 +187,14 @@ action [:enable, :start] end + # Give the service 30 - 60 seconds to complete its start-up, + # so that the Kafka and Zookeeper resources are initialized. + ruby_block 'Wait for GeoEvent gateway service to start' do + block do + sleep(30) + end + end + service "ArcGISGeoEvent" do supports :status => true, :restart => true, :reload => true timeout 180 @@ -199,6 +207,12 @@ action [:enable, :start] end + ruby_block 'Wait for GeoEvent gateway service to start' do + block do + sleep(30) + end + end + service "arcgisgeoevent" do supports :status => true, :restart => true, :reload => true action [:enable, :start] diff --git a/cookbooks/arcgis-geoevent/recipes/admin_reset.rb b/cookbooks/arcgis-geoevent/recipes/admin_reset.rb new file mode 100644 index 0000000..320183a --- /dev/null +++ b/cookbooks/arcgis-geoevent/recipes/admin_reset.rb @@ -0,0 +1,63 @@ +# +# Cookbook Name:: arcgis-geoevent +# Recipe:: admin_reset +# +# Copyright 2021 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. +# + +# Stop the ArcGIS GeoEvent Server and GeoEvent Gateway Windows services. + +if node['platform'] == 'windows' + arcgis_geoevent_geoevent 'Stop ArcGIS GeoEvent Server' do + install_dir node['arcgis']['server']['install_dir'] + action :stop + end + + # Locate and delete the files and folders beneath the following directories + # (leaving the parent folders intact): + + [ + ::File.join(node['arcgis']['server']['install_dir'],'GeoEvent\\data'), + ::File.join(node['arcgis']['server']['install_dir'],'gateway\\log'), + ::File.join(ENV['ProgramData'], 'Esri\\GeoEvent'), + ::File.join(ENV['ProgramData'], 'Esri\\GeoEvent-Gateway\\zookeeper-data'), + ::File.join(ENV['ProgramData'], 'Esri\\GeoEvent-Gateway\\kafka\\logs'), + ::File.join(ENV['ProgramData'], 'Esri\\GeoEvent-Gateway\\kafka\\logs1'), + ::File.join(ENV['ProgramData'], 'Esri\\GeoEvent-Gateway\\kafka\\logs2') + ].each do |dir| + directory dir do + recursive true + rights :full_control, node['arcgis']['run_as_user'] + inherits true + action [:delete, :create] + end + end + + # Delete the GeoEvent Gateway configuration file (a new file will be rebuilt). + + file ::File.join(node['arcgis']['server']['install_dir'], + 'GeoEvent\\etc\\com.esri.ges.gateway.cfg') do + action :delete + end + + # Start the ArcGIS GeoEvent Server Windows services. + + arcgis_geoevent_geoevent 'Start ArcGIS GeoEvent Server' do + install_dir node['arcgis']['server']['install_dir'] + action :start + end +else + Chef:Log.warn("Recipe is not supported on #{node['platform']} platform.") +end \ No newline at end of file diff --git a/cookbooks/arcgis-geoevent/recipes/default.rb b/cookbooks/arcgis-geoevent/recipes/default.rb index 5e459d8..3b9f552 100644 --- a/cookbooks/arcgis-geoevent/recipes/default.rb +++ b/cookbooks/arcgis-geoevent/recipes/default.rb @@ -2,7 +2,7 @@ # Cookbook Name:: arcgis-geoevent # Recipe:: default # -# Copyright 2015 Esri +# Copyright 2021 Esri # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,6 +27,7 @@ retries 5 retry_delay 60 not_if { node['arcgis']['geoevent']['authorization_file'] == '' || + node['arcgis']['cache_authorization_files'] && ::File.exists?(node['arcgis']['geoevent']['cached_authorization_file']) && FileUtils.compare_file(node['arcgis']['geoevent']['authorization_file'], node['arcgis']['geoevent']['cached_authorization_file']) } @@ -39,6 +40,7 @@ end sensitive true subscribes :create, 'arcgis_geoevent_geoevent[Authorize ArcGIS GeoEvent Server]', :immediately + only_if { node['arcgis']['cache_authorization_files'] } action :nothing end diff --git a/cookbooks/arcgis-insights/CHANGELOG.md b/cookbooks/arcgis-insights/CHANGELOG.md index 7c9ec49..22f3528 100644 --- a/cookbooks/arcgis-insights/CHANGELOG.md +++ b/cookbooks/arcgis-insights/CHANGELOG.md @@ -2,6 +2,9 @@ This file is used to list changes made in each version of the arcgis-insights cookbook. +## 3.8.0 +- Added support for Insights for ArcGIS 2021.1/2021.1.1/2021.2/2021.2.1/2021.3/2021.3.1. + ## 3.7.0 - Added support for Insights for ArcGIS 2020.3. diff --git a/cookbooks/arcgis-repository/LICENSE b/cookbooks/arcgis-insights/License.txt similarity index 100% rename from cookbooks/arcgis-repository/LICENSE rename to cookbooks/arcgis-insights/License.txt diff --git a/cookbooks/arcgis-insights/README.md b/cookbooks/arcgis-insights/README.md index 208accf..cdb9bff 100644 --- a/cookbooks/arcgis-insights/README.md +++ b/cookbooks/arcgis-insights/README.md @@ -12,6 +12,12 @@ Requirements * 2020.1 * 2020.2 * 2020.3 +* 2021.1 +* 2021.1.1 +* 2021.2 +* 2021.2.1 +* 2021.3 +* 2021.3.1 ### Platforms @@ -19,8 +25,13 @@ Requirements * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 -* Ubuntu 14.04, 16.04, 18.04 -* Rhel 6.5, 7.0 +* Windows Server 2022 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 + ### Dependencies @@ -32,7 +43,7 @@ The following cookbooks are required: Attributes ---------- -* `node['arcgis']['insights']['version']` = ArcGIS Insights version. Default version is `2020.3` +* `node['arcgis']['insights']['version']` = ArcGIS Insights version. Default version is `2021.3.1` * `node['arcgis']['insights']['setup_archive']` = Path to ArcGIS Insights version setup archive. Default value depends on `node['arcgis']['insights']['version']` attribute value. * `node['arcgis']['insights']['setup']` = The location of ArcGIS Insights setup executable. Default location is `%USERPROFILE%\Documents\Insights \Insights\setup.exe` on Windows and `/opt/arcgis/Insights/Insights-Setup.sh` on Linux. * `node['arcgis']['insights']['setup_archive']` = Path to ArcGIS Insights setup archive. Default value depends on `node['arcgis']['insights']['version']` attribute value. diff --git a/cookbooks/arcgis-insights/attributes/default.rb b/cookbooks/arcgis-insights/attributes/default.rb index f9597ea..d87c0a0 100644 --- a/cookbooks/arcgis-insights/attributes/default.rb +++ b/cookbooks/arcgis-insights/attributes/default.rb @@ -2,7 +2,7 @@ # Cookbook Name:: arcgis-insights # Attributes:: default # -# Copyright 2017 Esri +# Copyright 2021 Esri # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -20,35 +20,56 @@ include_attribute 'arcgis-enterprise' default['arcgis']['insights'].tap do |insights| - insights['version'] = '2020.3' + insights['version'] = '2021.3.1' case node['platform'] when 'windows' - insights['setup'] = node['arcgis']['repository']['setups'] + '\\ArcGIS Insights Windows ' + + insights['setup'] = node['arcgis']['repository']['setups'] + '\\ArcGIS Insights ' + node['arcgis']['insights']['version'] + '\\Insights\\Setup.exe' case node['arcgis']['insights']['version'] + when '2021.3.1' + insights['product_code'] = '{2EFCCCED-8C84-4A76-B2B7-4680195E9FD4}' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Windows_2021_3_1_179500.exe') + when '2021.3' + insights['product_code'] = '{64066B1D-7BF6-42DD-98F1-03D5146EC890}' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Windows_2021_3_179498.exe') + when '2021.2.1' + insights['product_code'] = '{749A02F9-D417-449A-9AF5-1D116E080790}' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Windows_2021_2_1_178737.exe') + when '2021.2' + insights['product_code'] = '{E7C79A1B-DB5E-48A9-846B-B648FCAD7A12}' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Windows_2021_2_178735.exe') + when '2021.1.1' + insights['product_code'] = '{67E5DAD3-A014-44D7-9CF1-35AF8C7117D4}' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Windows_2021_1_1_177961.exe') + when '2021.1' + insights['product_code'] = '{6C55A753-1D58-4BD6-BD2E-7D57433F835E}' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Windows_2021_1_177919.exe') when '2020.3' insights['product_code'] = '{A423A99B-D785-49F9-B91B-E39457B6B6D5}' insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Insights_Windows_2020_3_176134.exe') + insights['setup'] = node['arcgis']['repository']['setups'] + '\\ArcGIS Insights Windows ' + + node['arcgis']['insights']['version'] + '\\Insights\\Setup.exe' when '2020.2' insights['product_code'] = '{A51F92FD-3A9D-467C-B29F-74759CB85E0A}' insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Insights_Windows_2020_2_175863.exe') - insights['setup'] = node['arcgis']['repository']['setups'] + '\\ArcGIS Insights ' + - node['arcgis']['insights']['version'] + '\\Insights\\Setup.exe' when '2020.1' insights['product_code'] = '{5293D733-7F85-48C8-90A2-7506E51773DB}' insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Insights_Windows_2020_1_173526.exe') - insights['setup'] = node['arcgis']['repository']['setups'] + '\\ArcGIS Insights ' + - node['arcgis']['insights']['version'] + '\\Insights\\Setup.exe' when '3.4.1' insights['product_code'] = '{F3B91D92-3DD8-4F0B-B43B-6F9DA2C1830A}' insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Insights_Windows_341_171410.exe') - insights['setup'] = node['arcgis']['repository']['setups'] + '\\Insights for ArcGIS 3.4.1\\Insights\\Setup.exe' else Chef::Log.warn 'Unsupported Insights for ArcGIS version' end @@ -58,6 +79,24 @@ 'Insights/Insights-Setup.sh') case node['arcgis']['insights']['version'] + when '2021.3.1' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Linux_2021_3_1_179511.tar.gz') + when '2021.3' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Linux_2021_3_179499.tar.gz') + when '2021.2.1' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Linux_2021_2_1_178738.tar.gz') + when '2021.2' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Linux_2021_2_178736.tar.gz') + when '2021.1.1' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Linux_2021_1_1_177962.tar.gz') + when '2021.1' + insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Insights_Linux_2021_1_177920.tar.gz') when '2020.3' insights['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Insights_Linux_2020_3_176135.tar.gz') diff --git a/cookbooks/arcgis-insights/metadata.rb b/cookbooks/arcgis-insights/metadata.rb index e64c74d..4c0afac 100644 --- a/cookbooks/arcgis-insights/metadata.rb +++ b/cookbooks/arcgis-insights/metadata.rb @@ -4,15 +4,18 @@ license 'Apache 2.0' description 'Installs and configures ArcGIS Insights' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-enterprise', '~> 3.7' -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-enterprise', '~> 3.8' +depends 'arcgis-repository', '~> 3.8' supports 'windows' supports 'ubuntu' supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' recipe 'arcgis-insights::default', 'Installs and configures ArcGIS Insights' recipe 'arcgis-insights::uninstall', 'Uninstalls ArcGIS Insights' diff --git a/cookbooks/arcgis-mission/CHANGELOG.md b/cookbooks/arcgis-mission/CHANGELOG.md index 227e675..fae47f0 100644 --- a/cookbooks/arcgis-mission/CHANGELOG.md +++ b/cookbooks/arcgis-mission/CHANGELOG.md @@ -2,6 +2,10 @@ This file is used to list changes made in each version of the arcgis-mission cookbook. +# 3.8.0 + +- Added support for ArcGIS Mission Server 10.9.1. + # 3.7.0 - Added support for ArcGIS Mission Server 10.9. diff --git a/cookbooks/arcgis-mission/LICENSE b/cookbooks/arcgis-mission/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/cookbooks/arcgis-mission/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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. diff --git a/cookbooks/arcgis-mission/License.txt b/cookbooks/arcgis-mission/License.txt new file mode 100644 index 0000000..863d150 --- /dev/null +++ b/cookbooks/arcgis-mission/License.txt @@ -0,0 +1,101 @@ +Apache License - 2.0 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to +compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work +or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual +or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are +necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You +under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, +and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a + readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the + Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever + such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. + You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, + provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to + Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your + modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You +to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, +nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for +determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under +this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, +including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the +use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting +such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/cookbooks/arcgis-mission/README.md b/cookbooks/arcgis-mission/README.md index 3bfc7ab..b696903 100644 --- a/cookbooks/arcgis-mission/README.md +++ b/cookbooks/arcgis-mission/README.md @@ -11,6 +11,7 @@ Requirements * 10.8 * 10.8.1 * 10.9 +* 10.9.1 ### Supported ArcGIS software @@ -18,11 +19,15 @@ Requirements ### Platforms -* Microsoft Windows Server 2019 Standard and Datacenter -* Microsoft Windows Server 2016 Standard and Datacenter * Microsoft Windows Server 2012 R2 Standard and Datacenter -* Ubuntu 16.04, 18.04 -* Rhel 6.5, 7.0 +* Microsoft Windows Server 2016 Standard and Datacenter +* Microsoft Windows Server 2019 Standard and Datacenter +* Microsoft Windows Server 2022 Standard and Datacenter +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 ### Dependencies @@ -51,7 +56,7 @@ Attributes * `node['arcgis']['mission_server']['log_dir']` = ArcGIS Mission Server log directory. Default value is `C:\arcgismissionserver\logs` on Windows and `//usr/logs` on Linux. * `node['arcgis']['mission_server']['max_log_file_age']` = ArcGIS Mission Server maximum log file age. Default value is `90`. * `node['arcgis']['mission_server']['setup_archive']` = Path to ArcGIS Mission Server setup archive. Default value depends on `node['arcgis']['version']` attribute value. -* `node['arcgis']['mission_server']['setup']` = The location of ArcGIS Mission Server setup executable. Default location is `%USERPROFILE%\Documents\ArcGIS10.8\MissionServer\Setup.exe` on Windows and `/opt/arcgis/10.8/MissionServer_Linux/Setup` on Linux. +* `node['arcgis']['mission_server']['setup']` = The location of ArcGIS Mission Server setup executable. Default location is `%USERPROFILE%\Documents\ArcGIS10.9.1\MissionServer\Setup.exe` on Windows and `/opt/arcgis/10.9.1/MissionServer/Setup` on Linux. * `node['arcgis']['mission_server']['configure_autostart']` = If set to true, on Linux the Mission Server is configured to start with the operating system. Default value is `true`. * `node['arcgis']['mission_server']['admin_username']` = Primary ArcGIS Mission Server administrator user name. Default user name is `admin`. * `node['arcgis']['mission_server']['admin_password']` = Primary ArcGIS Mission Server administrator password. Default value is `change.it`. @@ -72,6 +77,10 @@ Installs and configures ArcGIS Mission Server. Federates ArcGIS Mission Server with Portal for ArcGIS and enables Mission role. +# arcgis-mission::fileserver + +Configures shared directories for ArcGIS Mission Server on file server machine. + ### arcgis-mission::install_server Installs ArcGIS Mission Server. @@ -100,9 +109,13 @@ Uninstalls ArcGIS Mission Server. Uninstalls ArcGIS Web Adaptor for ArcGIS Mission Server. -### arcgis-notebooks::unregister_machine +### arcgis-mission::unregister_machine + +Unregisters server machine from the ArcGIS Mission Server site. + +### arcgis-mission::unregister_server_wa -Unregisters server machine from the ArcGIS Notebook Server site. +Unregisters all ArcGIS Mission Server Web Adaptors. Usage ----- diff --git a/cookbooks/arcgis-mission/attributes/default.rb b/cookbooks/arcgis-mission/attributes/default.rb index 6794ea6..96949bb 100644 --- a/cookbooks/arcgis-mission/attributes/default.rb +++ b/cookbooks/arcgis-mission/attributes/default.rb @@ -84,6 +84,10 @@ mission_server['log_dir'] = 'C:\\arcgismissionserver\\logs' case node['arcgis']['version'] + when '10.9.1' + mission_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Mission_Server_Windows_1091_180092.exe').gsub('/', '\\') + mission_server['product_code'] = '{2BE7F20D-572A-4D3E-B989-DC9BDFFB75AA}' when '10.9' mission_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Mission_Server_Windows_109_177824.exe').gsub('/', '\\') @@ -136,6 +140,13 @@ 'usr', 'logs') case node['arcgis']['version'] + when '10.9.1' + mission_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Mission_Server_Linux_1091_180227.tar.gz') + # Setup archives of 10.9.1 daily builds have 'MissionServer_Linix' subfolder instead of 'MissionServer' + # subfolder of final archives. Remove the line below for the final setup archive. + mission_server['setup'] = ::File.join(node['arcgis']['repository']['setups'], node['arcgis']['version'], + 'MissionServer', 'Setup') when '10.9' mission_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Mission_Server_Linux_109_177909.tar.gz') diff --git a/cookbooks/arcgis-mission/metadata.rb b/cookbooks/arcgis-mission/metadata.rb index 9b158c4..4daeafd 100644 --- a/cookbooks/arcgis-mission/metadata.rb +++ b/cookbooks/arcgis-mission/metadata.rb @@ -4,18 +4,22 @@ license 'Apache-2.0' description 'Installs/Configures ArcGIS Mission Server' long_description 'Installs/Configures ArcGIS Mission Server' -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-enterprise', '~> 3.7' -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-enterprise', '~> 3.8' +depends 'arcgis-repository', '~> 3.8' supports 'ubuntu' supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' supports 'windows' recipe 'arcgis-mission::default', 'Installs and configures ArcGIS Mission Server' recipe 'arcgis-mission::federation', 'Federates ArcGIS Mission Server with Portal for ArcGIS and enables MissionServer role' +recipe 'arcgis-mission::fileserver', 'Configures shared directories for ArcGIS Mission Server on file server machine' recipe 'arcgis-mission::install_server', 'Installs ArcGIS Mission Server' recipe 'arcgis-mission::install_server_wa', 'Installs ArcGIS Web Adaptor for ArcGIS Mission Server' recipe 'arcgis-mission::server', 'Installs and configures ArcGIS Mission Server' @@ -24,6 +28,7 @@ recipe 'arcgis-mission::uninstall_server', 'Uninstalls ArcGIS Mission Server' recipe 'arcgis-mission::uninstall_server_wa', 'Uninstalls ArcGIS Web Adaptor for ArcGIS Mission Server' recipe 'arcgis-mission::unregister_machine', 'Unregisters server machine from ArcGIS Mission Server site' +recipe 'arcgis-mission::unregister_server_wa', 'Unregisters all ArcGIS Mission Server Web Adaptors' issues_url 'https://github.com/Esri/arcgis-cookbook/issues' if respond_to?(:issues_url) source_url 'https://github.com/Esri/arcgis-cookbook' if respond_to?(:source_url) diff --git a/cookbooks/arcgis-mission/recipes/federation.rb b/cookbooks/arcgis-mission/recipes/federation.rb index 478c556..90fbbfe 100644 --- a/cookbooks/arcgis-mission/recipes/federation.rb +++ b/cookbooks/arcgis-mission/recipes/federation.rb @@ -17,6 +17,21 @@ # limitations under the License. # +# Import public key of ArcGIS Mission Server SSL certificate into portal as +# root/intermediate certificate. +arcgis_enterprise_portal 'Import Root Certificates' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + root_cert node['arcgis']['portal']['root_cert'] + root_cert_alias node['arcgis']['portal']['root_cert_alias'] + not_if { node['arcgis']['portal']['root_cert'].empty? || + node['arcgis']['portal']['root_cert_alias'].empty?} + retries 5 + retry_delay 30 + action :import_root_cert +end + arcgis_enterprise_portal 'Federate Mission Server' do portal_url node['arcgis']['portal']['private_url'] username node['arcgis']['portal']['admin_username'] diff --git a/cookbooks/arcgis-mission/recipes/install_server_wa.rb b/cookbooks/arcgis-mission/recipes/install_server_wa.rb index e4a40c4..055414e 100644 --- a/cookbooks/arcgis-mission/recipes/install_server_wa.rb +++ b/cookbooks/arcgis-mission/recipes/install_server_wa.rb @@ -25,8 +25,7 @@ !::File.exist?(node['arcgis']['web_adaptor']['setup']) } if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['mission_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], @@ -42,8 +41,7 @@ instance_name node['arcgis']['mission_server']['wa_name'] if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['mission_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], diff --git a/cookbooks/arcgis-mission/recipes/uninstall_server_wa.rb b/cookbooks/arcgis-mission/recipes/uninstall_server_wa.rb index eb44985..383433f 100644 --- a/cookbooks/arcgis-mission/recipes/uninstall_server_wa.rb +++ b/cookbooks/arcgis-mission/recipes/uninstall_server_wa.rb @@ -23,12 +23,10 @@ run_as_user node['arcgis']['run_as_user'] if node['platform'] == 'windows' product_code Utils.wa_product_code(node['arcgis']['mission_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]) + node['arcgis']['web_adaptor']['product_codes']) only_if { !Utils.wa_product_code(node['arcgis']['mission_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? + node['arcgis']['web_adaptor']['product_codes']).nil? } else only_if { diff --git a/cookbooks/arcgis-mission/recipes/unregister_server_wa.rb b/cookbooks/arcgis-mission/recipes/unregister_server_wa.rb new file mode 100644 index 0000000..0e41b02 --- /dev/null +++ b/cookbooks/arcgis-mission/recipes/unregister_server_wa.rb @@ -0,0 +1,25 @@ +# +# Cookbook Name:: arcgis-mission +# Recipe:: unregister_server_wa +# +# Copyright 2021 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. +# + +arcgis_mission_server 'Unregister ArcGIS Mission Server Web Adaptors' do + server_url node['arcgis']['mission_server']['url'] + username node['arcgis']['mission_server']['admin_username'] + password node['arcgis']['mission_server']['admin_password'] + action :unregister_web_adaptors +end diff --git a/cookbooks/arcgis-mission/resources/server.rb b/cookbooks/arcgis-mission/resources/server.rb index 21cbe72..140cbbb 100644 --- a/cookbooks/arcgis-mission/resources/server.rb +++ b/cookbooks/arcgis-mission/resources/server.rb @@ -19,7 +19,7 @@ actions :system, :unpack, :install, :uninstall, :update_account, :stop, :start, :configure_autostart, :authorize, :create_site, :join_site, - :unregister_machine, :set_system_properties + :unregister_machine, :unregister_web_adaptors, :set_system_properties attribute :setup_archive, :kind_of => String attribute :setups_repo, :kind_of => String @@ -359,7 +359,11 @@ def initialize(*args) @new_resource.password) admin_client.wait_until_available - if admin_client.site_exist? + + if admin_client.upgrade_required? + Chef::Log.info('Completing ArcGIS Mission Server upgrade...') + admin_client.complete_upgrade + elsif admin_client.site_exist? Chef::Log.warn('The machine has already joined an ArcGIS Mission Server site.') else admin_client.join_site(@new_resource.primary_server_url) @@ -367,30 +371,38 @@ def initialize(*args) end action :unregister_machine do - begin - admin_client = ArcGIS::ServerAdminClient.new(@new_resource.server_url, - @new_resource.username, - @new_resource.password) + admin_client = ArcGIS::MissionServerAdminClient.new(@new_resource.server_url, + @new_resource.username, + @new_resource.password) - admin_client.wait_until_available + admin_client.wait_until_available - Chef::Log.info('Unregistering server machine...') + Chef::Log.info('Unregistering server machine...') - machine_name = @new_resource.hostname - machine_name = node['fqdn'] if machine_name.empty? + machine_name = @new_resource.hostname + machine_name = node['fqdn'] if machine_name.empty? - admin_client.unregister_machine(machine_name) - rescue Exception => e - Chef::Log.error "Failed to unregister server machine. " + e.message - raise e - end + admin_client.unregister_machine(machine_name) +end + +action :unregister_web_adaptors do + admin_client = ArcGIS::MissionServerAdminClient.new(@new_resource.server_url, + @new_resource.username, + @new_resource.password) + + admin_client.wait_until_available + + Chef::Log.info('Unregistering ArcGIS Mission Server Web Adaptors...') + + admin_client.unregister_web_adaptors end -action :set_system_properties do - admin_client = ArcGIS::ServerAdminClient.new(@new_resource.server_url, - @new_resource.username, - @new_resource.password) +action :set_system_properties do + admin_client = ArcGIS::MissionServerAdminClient.new(@new_resource.server_url, + @new_resource.username, + @new_resource.password) + admin_client.wait_until_available admin_client.update_system_properties(@new_resource.system_properties) diff --git a/cookbooks/arcgis-notebooks/CHANGELOG.md b/cookbooks/arcgis-notebooks/CHANGELOG.md index ada3302..77b253c 100644 --- a/cookbooks/arcgis-notebooks/CHANGELOG.md +++ b/cookbooks/arcgis-notebooks/CHANGELOG.md @@ -2,6 +2,10 @@ This file is used to list changes made in each version of the arcgis-notebooks cookbook. +# 3.8.0 + +- Added support for ArcGIS Notebook Server 10.9.1. + # 3.7.0 - Added support for ArcGIS Notebook Server 10.9. diff --git a/cookbooks/arcgis-notebooks/LICENSE b/cookbooks/arcgis-notebooks/LICENSE deleted file mode 100644 index 11069ed..0000000 --- a/cookbooks/arcgis-notebooks/LICENSE +++ /dev/null @@ -1,201 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS - -APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - -Copyright [yyyy] [name of copyright owner] - -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. diff --git a/cookbooks/arcgis-notebooks/License.txt b/cookbooks/arcgis-notebooks/License.txt new file mode 100644 index 0000000..863d150 --- /dev/null +++ b/cookbooks/arcgis-notebooks/License.txt @@ -0,0 +1,101 @@ +Apache License - 2.0 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to +compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work +or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual +or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are +necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You +under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, +and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a + readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the + Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever + such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. + You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, + provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to + Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your + modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You +to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, +nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for +determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under +this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, +including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the +use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting +such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/cookbooks/arcgis-notebooks/README.md b/cookbooks/arcgis-notebooks/README.md index 6a739c5..be2e410 100644 --- a/cookbooks/arcgis-notebooks/README.md +++ b/cookbooks/arcgis-notebooks/README.md @@ -12,6 +12,7 @@ Requirements * 10.8 * 10.8.1 * 10.9 +* 10.9.1 ### Supported ArcGIS software @@ -19,8 +20,10 @@ Requirements ### Platforms -* Ubuntu 16.04, 18.04 -* Rhel 6.5, 7.0 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* CentOS Linux 8 +* Oracle Linux 8 ### Dependencies @@ -83,6 +86,10 @@ Installs Docker engine. Federates ArcGIS Notebook Server with Portal for ArcGIS and enables NotebookServer role. +### arcgis-notebooks::fileserver + +Configures shared directories for ArcGIS Notebook Server on file server machine. + ### arcgis-notebooks::iptables Reject Docker containers access to EC2 instance metadata IP address. @@ -123,6 +130,10 @@ Uninstalls ArcGIS Web Adaptor for ArcGIS Notebook Server. Unregisters server machine from the ArcGIS Notebook Server site. +### arcgis-notebooks::unregister_server_wa + +Unregisters all ArcGIS Notebook Server Web Adaptors. + Usage ----- diff --git a/cookbooks/arcgis-notebooks/attributes/default.rb b/cookbooks/arcgis-notebooks/attributes/default.rb index 2185d30..121b5c8 100644 --- a/cookbooks/arcgis-notebooks/attributes/default.rb +++ b/cookbooks/arcgis-notebooks/attributes/default.rb @@ -90,6 +90,17 @@ notebook_server['log_dir'] = 'C:\\arcgisnotebookserver\\logs' case node['arcgis']['version'] + when '10.9.1' + notebook_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Server_Windows_1091_180089.exe').gsub('/', '\\') + notebook_server['standard_images'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Docker_Standard_1091_180090.tar.gz').gsub('/', '\\') + notebook_server['advanced_images'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Docker_Advanced_1091_180091.tar.gz').gsub('/', '\\') + notebook_server['product_code'] = '{39DA210D-DE33-4223-8268-F81D2674B501}' + notebook_server['data_setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Server_Samples_Data_Windows_1091_180107.exe').gsub('/', '\\') + notebook_server['data_product_code'] = '{02AB631F-4427-4426-B515-8895F9315D22}' when '10.9' notebook_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Notebook_Server_Windows_109_177821.exe').gsub('/', '\\') @@ -176,6 +187,15 @@ 'usr', 'logs') case node['arcgis']['version'] + when '10.9.1' + notebook_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Server_Linux_1091_180226.tar.gz') + notebook_server['standard_images'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Docker_Standard_1091_180090.tar.gz') + notebook_server['advanced_images'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Docker_Advanced_1091_180091.tar.gz') + notebook_server['data_setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Notebook_Server_Samples_Data_Linux_1091_180232.tar.gz') when '10.9' notebook_server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGIS_Notebook_Server_Linux_109_177908.tar.gz') diff --git a/cookbooks/arcgis-notebooks/metadata.rb b/cookbooks/arcgis-notebooks/metadata.rb index 9a34907..98cbd94 100644 --- a/cookbooks/arcgis-notebooks/metadata.rb +++ b/cookbooks/arcgis-notebooks/metadata.rb @@ -4,21 +4,25 @@ license 'Apache-2.0' description 'Installs/Configures ArcGIS Notebook Server' long_description 'Installs/Configures ArcGIS Notebook Server' -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-enterprise', '~> 3.7' -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-enterprise', '~> 3.8' +depends 'arcgis-repository', '~> 3.8' depends 'docker', '~> 4.9' depends 'iptables', '~> 7.1' supports 'ubuntu' supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' supports 'windows' recipe 'arcgis-notebooks::default', 'Installs and configures ArcGIS Notebook Server' recipe 'arcgis-notebooks::docker', 'Installs Docker engine' recipe 'arcgis-notebooks::federation', 'Federates ArcGIS Notebook Server with Portal for ArcGIS and enables NotebookServer role' +recipe 'arcgis-notebooks::fileserver', 'Configures shared directories for ArcGIS Notebook Server on file server machine' recipe 'arcgis-notebooks::install_server', 'Installs ArcGIS Notebook Server' recipe 'arcgis-notebooks::install_server_wa', 'Installs ArcGIS Web Adaptor for ArcGIS Notebook Server' recipe 'arcgis-notebooks::iptables', 'Reject Docker containers access to EC2 instance metadata IP address' @@ -29,6 +33,7 @@ recipe 'arcgis-notebooks::uninstall_server', 'Uninstalls ArcGIS Notebook Server' recipe 'arcgis-notebooks::uninstall_server_wa', 'Uninstalls ArcGIS Web Adaptor for ArcGIS Notebook Server' recipe 'arcgis-notebooks::unregister_machine', 'Unregisters server machine from the ArcGIS Notebook Server site' +recipe 'arcgis-notebooks::unregister_server_wa', 'Unregisters all ArcGIS Notebook Server Web Adaptors' issues_url 'https://github.com/Esri/arcgis-cookbook/issues' if respond_to?(:issues_url) source_url 'https://github.com/Esri/arcgis-cookbook' if respond_to?(:source_url) diff --git a/cookbooks/arcgis-notebooks/recipes/federation.rb b/cookbooks/arcgis-notebooks/recipes/federation.rb index fc7e57b..8bcb0ca 100644 --- a/cookbooks/arcgis-notebooks/recipes/federation.rb +++ b/cookbooks/arcgis-notebooks/recipes/federation.rb @@ -17,6 +17,21 @@ # limitations under the License. # +# Import public key of ArcGIS Notebook Server SSL certificate into portal as +# root/intermediate certificate. +arcgis_enterprise_portal 'Import Root Certificates' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + root_cert node['arcgis']['portal']['root_cert'] + root_cert_alias node['arcgis']['portal']['root_cert_alias'] + not_if { node['arcgis']['portal']['root_cert'].empty? || + node['arcgis']['portal']['root_cert_alias'].empty?} + retries 5 + retry_delay 30 + action :import_root_cert +end + arcgis_enterprise_portal 'Federate Notebook Server' do portal_url node['arcgis']['portal']['private_url'] username node['arcgis']['portal']['admin_username'] diff --git a/cookbooks/arcgis-notebooks/recipes/fileserver.rb b/cookbooks/arcgis-notebooks/recipes/fileserver.rb index 2ff486f..7fce4fd 100644 --- a/cookbooks/arcgis-notebooks/recipes/fileserver.rb +++ b/cookbooks/arcgis-notebooks/recipes/fileserver.rb @@ -1,7 +1,7 @@ # Cookbook Name:: arcgis-notebooks # Recipe:: fileserver # -# Copyright 2019 Esri +# Copyright 2021 Esri # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/cookbooks/arcgis-notebooks/recipes/install_server_wa.rb b/cookbooks/arcgis-notebooks/recipes/install_server_wa.rb index bbad341..918fe95 100644 --- a/cookbooks/arcgis-notebooks/recipes/install_server_wa.rb +++ b/cookbooks/arcgis-notebooks/recipes/install_server_wa.rb @@ -25,8 +25,7 @@ !::File.exist?(node['arcgis']['web_adaptor']['setup']) } if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['notebook_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], @@ -42,8 +41,7 @@ instance_name node['arcgis']['notebook_server']['wa_name'] if node['platform'] == 'windows' not_if { !Utils.wa_product_code(node['arcgis']['notebook_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? } + node['arcgis']['web_adaptor']['product_codes']).nil? } else not_if { ::File.exist?(::File.join(node['arcgis']['web_adaptor']['install_dir'], node['arcgis']['web_adaptor']['install_subdir'], diff --git a/cookbooks/arcgis-notebooks/recipes/iptables.rb b/cookbooks/arcgis-notebooks/recipes/iptables.rb index 3f8d5c3..2c4538c 100644 --- a/cookbooks/arcgis-notebooks/recipes/iptables.rb +++ b/cookbooks/arcgis-notebooks/recipes/iptables.rb @@ -32,7 +32,7 @@ execute 'iptables-save > /etc/iptables/rules.v4' do only_if { node['arcgis']['cloud']['provider'] == 'ec2' } end -when 'rhel', 'redhat', 'centos' +when 'rhel', 'redhat', 'centos', 'oracle' execute 'iptables-save > /etc/sysconfig/iptables' do only_if { node['arcgis']['cloud']['provider'] == 'ec2' } end diff --git a/cookbooks/arcgis-notebooks/recipes/uninstall_server_wa.rb b/cookbooks/arcgis-notebooks/recipes/uninstall_server_wa.rb index 88f3d48..6771591 100644 --- a/cookbooks/arcgis-notebooks/recipes/uninstall_server_wa.rb +++ b/cookbooks/arcgis-notebooks/recipes/uninstall_server_wa.rb @@ -23,12 +23,10 @@ run_as_user node['arcgis']['run_as_user'] if node['platform'] == 'windows' product_code Utils.wa_product_code(node['arcgis']['notebook_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]) + node['arcgis']['web_adaptor']['product_codes']) only_if { !Utils.wa_product_code(node['arcgis']['notebook_server']['wa_name'], - [node['arcgis']['web_adaptor']['product_code'], - node['arcgis']['web_adaptor']['product_code2']]).nil? + node['arcgis']['web_adaptor']['product_codes']).nil? } else only_if { diff --git a/cookbooks/arcgis-notebooks/recipes/unregister_server_wa.rb b/cookbooks/arcgis-notebooks/recipes/unregister_server_wa.rb new file mode 100644 index 0000000..d8fcef0 --- /dev/null +++ b/cookbooks/arcgis-notebooks/recipes/unregister_server_wa.rb @@ -0,0 +1,25 @@ +# +# Cookbook Name:: arcgis-notebooks +# Recipe:: unregister_server_wa +# +# Copyright 2021 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. +# + +arcgis_notebooks_server 'Unregister ArcGIS Notebook Server Web Adaptors' do + server_url node['arcgis']['notebook_server']['url'] + username node['arcgis']['notebook_server']['admin_username'] + password node['arcgis']['notebook_server']['admin_password'] + action :unregister_web_adaptors +end diff --git a/cookbooks/arcgis-notebooks/resources/server.rb b/cookbooks/arcgis-notebooks/resources/server.rb index 9394244..b3f0c94 100644 --- a/cookbooks/arcgis-notebooks/resources/server.rb +++ b/cookbooks/arcgis-notebooks/resources/server.rb @@ -19,7 +19,7 @@ actions :system, :unpack, :install, :uninstall, :update_account, :stop, :start, :configure_autostart, :authorize, :post_install, :create_site, :join_site, - :unregister_machine, :set_system_properties + :unregister_machine, :unregister_web_adaptors, :set_system_properties attribute :setup_archive, :kind_of => String attribute :setups_repo, :kind_of => String @@ -396,7 +396,11 @@ def initialize(*args) @new_resource.password) admin_client.wait_until_available - if admin_client.site_exist? + + if admin_client.upgrade_required? + Chef::Log.info('Completing ArcGIS Notebook Server upgrade...') + admin_client.complete_upgrade + elsif admin_client.site_exist? Chef::Log.warn('The machine has already joined an ArcGIS Notebook Server site.') else admin_client.join_site(@new_resource.primary_server_url) @@ -404,23 +408,30 @@ def initialize(*args) end action :unregister_machine do - begin - admin_client = ArcGIS::NotebookServerAdminClient.new(@new_resource.server_url, - @new_resource.username, - @new_resource.password) + admin_client = ArcGIS::NotebookServerAdminClient.new(@new_resource.server_url, + @new_resource.username, + @new_resource.password) - admin_client.wait_until_available + admin_client.wait_until_available - Chef::Log.info('Unregistering server machine...') + Chef::Log.info('Unregistering server machine...') - machine_name = @new_resource.hostname - machine_name = node['fqdn'] if machine_name.empty? + machine_name = @new_resource.hostname + machine_name = node['fqdn'] if machine_name.empty? - admin_client.unregister_machine(machine_name) - rescue Exception => e - Chef::Log.error "Failed to unregister server machine. " + e.message - raise e - end + admin_client.unregister_machine(machine_name) +end + +action :unregister_web_adaptors do + admin_client = ArcGIS::NotebookServerAdminClient.new(@new_resource.server_url, + @new_resource.username, + @new_resource.password) + + admin_client.wait_until_available + + Chef::Log.info('Unregistering ArcGIS Notebook Server Web Adaptors...') + + admin_client.unregister_web_adaptors end action :set_system_properties do diff --git a/cookbooks/arcgis-pro/CHANGELOG.md b/cookbooks/arcgis-pro/CHANGELOG.md index 8b8b248..9bc6f58 100644 --- a/cookbooks/arcgis-pro/CHANGELOG.md +++ b/cookbooks/arcgis-pro/CHANGELOG.md @@ -3,9 +3,14 @@ arcgis-pro cookbook CHANGELOG This file is used to list changes made in each version of the arcgis-pro cookbook. +3.8.0 +----- +- Added support for ArcGIS Pro 2.8/2.9. +- Added ms_dotnet recipe. + 3.7.0 ----- -- Added support for ArcGIS Pro 2.7 +- Added support for ArcGIS Pro 2.7. 3.6.1 ----- diff --git a/cookbooks/arcgis-pro/README.md b/cookbooks/arcgis-pro/README.md index 41c115e..a03d3d1 100644 --- a/cookbooks/arcgis-pro/README.md +++ b/cookbooks/arcgis-pro/README.md @@ -7,6 +7,7 @@ Requirements ------------ ### Supported ArcGIS Pro versions + * 2.0 * 2.1 * 2.2 @@ -15,49 +16,69 @@ Requirements * 2.5 * 2.6 * 2.7 +* 2.8 +* 2.9 ### Platforms + * Windows 10 * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 +* Windows Server 2022 ### Dependencies + The following cookbooks are required: + * windows * arcgis-repository Attributes ---------- -* `node['arcgis']['pro']['version']` = ArcGIS Pro version. Default version is `2.7` +* `node['arcgis']['pro']['version']` = ArcGIS Pro version. Default version is `2.9` * `node['arcgis']['pro']['setup_archive']` = Path to ArcGIS Pro setup archive. Default value depends on `node['arcgis']['pro']['version']` attribute value. * `node['arcgis']['pro']['setup']` = The location of ArcGIS Pro setup msi. Default location is `C:\Temp\ArcGISPro\ArcGISPro.msi`. * `node['arcgis']['pro']['install_dir']` = ArcGIS Pro installation directory. Default installation directory is `%ProgramFiles%\ArcGIS\Pro`. -* `node['arcgis']['pro']['blockaddins']` = Configures the types of Add-ins that ArcGIS Pro will load. Default value is `'#0'`. +* `node['arcgis']['pro']['blockaddins']` = Configures the types of Add-ins that ArcGIS Pro will load. Default value is `'0'`. * `node['arcgis']['pro']['portal_list']` = ArcGIS Portal URLs. Default value is `https://www.arcgis.com/`. -* `node['arcgis']['pro']['allusers']` = Defines installation context of ArcGIS Pro, 1 - per machine and 2 - per user. Default value is '2'. +* `node['arcgis']['pro']['allusers']` = Defines installation context of ArcGIS Pro (1 - per machine, 2 - per user). Default value is '1'. * `node['arcgis']['pro']['software_class']` = ArcGIS Pro software class . Default value is `Viewer`. * `node['arcgis']['pro']['authorization_type']` = ArcGIS Pro authorization_type . Default value is `NAMED_USER`. * `node['arcgis']['pro']['esri_license_host']` = Hostname of ArcGIS License Manager. Default hostname is `%COMPUTERNAME%`. * `node['arcgis']['pro']['authorization_file']` = ArcGIS Pro authorization file path. +* `node['arcgis']['pro']['lock_auth_settings']` = During a silent, per-machine installation of ArcGIS Pro, if the authorization type is defined, this is set to true under HKEY_LOCAL_MACHINE\SOFTWARE\Esri\ArcGISPro\Licensing. When lock_auth_settings is true, the licensing settings in the registry apply to all ArcGIS Pro users on that machine; an individual user cannot make changes. To allow ArcGIS Pro users on the machine to define their own authorization settings through the ArcGIS Pro application, set lock_auth_settings to false. This property does not apply to a per-user installation. The default value is `false`. * `node['arcgis']['repository']['archives']` = Path to folder with ArcGIS software setup archives. Default path is `%USERPROFILE%\Software\Esri`. * `node['arcgis']['repository']['patches']` = Path to folder with hot fixes and patches for ArcGIS Pro software. The default path is `%USERPROFILE%\Software\Esri\Patches`. * `node['arcgis']['patches']['local_patch_folder']` = Path to local folder with hot fixes and patches for ArcGIS Pro software. The default path is `%USERPROFILE%\Software\Esri\Patches`. +* `node['ms_dotnet']['version']` = Microsoft .NET Framework version. The default version is `4.8`. +* `node['ms_dotnet']['setup']` = Microsoft .NET Framework setup path. The default path is `%USERPROFILE%\Software\Esri\ndp48-x86-x64-allos-enu.exe`. +* `node['ms_dotnet']['url']` = Microsoft .NET Framework setup URL. The default URL is `https://go.microsoft.com/fwlink/?linkid=2088631`. Recipes ------- ### arcgis-pro::default + Installs and authorizes ArcGIS Pro. ### arcgis-pro::install_pro + Installs ArcGIS Pro. +### arcgis-pro::ms_dotnet + +Installs Microsoft .NET Framework. + +> If the Microsoft .NET Framework setup is not found at the path specified by `node['ms_dotnet']['setup']` attribute, it is downloaded form the URL specified by `node['ms_dotnet']['url']` attribute. + ### arcgis-pro::uninstall + Uninstalls ArcGIS Pro. ### arcgis-pro::patches + Installs ArcGIS Pro patches. Usage diff --git a/cookbooks/arcgis-pro/attributes/default.rb b/cookbooks/arcgis-pro/attributes/default.rb index de05918..1e89254 100644 --- a/cookbooks/arcgis-pro/attributes/default.rb +++ b/cookbooks/arcgis-pro/attributes/default.rb @@ -21,23 +21,39 @@ default['arcgis']['pro'].tap do |pro| case node['platform'] when 'windows' - pro['version'] = '2.7' + pro['version'] = '2.9' pro['setup'] = ::File.join(node['arcgis']['repository']['setups'], 'ArcGIS Pro ' + node['arcgis']['pro']['version'], 'ArcGISPro', 'ArcGISPro.msi').gsub('/', '\\') - pro['install_dir'] = ENV['ProgramW6432'] + '\\ArcGIS\\Pro' - pro['blockaddins'] = '#0' + pro['blockaddins'] = '0' pro['portal_list'] = 'https://www.arcgis.com/' - pro['allusers'] = 2 + pro['allusers'] = 1 pro['software_class'] = 'Viewer' pro['authorization_type'] = 'NAMED_USER' pro['esri_license_host'] = ENV['COMPUTERNAME'] pro['authorization_file'] = '' pro['authorization_tool'] = ENV['ProgramW6432'] + '\\ArcGIS\\Pro\\bin\\SoftwareAuthorizationPro.exe' + pro['lock_auth_settings'] = false + + pro['install_dir'] = if node['arcgis']['pro']['allusers'] == 2 + ENV['USERPROFILE'] + '\\ArcGIS\\Pro' + else + ENV['ProgramW6432'] + '\\ArcGIS\\Pro' + end + + default['ms_dotnet']['version'] = '4.8' case node['arcgis']['pro']['version'] + when '2.9' + pro['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGISPro_29_179927.exe').gsub('/', '\\') + pro['product_code'] = '{AD53732E-507C-4A7F-B451-BE7EA01D0832}' + when '2.8' + pro['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGISPro_28_177688.exe').gsub('/', '\\') + pro['product_code'] = '{26C745E6-B3C1-467B-9523-727D1803EE07}' when '2.7' pro['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], 'ArcGISPro_27_176624.exe').gsub('/', '\\') @@ -75,6 +91,15 @@ end pro['authorization_file_version'] = node['arcgis']['pro']['version'].to_f.to_s + + case node['ms_dotnet']['version'] + when '4.8' + default['ms_dotnet']['url'] = 'https://go.microsoft.com/fwlink/?linkid=2088631' + default['ms_dotnet']['setup'] = ::File.join(node['arcgis']['repository']['archives'], + 'ndp48-x86-x64-allos-enu.exe').gsub('/', '\\') + else + Chef::Log.warn 'Unsupported Microsoft .NET version' + end else Chef::Log.warn "ArcGIS Pro is not supported on #{node['platform']} platform." end diff --git a/cookbooks/arcgis-pro/metadata.rb b/cookbooks/arcgis-pro/metadata.rb index 0a4e303..b94f478 100644 --- a/cookbooks/arcgis-pro/metadata.rb +++ b/cookbooks/arcgis-pro/metadata.rb @@ -4,16 +4,17 @@ license 'Apache 2.0' description 'Installs and configures ArcGIS Pro' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-repository', '~> 3.8' depends 'windows', '~> 5.3' supports 'windows' recipe 'arcgis-pro::default', 'Installs and authorizes ArcGIS Pro' recipe 'arcgis-pro::install_pro', 'Installs ArcGIS Pro' +recipe 'arcgis-pro::ms_dotnet', 'Installs Microsoft .NET Framework' recipe 'arcgis-pro::uninstall', 'Uninstalls ArcGIS Pro' recipe 'arcgis-pro::patches', 'Installs ArcGIS Pro Patches' diff --git a/cookbooks/arcgis-pro/providers/pro.rb b/cookbooks/arcgis-pro/providers/pro.rb index b09a7b4..929cbad 100644 --- a/cookbooks/arcgis-pro/providers/pro.rb +++ b/cookbooks/arcgis-pro/providers/pro.rb @@ -40,16 +40,18 @@ action :install do cmd = node['arcgis']['pro']['setup'] + lock_auth_settings = node['arcgis']['pro']['lock_auth_settings'] ? 'True' : 'False'; + if node['arcgis']['pro']['authorization_type'] == 'NAMED_USER' - args = "ALLUSERS=#{node['arcgis']['pro']['allusers']} BLOCKADDINS=#{node['arcgis']['pro']['blockaddins']} INSTALLDIR=\"#{node['arcgis']['pro']['install_dir']}\" /qn ACCEPTEULA=Yes" + args = "LOCK_AUTH_SETTINGS=#{lock_auth_settings} ALLUSERS=#{node['arcgis']['pro']['allusers']} BLOCKADDINS=#{node['arcgis']['pro']['blockaddins']} INSTALLDIR=\"#{node['arcgis']['pro']['install_dir']}\" /qn ACCEPTEULA=Yes" end if node['arcgis']['pro']['authorization_type'] == 'SINGLE_USE' - args = "ALLUSERS=#{node['arcgis']['pro']['allusers']} Portal_List=#{node['arcgis']['pro']['portal_list']} AUTHORIZATION_TYPE=#{node['arcgis']['pro']['authorization_type']} SOFTWARE_CLASS=#{node['arcgis']['pro']['software_class']} BLOCKADDINS=#{node['arcgis']['pro']['blockaddins']} INSTALLDIR=\"#{node['arcgis']['pro']['install_dir']}\" /qn ACCEPTEULA=Yes" + args = "LOCK_AUTH_SETTINGS=#{lock_auth_settings} ALLUSERS=#{node['arcgis']['pro']['allusers']} Portal_List=#{node['arcgis']['pro']['portal_list']} AUTHORIZATION_TYPE=#{node['arcgis']['pro']['authorization_type']} SOFTWARE_CLASS=#{node['arcgis']['pro']['software_class']} BLOCKADDINS=#{node['arcgis']['pro']['blockaddins']} INSTALLDIR=\"#{node['arcgis']['pro']['install_dir']}\" /qn ACCEPTEULA=Yes" end if node['arcgis']['pro']['authorization_type'] == 'CONCURRENT_USE' - args = "ALLUSERS=#{node['arcgis']['pro']['allusers']} Portal_List=#{node['arcgis']['pro']['portal_list']} ESRI_LICENSE_HOST=#{node['arcgis']['pro']['esri_license_host']} AUTHORIZATION_TYPE=#{node['arcgis']['pro']['authorization_type']} SOFTWARE_CLASS=#{node['arcgis']['pro']['software_class']} BLOCKADDINS=#{node['arcgis']['pro']['blockaddins']} INSTALLDIR=\"#{node['arcgis']['pro']['install_dir']}\" /qn ACCEPTEULA=Yes" + args = "LOCK_AUTH_SETTINGS=#{lock_auth_settings} ALLUSERS=#{node['arcgis']['pro']['allusers']} Portal_List=#{node['arcgis']['pro']['portal_list']} ESRI_LICENSE_HOST=#{node['arcgis']['pro']['esri_license_host']} AUTHORIZATION_TYPE=#{node['arcgis']['pro']['authorization_type']} SOFTWARE_CLASS=#{node['arcgis']['pro']['software_class']} BLOCKADDINS=#{node['arcgis']['pro']['blockaddins']} INSTALLDIR=\"#{node['arcgis']['pro']['install_dir']}\" /qn ACCEPTEULA=Yes" end cmd = Mixlib::ShellOut.new("msiexec.exe /i \"#{cmd}\" #{args}", diff --git a/cookbooks/arcgis-pro/recipes/ms_dotnet.rb b/cookbooks/arcgis-pro/recipes/ms_dotnet.rb new file mode 100644 index 0000000..b914456 --- /dev/null +++ b/cookbooks/arcgis-pro/recipes/ms_dotnet.rb @@ -0,0 +1,36 @@ +# +# Cookbook Name:: arcgis-pro +# Recipe:: ms_dotnet +# +# Copyright 2021 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. + +directory ::File.expand_path("..", node['ms_dotnet']['setup']) do + recursive true + not_if { ::File.exist?(node['ms_dotnet']['setup']) } + action :create +end + +remote_file 'Download Microsoft .NET Framework' do + path node['ms_dotnet']['setup'] + source node['ms_dotnet']['url'] + not_if { ::File.exist?(node['ms_dotnet']['setup']) } +end + +windows_package 'Install Microsoft .NET Framework' do + source node['ms_dotnet']['setup'] + installer_type :custom + options '/q /norestart' + returns [0, 3010] +end diff --git a/cookbooks/arcgis-repository/License.txt b/cookbooks/arcgis-repository/License.txt new file mode 100644 index 0000000..863d150 --- /dev/null +++ b/cookbooks/arcgis-repository/License.txt @@ -0,0 +1,101 @@ +Apache License - 2.0 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to +compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work +or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual +or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are +necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You +under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, +and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a + readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the + Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever + such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. + You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, + provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to + Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your + modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You +to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, +nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for +determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under +this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, +including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the +use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting +such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/cookbooks/arcgis-repository/README.md b/cookbooks/arcgis-repository/README.md index 680ca19..97f9b9d 100644 --- a/cookbooks/arcgis-repository/README.md +++ b/cookbooks/arcgis-repository/README.md @@ -13,6 +13,7 @@ Requirements * 10.8 * 10.8.1 * 10.9 +* 10.9.1 ### Platforms @@ -22,8 +23,12 @@ Requirements * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 -* Ubuntu 14.04, 16.04, 18.04 -* Rhel 6.5, 7.0 +* Windows Server 2022 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 ### Dependencies diff --git a/cookbooks/arcgis-repository/metadata.rb b/cookbooks/arcgis-repository/metadata.rb index 97c58ba..b59f929 100644 --- a/cookbooks/arcgis-repository/metadata.rb +++ b/cookbooks/arcgis-repository/metadata.rb @@ -4,14 +4,17 @@ license 'Apache-2.0' description 'Downloads ArcGIS software setups from remote to local repositories' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version depends 's3_file', '~> 2.8' supports 'windows' supports 'ubuntu' +supports 'oracle' supports 'redhat' +supports 'centos' +supports 'suse' recipe 'arcgis-repository::default', 'Downloads files from remote ArcGIS software repository to local repository.' recipe 'arcgis-repository::s3files', 'Downloads files from ArcGIS software repository in S3 to local repository.' diff --git a/cookbooks/arcgis-workflow-manager/.gitignore b/cookbooks/arcgis-workflow-manager/.gitignore new file mode 100644 index 0000000..13e41c4 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/.gitignore @@ -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 diff --git a/cookbooks/arcgis-workflow-manager/Berksfile b/cookbooks/arcgis-workflow-manager/Berksfile new file mode 100644 index 0000000..0656a99 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/Berksfile @@ -0,0 +1,4 @@ +# frozen_string_literal: true +source 'https://supermarket.chef.io' + +metadata diff --git a/cookbooks/arcgis-workflow-manager/CHANGELOG.md b/cookbooks/arcgis-workflow-manager/CHANGELOG.md new file mode 100644 index 0000000..1d76875 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/CHANGELOG.md @@ -0,0 +1,7 @@ +# arcgis-workflow-manager CHANGELOG + +This file is used to list changes made in each version of the arcgis-workflow-manager cookbook. + +# 3.8.0 + +Initial release of the cookbook. diff --git a/cookbooks/arcgis-workflow-manager/License.txt b/cookbooks/arcgis-workflow-manager/License.txt new file mode 100644 index 0000000..863d150 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/License.txt @@ -0,0 +1,101 @@ +Apache License - 2.0 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to +compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work +or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual +or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are +necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You +under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, +and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a + readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the + Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever + such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. + You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, + provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to + Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your + modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You +to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, +nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for +determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under +this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, +including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the +use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting +such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/cookbooks/arcgis-workflow-manager/README.md b/cookbooks/arcgis-workflow-manager/README.md new file mode 100644 index 0000000..6f9a81d --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/README.md @@ -0,0 +1,102 @@ +# arcgis-workflow-manager cookbook + +This cookbook installs and configures ArcGIS Workflow Manager Server and Web App. + +## Requirements + +### Supported ArcGIS Workflow Manager Server versions + +* 10.8.1 +* 10.9 +* 10.9.1 + +### Supported ArcGIS software + +* ArcGIS Workflow Manager Server +* ArcGIS Workflow Manager Web App + +### Platforms + +* Microsoft Windows Server 2019 Standard and Datacenter +* Microsoft Windows Server 2022 Standard and Datacenter +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 + +### Dependencies + +The following cookbooks are required: + +* arcgis-enterprise +* arcgis-repository + +Attributes +---------- + +* `node['arcgis']['workflow_manager_server']['setup_archive']` = Path to ArcGIS Workflow Manager Server setup archive. Default value depends on `node['arcgis']['version']` attribute value. +* `node['arcgis']['workflow_manager_server']['setup']` = The location of ArcGIS Workflow Manager Server setup executable. Default location is `%USERPROFILE%\Documents\ArcGIS10.9\WorkflowManagerServer\Setup.exe` on Windows and `/opt/arcgis/10.9/WorkflowManagerServer/Setup.sh` on Linux. +* `node['arcgis']['workflow_manager_server']['authorization_file']` = ArcGIS Workflow Manager Server authorization file path. Default value is set to the value of `node['arcgis']['server']['authorization_file']` +* `node['arcgis']['workflow_manager_server']['authorization_file_version']` = ArcGIS Workflow Manager Server authorization file version. Default value is `node['arcgis']['server']['authorization_file_version']`. +* `node['arcgis']['workflow_manager_server']['ports']` = Ports used by ArcGIS Workflow Manager Server. Default ports are `9830,9820,9840,9880,13443`. + +Recipes +------- + +### arcgis-workflow-manager::default + +Installs and authorizes ArcGIS Workflow Manager Server. + +### arcgis-workflow-manager::federation + +Federates ArcGIS Workflow Manager Server and enables Workflow Manager server function. + +### arcgis-workflow-manager::install_server + +Installs ArcGIS Workflow Manager Server. + +### arcgis-workflow-manager::install_webapp + +Installs ArcGIS Workflow Manager Web App. + +### arcgis-workflow-manager::server + +Installs and authorizes ArcGIS Workflow Manager Server. + +### arcgis-workflow-manager::uninstall_server + +Uninstalls ArcGIS Workflow Manager Server. + +### arcgis-workflow-manager::uninstall_webapp + +Uninstalls ArcGIS Workflow Manager Web App. + +## Issues + +Find a bug or want to request a new feature? Please let us know by submitting an [issue](https://github.com/Esri/arcgis-cookbook/issues). + +## Contributing + +Esri welcomes contributions from anyone and everyone. Please see our [guidelines for contributing](https://github.com/esri/contributing). + +Licensing +--------- + +Copyright 2021 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. + +A copy of the license is available in the repository's [License.txt](https://github.com/Esri/arcgis-cookbook/blob/master/License.txt?raw=true) file. + +[](Esri Tags: ArcGIS Enterprise Workflow Server Chef Cookbook) +[](Esri Language: Ruby) diff --git a/cookbooks/arcgis-workflow-manager/attributes/server.rb b/cookbooks/arcgis-workflow-manager/attributes/server.rb new file mode 100644 index 0000000..50c1f2b --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/attributes/server.rb @@ -0,0 +1,69 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Attributes:: server +# +# Copyright 2021 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']['workflow_manager_server'].tap do |server| + server['authorization_file'] = node['arcgis']['server']['authorization_file'] + server['authorization_file_version'] = node['arcgis']['server']['authorization_file_version'] + unless node['arcgis']['workflow_manager_server']['authorization_file'].nil? + server['cached_authorization_file'] = ::File.join(Chef::Config[:file_cache_path], + ::File.basename(node['arcgis']['workflow_manager_server']['authorization_file'])) + end + + server['ports'] = '9830,9820,9840,9880,13443' + + case node['platform'] + when 'windows' + server['setup'] = ::File.join(node['arcgis']['repository']['setups'], + 'ArcGIS ' + node['arcgis']['version'], + 'WorkflowManagerServer', 'Setup.exe') + + case node['arcgis']['version'] + when '10.9.1' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_Server_1091_180100.exe').gsub('/', '\\') + server['product_code'] = '{9EF4FCC5-64EE-4719-B050-41E5AB85857B}' + when '10.9' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_Server_109_177832.exe').gsub('/', '\\') + server['product_code'] = '{80C5D637-B20F-4D11-882C-33C17918EF0E}' + when '10.8.1' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_Server_1081_175261.exe').gsub('/', '\\') + server['product_code'] = '{C0F0FCAB-2B65-4B8E-8614-531690B7CF9C}' + else + Chef::Log.warn 'Unsupported ArcGIS Workflow Manager Server version' + end + else # node['platform'] == 'linux' + server['setup'] = ::File.join(node['arcgis']['repository']['setups'], + node['arcgis']['version'], + 'WorkflowManagerServer', 'Setup.sh') + case node['arcgis']['version'] + when '10.9.1' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_Server_1091_180228.tar.gz') + when '10.9' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_Server_109_177910.tar.gz') + when '10.8.1' + server['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_Server_1081_175335.tar.gz') + else + Chef::Log.warn 'Unsupported ArcGIS Workflow Manager Server version' + end + end +end diff --git a/cookbooks/arcgis-workflow-manager/attributes/webapp.rb b/cookbooks/arcgis-workflow-manager/attributes/webapp.rb new file mode 100644 index 0000000..587977a --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/attributes/webapp.rb @@ -0,0 +1,49 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Attributes:: webapp +# +# Copyright 2021 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']['workflow_manager_webapp'].tap do |webapp| + case node['platform'] + when 'windows' + webapp['setup'] = ::File.join(node['arcgis']['repository']['setups'], + 'ArcGIS ' + node['arcgis']['version'], + 'WorkflowManagerWebApp', 'Setup.exe') + + case node['arcgis']['version'] + when '10.9' + webapp['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_WebApp_109_177833.exe').gsub('/', '\\') + webapp['product_code'] = '{28F45C9F-9581-4F82-9377-5B165D0D8580}' + when '10.8.1' + webapp['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_WebApp_1081_175262.exe').gsub('/', '\\') + webapp['product_code'] = '{96A58AC8-C040-4E4A-A118-BE963BF1A8CF}' + end + else # node['platform'] == 'linux' + webapp['setup'] = ::File.join(node['arcgis']['repository']['setups'], + node['arcgis']['version'], + 'WorkflowManagerWebApp', 'Setup.sh') + case node['arcgis']['version'] + when '10.9' + webapp['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_WebApp_109_178649.tar.gz') + when '10.8.1' + webapp['setup_archive'] = ::File.join(node['arcgis']['repository']['archives'], + 'ArcGIS_Workflow_Manager_WebApp_1081_175336.tar.gz') + end + end +end diff --git a/cookbooks/arcgis-workflow-manager/chefignore b/cookbooks/arcgis-workflow-manager/chefignore new file mode 100644 index 0000000..4439807 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/chefignore @@ -0,0 +1,104 @@ +# Put files/directories that should be ignored in this file when uploading +# to a chef-server or supermarket. +# Lines that start with '# ' are comments. + +# OS generated files # +###################### +.DS_Store +Icon? +nohup.out +ehthumbs.db +Thumbs.db + +# SASS # +######## +.sass-cache + +# EDITORS # +########### +\#* +.#* +*~ +*.sw[a-z] +*.bak +REVISION +TAGS* +tmtags +*_flymake.* +*_flymake +*.tmproj +.project +.settings +mkmf.log + +## COMPILED ## +############## +a.out +*.o +*.pyc +*.so +*.com +*.class +*.dll +*.exe +*/rdoc/ + +# Testing # +########### +.watchr +.rspec +spec/* +spec/fixtures/* +test/* +features/* +examples/* +Guardfile +Procfile +.kitchen* +kitchen.yml* +.rubocop.yml +spec/* +Rakefile +.travis.yml +.foodcritic +.codeclimate.yml + +# SCM # +####### +.git +*/.git +.gitignore +.gitmodules +.gitconfig +.gitattributes +.svn +*/.bzr/* +*/.hg/* +*/.svn/* + +# Berkshelf # +############# +Berksfile +Berksfile.lock +cookbooks/* +tmp + +# Bundler # +########### +vendor/* + +# Policyfile # +############## +Policyfile.rb +Policyfile.lock.json + +# Cookbooks # +############# +CONTRIBUTING* +CHANGELOG* +TESTING* + +# Vagrant # +########### +.vagrant +Vagrantfile diff --git a/cookbooks/arcgis-workflow-manager/metadata.rb b/cookbooks/arcgis-workflow-manager/metadata.rb new file mode 100644 index 0000000..50bc8b9 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/metadata.rb @@ -0,0 +1,29 @@ +name 'arcgis-workflow-manager' +maintainer 'Esri' +maintainer_email 'contracts@esri.com' +license 'Apache-2.0' +description 'Installs/Configures ArcGIS Workflow Manager Server and Web App' +long_description 'Installs/Configures ArcGIS Workflow Manager Server and Web App' +version '3.8.0' +chef_version '>= 13.0' + +depends 'arcgis-enterprise', '~> 3.8' +depends 'arcgis-repository', '~> 3.8' + +supports 'windows' +supports 'ubuntu' +supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' + +recipe 'arcgis-workflow-manager::default', 'Installs and authorizes ArcGIS Workflow Manager Server' +recipe 'arcgis-workflow-manager::federation', 'Federates ArcGIS Workflow Manager Server and enables Workflow Manager server function' +recipe 'arcgis-workflow-manager::install_server', 'Installs ArcGIS Workflow Manager Server' +recipe 'arcgis-workflow-manager::install_webapp', 'Installs ArcGIS Workflow Manager Web App' +recipe 'arcgis-workflow-manager::server', 'Installs and authorizes ArcGIS Workflow Manager Server' +recipe 'arcgis-workflow-manager::uninstall_server', 'Uninstalls ArcGIS Workflow Manager Server' +recipe 'arcgis-workflow-manager::uninstall_webapp', 'Uninstalls ArcGIS Workflow Manager Web App' + +issues_url 'https://github.com/Esri/arcgis-cookbook/issues' if respond_to?(:issues_url) +source_url 'https://github.com/Esri/arcgis-cookbook' if respond_to?(:source_url) diff --git a/cookbooks/arcgis-workflow-manager/recipes/default.rb b/cookbooks/arcgis-workflow-manager/recipes/default.rb new file mode 100644 index 0000000..7b5c42d --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/default.rb @@ -0,0 +1,20 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: default +# +# Copyright 2021 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. +# + +include_recipe 'arcgis-workflow-manager::server' diff --git a/cookbooks/arcgis-workflow-manager/recipes/federation.rb b/cookbooks/arcgis-workflow-manager/recipes/federation.rb new file mode 100644 index 0000000..28fa2c9 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/federation.rb @@ -0,0 +1,59 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: federation +# +# Copyright 2021 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. +# + +# Import public key of ArcGIS Workflow Manager Server SSL certificate into portal +# as root/intermediate certificate. +arcgis_enterprise_portal 'Import Root Certificates' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + root_cert node['arcgis']['portal']['root_cert'] + root_cert_alias node['arcgis']['portal']['root_cert_alias'] + not_if { node['arcgis']['portal']['root_cert'].empty? || + node['arcgis']['portal']['root_cert_alias'].empty?} + retries 5 + retry_delay 30 + action :import_root_cert +end + +arcgis_enterprise_portal 'Federate Workflow Manager Server' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + server_url node['arcgis']['server']['web_context_url'] + server_admin_url node['arcgis']['server']['private_url'] + server_username node['arcgis']['server']['admin_username'] + server_password node['arcgis']['server']['admin_password'] + retries 5 + retry_delay 30 + action :federate_server +end + +arcgis_enterprise_portal 'Enable Workflow Manager server function' do + portal_url node['arcgis']['portal']['private_url'] + username node['arcgis']['portal']['admin_username'] + password node['arcgis']['portal']['admin_password'] + server_url node['arcgis']['server']['web_context_url'] + server_admin_url node['arcgis']['server']['private_url'] + server_username node['arcgis']['server']['admin_username'] + server_password node['arcgis']['server']['admin_password'] + server_function 'WorkflowManager' + is_hosting node['arcgis']['server']['is_hosting'] + action :enable_server_function +end diff --git a/cookbooks/arcgis-workflow-manager/recipes/install_server.rb b/cookbooks/arcgis-workflow-manager/recipes/install_server.rb new file mode 100644 index 0000000..c50542c --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/install_server.rb @@ -0,0 +1,67 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: install_server +# +# Copyright 2021 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. +# + +arcgis_workflow_manager_server "Install ArcGIS Workflow Manager Server system requirements" do + ports node['arcgis']['workflow_manager_server']['ports'] + only_if { node['arcgis']['server']['install_system_requirements'] } + action :system +end + +arcgis_workflow_manager_server 'Unpack ArcGIS Workflow Manager Server Setup' do + setup_archive node['arcgis']['workflow_manager_server']['setup_archive'] + setups_repo node['arcgis']['repository']['setups'] + run_as_user node['arcgis']['run_as_user'] + only_if { ::File.exist?(node['arcgis']['workflow_manager_server']['setup_archive']) && + !::File.exist?(node['arcgis']['workflow_manager_server']['setup']) } + if node['platform'] == 'windows' + not_if { Utils.product_installed?(node['arcgis']['workflow_manager_server']['product_code']) } + else + not_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'], + node['hostname'], + node['arcgis']['version'], + :ArcWorkflowManager) } + end + action :unpack +end + +arcgis_workflow_manager_server 'Setup ArcGIS Workflow Manager Server' do + setup node['arcgis']['workflow_manager_server']['setup'] + install_dir node['arcgis']['server']['install_dir'] + run_as_user node['arcgis']['run_as_user'] + run_as_password node['arcgis']['run_as_password'] + run_as_msa node['arcgis']['run_as_msa'] + if node['platform'] == 'windows' + not_if { Utils.product_installed?(node['arcgis']['workflow_manager_server']['product_code']) } + else + not_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'], + node['hostname'], + node['arcgis']['version'], + :ArcWorkflowManager) } + end + action :install +end + +arcgis_workflow_manager_server 'Configure workflowmanager service' do + install_dir node['arcgis']['server']['install_dir'] + action :configure_autostart +end + +arcgis_workflow_manager_server 'Start ArcGIS Workflow Manager Server' do + action :start +end diff --git a/cookbooks/arcgis-workflow-manager/recipes/install_webapp.rb b/cookbooks/arcgis-workflow-manager/recipes/install_webapp.rb new file mode 100644 index 0000000..f4410c1 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/install_webapp.rb @@ -0,0 +1,53 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: install_webapp +# +# Copyright 2021 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. +# + +arcgis_workflow_manager_webapp 'Unpack ArcGIS Workflow Manager Web App Setup' do + setup_archive node['arcgis']['workflow_manager_webapp']['setup_archive'] + setups_repo node['arcgis']['repository']['setups'] + run_as_user node['arcgis']['run_as_user'] + only_if { ::File.exist?(node['arcgis']['workflow_manager_webapp']['setup_archive']) && + !::File.exist?(node['arcgis']['workflow_manager_webapp']['setup']) } + if node['platform'] == 'windows' + not_if { Utils.product_installed?(node['arcgis']['workflow_manager_webapp']['product_code']) } + else + not_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'], + node['hostname'], + node['arcgis']['version'], + :ArcWorkflowManagerWebApp) } + end + action :unpack + end + + arcgis_workflow_manager_server 'Setup ArcGIS Workflow Manager Web App' do + setup node['arcgis']['workflow_manager_webapp']['setup'] + install_dir node['arcgis']['workflow_manager_webapp']['install_dir'] + run_as_user node['arcgis']['run_as_user'] + run_as_password node['arcgis']['run_as_password'] + run_as_msa node['arcgis']['run_as_msa'] + if node['platform'] == 'windows' + not_if { Utils.product_installed?(node['arcgis']['workflow_manager_webapp']['product_code']) } + else + not_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'], + node['hostname'], + node['arcgis']['version'], + :ArcWorkflowManagerWebApp) } + end + action :install + end + \ No newline at end of file diff --git a/cookbooks/arcgis-workflow-manager/recipes/server.rb b/cookbooks/arcgis-workflow-manager/recipes/server.rb new file mode 100644 index 0000000..818b029 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/server.rb @@ -0,0 +1,32 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: server +# +# Copyright 2021 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. +# + +include_recipe 'arcgis-workflow-manager::install_server' + +arcgis_workflow_manager_server 'Authorize ArcGIS Workflow Manager Server' do + authorization_file node['arcgis']['workflow_manager_server']['authorization_file'] + authorization_file_version node['arcgis']['workflow_manager_server']['authorization_file_version'] + retries 5 + retry_delay 60 + not_if { node['arcgis']['workflow_manager_server']['authorization_file'] == '' || + ::File.exists?(node['arcgis']['workflow_manager_server']['cached_authorization_file']) && + FileUtils.compare_file(node['arcgis']['workflow_manager_server']['authorization_file'], + node['arcgis']['workflow_manager_server']['cached_authorization_file']) } + action :authorize +end diff --git a/cookbooks/arcgis-workflow-manager/recipes/uninstall_server.rb b/cookbooks/arcgis-workflow-manager/recipes/uninstall_server.rb new file mode 100644 index 0000000..3b8c068 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/uninstall_server.rb @@ -0,0 +1,37 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: uninstall_server +# +# Copyright 2021 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. +# + +arcgis_workflow_manager_server 'Stop ArcGIS Workflow Manager Server' do + action :stop +end + +arcgis_workflow_manager_server 'Uninstall ArcGIS Workflow Manager Server' do + install_dir node['arcgis']['server']['install_dir'] + run_as_user node['arcgis']['run_as_user'] + if node['platform'] == 'windows' + product_code node['arcgis']['workflow_manager_server']['product_code'] + only_if { Utils.product_installed?(node['arcgis']['workflow_manager_server']['product_code']) } + else + only_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'], + node['hostname'], + node['arcgis']['version'], + :ArcWorkflowManager) } + end + action :uninstall +end diff --git a/cookbooks/arcgis-workflow-manager/recipes/uninstall_webapp.rb b/cookbooks/arcgis-workflow-manager/recipes/uninstall_webapp.rb new file mode 100644 index 0000000..b35faf2 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/recipes/uninstall_webapp.rb @@ -0,0 +1,34 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Recipe:: uninstall_webapp +# +# Copyright 2021 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. +# + +arcgis_workflow_manager_webapp 'Uninstall ArcGIS Workflow Manager Web App' do + install_dir node['arcgis']['portal']['install_dir'] + run_as_user node['arcgis']['run_as_user'] + if node['platform'] == 'windows' + product_code node['arcgis']['workflow_manager_webapp']['product_code'] + only_if { Utils.product_installed?(node['arcgis']['workflow_manager_webapp']['product_code']) } + else + only_if { EsriProperties.product_installed?(node['arcgis']['run_as_user'], + node['hostname'], + node['arcgis']['version'], + :ArcWorkflowManagerWebApp) } + end + action :uninstall +end + \ No newline at end of file diff --git a/cookbooks/arcgis-workflow-manager/resources/server.rb b/cookbooks/arcgis-workflow-manager/resources/server.rb new file mode 100644 index 0000000..a05474b --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/resources/server.rb @@ -0,0 +1,232 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Resource:: server +# +# Copyright 2021 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. +# + +actions :system, :unpack, :install, :uninstall, :authorize, + :configure_autostart, :stop, :start + +attribute :install_dir, :kind_of => String +attribute :setup_archive, :kind_of => String +attribute :setups_repo, :kind_of => String +attribute :setup, :kind_of => String +attribute :run_as_user, :kind_of => String +attribute :run_as_password, :kind_of => String +attribute :run_as_msa, :kind_of => [TrueClass, FalseClass], :default => false +attribute :authorization_file, :kind_of => String +attribute :authorization_file_version, :kind_of => String +attribute :product_code, :kind_of => String +attribute :ports, :kind_of => String + +def initialize(*args) + super + @action = :install +end + +use_inline_resources if defined?(use_inline_resources) + +action :system do + ports = @new_resource.ports + case node['platform'] + when 'windows' + # Configure Windows firewall + windows_firewall_rule 'ArcGIS Workflow Manager Server' do + description 'Allows connections through ports used by ArcGIS Workflow Manager Server' + local_port ports + protocol 'TCP' + firewall_action :allow + only_if { node['arcgis']['configure_windows_firewall'] } + end + end + 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 +end + +action :install do + unless ::File.exist?(@new_resource.setup) + raise "File '#{@new_resource.setup}' not found." + end + + if node['platform'] == 'windows' + cmd = @new_resource.setup + + password = if @new_resource.run_as_msa + 'MSA=\"True\"' + else + "PASSWORD=\"#{@new_resource.run_as_password}\"" + end + + args = "/qn ACCEPTEULA=Yes #{password}" + + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600 }) + cmd.run_command + cmd.error! + else + cmd = @new_resource.setup + args = "-m silent -l yes" + run_as_user = @new_resource.run_as_user + + if node['arcgis']['run_as_superuser'] + cmd = Mixlib::ShellOut.new("su - #{run_as_user} -c \"#{cmd} #{args}\"", { :timeout => 3600 }) + else + cmd = Mixlib::ShellOut.new("#{cmd} #{args}", { :user => run_as_user, :timeout => 3600 }) + end + + cmd.run_command + cmd.error! + end +end + +action :uninstall do + if node['platform'] == 'windows' + cmd = 'msiexec' + args = "/qn /x #{@new_resource.product_code}" + + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600 }) + cmd.run_command + cmd.error! + else + install_subdir = ::File.join(@new_resource.install_dir, + node['arcgis']['server']['install_subdir']) + cmd = ::File.join(install_subdir, 'uninstall_WorkflowManager.sh') + + cmd = Mixlib::ShellOut.new("su - #{@new_resource.run_as_user} -c \"#{cmd}\"", + { :timeout => 3600 }) + cmd.run_command + cmd.error! + end +end + +action :authorize do + if !@new_resource.authorization_file.nil? && !@new_resource.authorization_file.empty? + unless ::File.exists?(@new_resource.authorization_file) + raise "File '#{@new_resource.authorization_file}' not found." + end + + cmd = node['arcgis']['server']['authorization_tool'] + + if node['platform'] == 'windows' + args = "/VER #{@new_resource.authorization_file_version} /LIF \"#{@new_resource.authorization_file}\" /S" + + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 600 }) + cmd.run_command + cmd.error! + else + args = "-f \"#{@new_resource.authorization_file}\"" + + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", + { :timeout => 600, :user => node['arcgis']['run_as_user'] }) + cmd.run_command + cmd.error! + end + + new_resource.updated_by_last_action(true) + end +end + +action :configure_autostart do + if node['platform'] == 'windows' + service 'WorkflowManager' do + action :enable + end + else + Chef::Log.info('Configure ArcGIS Workflow Manager Server to be started with the operating system.') + agsuser = node['arcgis']['run_as_user'] + agshome = ::File.join(@new_resource.install_dir, + node['arcgis']['server']['install_subdir']) + + if node['init_package'] == 'systemd' + workflowmanager_path = '/etc/systemd/system/workflowmanager.service' + service_file = 'workflowmanager.service.erb' + template_variables = { :agshome => agshome, :agsuser => agsuser } + else + raise 'System not supported.' + end + + template workflowmanager_path do + source service_file + cookbook 'arcgis-workflow-manager' + variables template_variables + owner 'root' + group 'root' + mode '0755' + notifies :run, 'execute[Load systemd unit file]', :immediately + end + + execute 'Load systemd unit file' do + command 'systemctl daemon-reload' + action :nothing + only_if { node['init_package'] == 'systemd' } + notifies :restart, 'service[workflowmanager]', :immediately + end + + service 'workflowmanager' do + supports :status => true, :restart => true, :reload => true + action :enable + retries 5 + retry_delay 60 + end + end +end + +action :stop do + if node['platform'] == 'windows' + service "WorkflowManager" do + supports :status => true, :restart => true, :reload => true + action :stop + end + else + service "workflowmanager" do + supports :status => true, :restart => true, :reload => true + action :stop + end + end +end + +action :start do + if node['platform'] == 'windows' + service "WorkflowManager" do + supports :status => true, :restart => true, :reload => true + timeout 180 + action [:enable, :start] + end + else + service "workflowmanager" do + supports :status => true, :restart => true, :reload => true + action [:enable, :start] + end + end +end diff --git a/cookbooks/arcgis-workflow-manager/resources/webapp.rb b/cookbooks/arcgis-workflow-manager/resources/webapp.rb new file mode 100644 index 0000000..0887986 --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/resources/webapp.rb @@ -0,0 +1,103 @@ +# +# Cookbook Name:: arcgis-workflow-manager +# Resource:: webapp +# +# Copyright 2021 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. +# + +actions :unpack, :install, :uninstall + +attribute :install_dir, :kind_of => String +attribute :setup_archive, :kind_of => String +attribute :setups_repo, :kind_of => String +attribute :setup, :kind_of => String +attribute :run_as_user, :kind_of => String +attribute :product_code, :kind_of => String + +def initialize(*args) + super + @action = :install +end + +use_inline_resources if defined?(use_inline_resources) + +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 +end + +action :install do + unless ::File.exists?(@new_resource.setup) + raise "File '#{@new_resource.setup}' not found." + end + + if node['platform'] == 'windows' + cmd = @new_resource.setup + + args = "/qn ACCEPTEULA=Yes" + + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600 }) + cmd.run_command + cmd.error! + else + cmd = @new_resource.setup + args = "-m silent -l yes" + run_as_user = @new_resource.run_as_user + + if node['arcgis']['run_as_superuser'] + cmd = Mixlib::ShellOut.new("su - #{run_as_user} -c \"#{cmd} #{args}\"", { :timeout => 3600 }) + else + cmd = Mixlib::ShellOut.new("#{cmd} #{args}", { :user => run_as_user, :timeout => 3600 }) + end + + cmd.run_command + cmd.error! + end +end + +action :uninstall do + if node['platform'] == 'windows' + cmd = 'msiexec' + args = "/qn /x #{@new_resource.product_code}" + + cmd = Mixlib::ShellOut.new("\"#{cmd}\" #{args}", { :timeout => 3600 }) + cmd.run_command + cmd.error! + else + install_subdir = ::File.join(@new_resource.install_dir, + node['arcgis']['portal']['install_subdir']) + cmd = ::File.join(install_subdir, 'uninstall_WorkflowManager.sh') + + cmd = Mixlib::ShellOut.new("su - #{@new_resource.run_as_user} -c \"#{cmd}\"", + { :timeout => 3600 }) + cmd.run_command + cmd.error! + end +end diff --git a/cookbooks/arcgis-workflow-manager/templates/default/workflowmanager.service.erb b/cookbooks/arcgis-workflow-manager/templates/default/workflowmanager.service.erb new file mode 100644 index 0000000..858045f --- /dev/null +++ b/cookbooks/arcgis-workflow-manager/templates/default/workflowmanager.service.erb @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------ +# Workflow Manager systemd unit file +# ------------------------------------------------------------------ +# +# Configure Workflow Manager to be started with the operating system by +# following these instructions: +# +# 1) Switch to the root user. +# +# 2) Copy this file to /etc/systemd/system +# +# 3) Enable the Workflow Manager service to be started with the operating +# system: +# +# # systemctl enable workflowmanager.service +# +# 4) Verify the systemd service is setup correctly: +# +# # systemctl stop workflowmanager.service +# # systemctl start workflowmanager.service +# # systemctl status workflowmanager.service +# +# 5) Reboot the system and verify that Workflow Manager restarts properly. +# +# ------------------------------------------------------------------ + +[Unit] +Description=ArcGIS Workflow Manager +Wants=arcgisserver.service +After=network.target arcgisserver.service + +[Service] +Type=forking +User=<%=@agsuser%> +#PIDFile=<%=@agshome%>/WorkflowManager/ArcGISWorkflowManager.wrapper.pid +GuessMainPID=false +ExecStart=<%=@agshome%>/WorkflowManager/bin/ArcGISWorkflowManager-service start +ExecReload=<%=@agshome%>/WorkflowManager/bin/ArcGISWorkflowManager-service restart +ExecStop=<%=@agshome%>/WorkflowManager/bin/ArcGISWorkflowManager-service stop + +[Install] +Alias=ArcGISWorkflowManager +WantedBy=multi-user.target \ No newline at end of file diff --git a/cookbooks/arcgis/Berksfile b/cookbooks/arcgis/Berksfile index 05ccfea..36aa66b 100644 --- a/cookbooks/arcgis/Berksfile +++ b/cookbooks/arcgis/Berksfile @@ -14,8 +14,24 @@ group :release do cookbook 'arcgis-insights', path: '../arcgis-insights' cookbook 'arcgis-pro', path: '../arcgis-pro' cookbook 'arcgis-repository', path: '../arcgis-repository' + cookbook 'arcgis-workflow-manager', path: '../arcgis-workflow-manager' cookbook 'esri-iis', path: '../esri-iis' cookbook 'esri-tomcat', path: '../esri-tomcat' + # Lock versions of the dependent cookbooks + cookbook 'apt', '~> 7.4' + cookbook 'docker', '~> 4.12' + cookbook 'homebrew', '~> 5.2' + cookbook 'hostsfile', '~> 3.0' + cookbook 'iptables', '~> 7.1' cookbook 'java', '~> 6.0' - cookbook 'apt' + cookbook 'java_properties', '~> 0.1' + cookbook 'limits', '~> 1.0' + cookbook 'line', '~> 2.9' + cookbook 'ms_dotnet', '~> 4.2' + cookbook 'nfs', '~> 2.6' + cookbook 'openssl', '~> 8.5' + cookbook 's3_file', '~> 2.8' + cookbook 'tomcat', '~> 4.2' + cookbook 'windows', '~> 5.3' + cookbook 'windows_firewall', '~> 5.0' end diff --git a/cookbooks/arcgis/CHANGELOG.md b/cookbooks/arcgis/CHANGELOG.md index cbac9fb..d82eb9f 100644 --- a/cookbooks/arcgis/CHANGELOG.md +++ b/cookbooks/arcgis/CHANGELOG.md @@ -3,6 +3,11 @@ arcgis cookbook CHANGELOG This file is used to list changes made in each version of the arcgis cookbook. +3.8.0 +----- +- Added support for ArcGIS 10.9.1. +- Added arcgis-workflow-manager cookbook + 3.7.0 ----- - Added support for ArcGIS 10.9. diff --git a/cookbooks/arcgis/metadata.rb b/cookbooks/arcgis/metadata.rb index ed537b2..5765f9a 100644 --- a/cookbooks/arcgis/metadata.rb +++ b/cookbooks/arcgis/metadata.rb @@ -4,24 +4,28 @@ license 'Apache 2.0' description 'ArcGIS Chef Cookbooks' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '3.7.0' +version '3.8.0' chef_version '>= 13.0' if defined? chef_version -depends 'arcgis-desktop', '~> 3.7' +depends 'arcgis-desktop', '~> 3.8' depends 'arcgis-egdb', '~> 1.0' -depends 'arcgis-enterprise', '~> 3.7' -depends 'arcgis-geoevent', '~> 3.7' -depends 'arcgis-notebooks', '~> 3.7' -depends 'arcgis-mission', '~> 3.7' -depends 'arcgis-insights', '~> 3.7' -depends 'arcgis-pro', '~> 3.7' -depends 'arcgis-repository', '~> 3.7' +depends 'arcgis-enterprise', '~> 3.8' +depends 'arcgis-geoevent', '~> 3.8' +depends 'arcgis-notebooks', '~> 3.8' +depends 'arcgis-mission', '~> 3.8' +depends 'arcgis-insights', '~> 3.8' +depends 'arcgis-pro', '~> 3.8' +depends 'arcgis-repository', '~> 3.8' +depends 'arcgis-workflow-manager', '~> 3.8' depends 'esri-iis', '~> 0.1' depends 'esri-tomcat', '~> 0.1' supports 'windows' supports 'ubuntu' supports 'redhat' +supports 'centos' +supports 'oracle' +supports 'suse' issues_url 'https://github.com/Esri/arcgis-cookbook/issues' if respond_to?(:issues_url) source_url 'https://github.com/Esri/arcgis-cookbook' if respond_to?(:source_url) diff --git a/cookbooks/esri-iis/CHANGELOG.md b/cookbooks/esri-iis/CHANGELOG.md index 02eea7a..f4f914c 100644 --- a/cookbooks/esri-iis/CHANGELOG.md +++ b/cookbooks/esri-iis/CHANGELOG.md @@ -2,11 +2,18 @@ This file is used to list changes made in each version of the esri-iis cookbook. +## 0.1.3 + +- Added 'install' recipe. + ## 0.1.2 + - Updated and locked versions of dependent cookbooks. ## 0.1.1 + - Add ec2 test kitchen ## 0.1.0 + - Initial release of esri-iis diff --git a/cookbooks/esri-iis/License.txt b/cookbooks/esri-iis/License.txt new file mode 100644 index 0000000..863d150 --- /dev/null +++ b/cookbooks/esri-iis/License.txt @@ -0,0 +1,101 @@ +Apache License - 2.0 + +TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + +1. Definitions. + +"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. + +"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. + +"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control +with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management +of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial +ownership of such entity. + +"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. + +"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, +and configuration files. + +"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to +compiled object code, generated documentation, and conversions to other media types. + +"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice +that is included in or attached to the work (an example is provided in the Appendix below). + +"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the +editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes +of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, +the Work and Derivative Works thereof. + +"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work +or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual +or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of +electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on +electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for +the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing +by the copyright owner as "Not a Contribution." + +"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and +subsequently incorporated within the Work. + +2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, +worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, +publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. + +3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, +non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, +sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are +necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was +submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work +or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You +under this License for that Work shall terminate as of the date such litigation is filed. + +4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, +and in Source or Object form, provided that You meet the following conditions: + + 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and + + 2. You must cause any modified files to carry prominent notices stating that You changed the files; and + + 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices + from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and + + 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a + readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the + Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the + Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever + such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. + You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, + provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to + Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your + modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + +5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You +to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, +nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. + +6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except +as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. + +7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides +its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, +any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for +determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under +this License. + +8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required +by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, +including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the +use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or +any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. + +9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a +fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting +such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree +to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your +accepting any such warranty or additional liability. + +END OF TERMS AND CONDITIONS \ No newline at end of file diff --git a/cookbooks/esri-iis/README.md b/cookbooks/esri-iis/README.md index d3f669f..b19c894 100644 --- a/cookbooks/esri-iis/README.md +++ b/cookbooks/esri-iis/README.md @@ -16,6 +16,7 @@ Requirements * Windows Server 2012 (R2) * Windows Server 2016 * Windows Server 2019 +* Windows Server 2022 ### Dependencies @@ -32,6 +33,17 @@ The following cookbooks are required: * `node['arcgis']['iis']['replace_https_binding']` = If false, the current HTTPS binding is not changed if it is already configured. Default value is `false`. * `node['arcgis']['iis']['features']` = An array of windows features to be installed with IIS. Default value depends on Windows version. +Recipes +------- + +## esri-iis::default + +Enables IIS features required by ArcGIS Web Adaptor (IIS) and configures HTTPS binding. + +## esri-iis::install + +Enables IIS features required by ArcGIS Web Adaptor (IIS). + ## Usage Include `esri-iis` in your node's `run_list`: diff --git a/cookbooks/esri-iis/metadata.rb b/cookbooks/esri-iis/metadata.rb index 88e1411..cef98c6 100644 --- a/cookbooks/esri-iis/metadata.rb +++ b/cookbooks/esri-iis/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Enables IIS features required by ArcGIS Web Adaptor (IIS) and configures HTTPS binding.' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.1.2' +version '0.1.3' depends 'windows', '~> 5.3' depends 'openssl', '~> 8.5' @@ -12,6 +12,7 @@ supports 'windows' recipe 'esri-iis::default', 'Enables IIS features required by ArcGIS Web Adaptor (IIS) and configures HTTPS binding.' +recipe 'esri-iis::install', 'Enables IIS features required by ArcGIS Web Adaptor (IIS).' issues_url 'https://github.com/Esri/arcgis-cookbook/issues' if respond_to?(:issues_url) source_url 'https://github.com/Esri/arcgis-cookbook' if respond_to?(:source_url) diff --git a/cookbooks/esri-iis/recipes/default.rb b/cookbooks/esri-iis/recipes/default.rb index 824bb8a..7425973 100644 --- a/cookbooks/esri-iis/recipes/default.rb +++ b/cookbooks/esri-iis/recipes/default.rb @@ -2,7 +2,7 @@ # Cookbook Name:: esri-iis # Recipe:: default # -# Copyright 2017 Esri +# Copyright 2021 Esri # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -17,27 +17,9 @@ # limitations under the License. # -require 'openssl' - -# Install .Net Framework 3.5 for Windows Server 2012r2 -#windows_feature 'Net-Framework-Core' do -# provider Chef::Provider::WindowsFeaturePowershell -# all true -# only_if { node['platform_version'].to_f >= 6.3 && -# node['kernel']['os_info']['product_type'] != -# Chef::ReservedNames::Win32::API::System::VER_NT_WORKSTATION } -# action :install -#end +include_recipe 'esri-iis::install' -node['arcgis']['iis']['features'].each do |feature| - windows_feature feature do - action :install - end -end - -service 'W3SVC' do - action [:enable, :start] -end +require 'openssl' openssl_x509 node['arcgis']['iis']['keystore_file'].gsub(/\.pfx/, '.pem') do common_name node['arcgis']['iis']['domain_name'] diff --git a/cookbooks/esri-iis/recipes/install.rb b/cookbooks/esri-iis/recipes/install.rb new file mode 100644 index 0000000..318eb21 --- /dev/null +++ b/cookbooks/esri-iis/recipes/install.rb @@ -0,0 +1,31 @@ +# +# Cookbook Name:: esri-iis +# Recipe:: install +# +# Copyright 2021 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. +# + +node['arcgis']['iis']['features'].each do |feature| + windows_feature feature do + timeout 1200 + retries 2 + retry_delay 60 + action :install + end +end + +service 'W3SVC' do + action [:enable, :start] +end diff --git a/cookbooks/esri-tomcat/CHANGELOG.md b/cookbooks/esri-tomcat/CHANGELOG.md index 60e53b2..0485c06 100644 --- a/cookbooks/esri-tomcat/CHANGELOG.md +++ b/cookbooks/esri-tomcat/CHANGELOG.md @@ -4,6 +4,11 @@ esri-tomcat cookbook CHANGELOG This file is used to list changes made in each version of the esri-tomcat cookbook. +0.1.9 +----- +- Added support for Apache Tomcat 9. +- Added support for new linux platforms. + 0.1.8 ----- - Added iptables, firewalld, and openjdk recipes. diff --git a/cookbooks/esri-tomcat/README.md b/cookbooks/esri-tomcat/README.md index c5f09f4..4dac878 100644 --- a/cookbooks/esri-tomcat/README.md +++ b/cookbooks/esri-tomcat/README.md @@ -8,8 +8,11 @@ Requirements ### Platforms -* RHEL 6, 7 -* Ubuntu 14.04, 16.04, 18.04 +* Ubuntu Server 18.04 and 20.04 LTS +* Red Hat Enterprise Linux Server 8 +* SUSE Linux Enterprise Server 15 +* CentOS Linux 8 +* Oracle Linux 8 ### Dependencies @@ -22,7 +25,7 @@ Attributes #### General -* `node['tomcat']['version']` = Tomcat version to install. Default is `8.5.63`. +* `node['tomcat']['version']` = Tomcat version to install. Default is `9.0.48`. * `node['tomcat']['instance_name']` = tomcat instance name. Default is `arcgis`. * `node['tomcat']['install_path']` = tomcat installation directory. Default is `/opt/tomcat_INSTANCENAME_VERSION`. * `node['tomcat']['tarball_path']` = tomcat tarball archive path. Default is `/apache-tomcat-.tar.gz`. @@ -34,7 +37,7 @@ Attributes * `node['tomcat']['keystore_file']` = Optional: Path to the keystore file. If not provided, a new file and a self-signed certificate will be created. * `node['tomcat']['keystore_password']` = Optional: Password to the keystore. -* `node['tomcat']['ssl_enabled_protocols']` = SSL protocols of HTTPS listener. Default is `TLSv1.2,TLSv1.1,TLSv1`. +* `node['tomcat']['ssl_enabled_protocols']` = SSL protocols of HTTPS listener. Default is `TLSv1.3,TLSv1.2`. * `node['tomcat']['domain_name']` = Domain name for generated self-signed SSL certificate. Default is `Fully Qualified Domain Name`. #### OpenJDK @@ -64,11 +67,11 @@ Configures HTTPS listener in Apache Tomcat application server. ### esri-tomcat::iptables -Configures port forwarding (80 to 8080 and 443 to 8443) using iptables. +Installs iptables and configures HTTP(S) port forwarding (80 to 8080 and 443 to 8443). ### esri-tomcat::firewalld -Configures port forwarding (80 to 8080 and 443 to 8443) using FirewallD. +Installs FirewallD and configures HTTP(S) port forwarding (80 to 8080 and 443 to 8443). > If firewalld service was started by the recipe, the recipe execute script specified by `node['tomcat']['firewalld']['init_cmd']` which by default opens all the TCP ports on the machine. diff --git a/cookbooks/esri-tomcat/attributes/default.rb b/cookbooks/esri-tomcat/attributes/default.rb index c9e0054..e551a02 100644 --- a/cookbooks/esri-tomcat/attributes/default.rb +++ b/cookbooks/esri-tomcat/attributes/default.rb @@ -1,4 +1,4 @@ -default['tomcat']['version'] = '8.5.63' +default['tomcat']['version'] = '9.0.48' default['tomcat']['instance_name'] = 'arcgis' default['tomcat']['install_path'] = '/opt/tomcat_' + node['tomcat']['instance_name'] + '_' + node['tomcat']['version'] @@ -7,7 +7,7 @@ default['tomcat']['user'] = 'tomcat_' + node['tomcat']['instance_name'] default['tomcat']['group'] = 'tomcat_' + node['tomcat']['instance_name'] -default['tomcat']['ssl_enabled_protocols'] ='TLSv1.2,TLSv1.1,TLSv1' +default['tomcat']['ssl_enabled_protocols'] = 'TLSv1.3,TLSv1.2' default['tomcat']['keystore_file'] = '' if ENV['TOMCAT_KEYSTORE_PASSWORD'].nil? default['tomcat']['keystore_password'] = '' diff --git a/cookbooks/esri-tomcat/metadata.rb b/cookbooks/esri-tomcat/metadata.rb index d426f62..be823a8 100644 --- a/cookbooks/esri-tomcat/metadata.rb +++ b/cookbooks/esri-tomcat/metadata.rb @@ -4,22 +4,22 @@ license 'Apache 2.0' description 'Installs/Configures esri-tomcat' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '0.1.8' +version '0.1.9' chef_version '>= 14' depends 'tomcat', '>= 3.2.0' depends 'openssl', '~> 8.5' depends 'iptables', '~> 7.1' -%w(ubuntu redhat centos).each do |os| +%w(ubuntu redhat centos oracle suse).each do |os| supports os end recipe 'esri-tomcat::default', 'Installs and configures Apache Tomcat application server for ArcGIS Web Adaptor.' recipe 'esri-tomcat::install', 'Installs Apache Tomcat application server.' recipe 'esri-tomcat::configure_ssl', 'Configures HTTPS listener in Apache Tomcat application server.' -recipe 'esri-tomcat::iptables', 'Configures port forwarding (80 to 8080 and 443 to 8443) using iptables.' -recipe 'esri-tomcat::firewalld', 'Configures port forwarding (80 to 8080 and 443 to 8443) using FirewallD.' +recipe 'esri-tomcat::iptables', 'Installs iptables and configures HTTP(S) port forwarding (80 to 8080 and 443 to 8443).' +recipe 'esri-tomcat::firewalld', 'Installs FirewallD and configures HTTP(S) port forwarding (80 to 8080 and 443 to 8443).' recipe 'esri-tomcat::openjdk', 'Installs OpenJDK for Apache Tomcat from a local or remote tarball.' issues_url 'https://github.com/Esri/arcgis-cookbook/issues' if respond_to?(:issues_url) diff --git a/cookbooks/esri-tomcat/recipes/default.rb b/cookbooks/esri-tomcat/recipes/default.rb index 2930992..221312d 100644 --- a/cookbooks/esri-tomcat/recipes/default.rb +++ b/cookbooks/esri-tomcat/recipes/default.rb @@ -23,7 +23,7 @@ if node['tomcat']['forward_ports'] # Forward port 80 to 8080 and 443 to 8443 using firewalld or iptables. case node['platform'] - when 'centos', 'redhat', 'rhel', 'amazon' + when 'centos', 'redhat', 'rhel', 'amazon', 'oracle', 'suse' include_recipe 'esri-tomcat::firewalld' else include_recipe 'esri-tomcat::iptables' diff --git a/cookbooks/esri-tomcat/recipes/firewalld.rb b/cookbooks/esri-tomcat/recipes/firewalld.rb index 7990210..549d556 100644 --- a/cookbooks/esri-tomcat/recipes/firewalld.rb +++ b/cookbooks/esri-tomcat/recipes/firewalld.rb @@ -17,6 +17,11 @@ # limitations under the License. # +# Install firewalld if it's not already installed +package 'firewalld' do + action :install +end + service 'enable firewalld' do service_name 'firewalld' supports :status => true, :restart => true, :reload => true diff --git a/cookbooks/esri-tomcat/recipes/install.rb b/cookbooks/esri-tomcat/recipes/install.rb index 3c08842..0e3585e 100644 --- a/cookbooks/esri-tomcat/recipes/install.rb +++ b/cookbooks/esri-tomcat/recipes/install.rb @@ -41,7 +41,7 @@ end tomcat_service instance_name do - action [:start, :enable] + action [:enable, :restart] tomcat_user node['tomcat']['user'] tomcat_group node['tomcat']['group'] retries 5 diff --git a/cookbooks/esri-tomcat/recipes/iptables.rb b/cookbooks/esri-tomcat/recipes/iptables.rb index 99cdbe2..79cb91e 100644 --- a/cookbooks/esri-tomcat/recipes/iptables.rb +++ b/cookbooks/esri-tomcat/recipes/iptables.rb @@ -20,15 +20,26 @@ iptables_packages 'install iptables' # Add iptables rules to forward ports 80 to 8080 and 443 to 8443. -execute "iptables -A PREROUTING -t nat -i #{node['network']['default_interface']} -p tcp --dport 80 -j REDIRECT --to-port 8080" -execute "iptables -A PREROUTING -t nat -i #{node['network']['default_interface']} -p tcp --dport 443 -j REDIRECT --to-port 8443" -execute "iptables -A OUTPUT -t nat -o lo -p tcp --dport 80 -j REDIRECT --to-port 8080" -execute "iptables -A OUTPUT -t nat -o lo -p tcp --dport 443 -j REDIRECT --to-port 8443" +execute "iptables -A PREROUTING -t nat -i #{node['network']['default_interface']} -p tcp --dport 80 -j REDIRECT --to-port 8080" do + not_if "iptables -C PREROUTING -t nat -i #{node['network']['default_interface']} -p tcp --dport 80 -j REDIRECT --to-port 8080" +end + +execute "iptables -A PREROUTING -t nat -i #{node['network']['default_interface']} -p tcp --dport 443 -j REDIRECT --to-port 8443" do + not_if "iptables -C PREROUTING -t nat -i #{node['network']['default_interface']} -p tcp --dport 443 -j REDIRECT --to-port 8443" +end + +execute "iptables -A OUTPUT -t nat -o lo -p tcp --dport 80 -j REDIRECT --to-port 8080" do + not_if "iptables -C OUTPUT -t nat -o lo -p tcp --dport 80 -j REDIRECT --to-port 8080" +end + +execute "iptables -A OUTPUT -t nat -o lo -p tcp --dport 443 -j REDIRECT --to-port 8443" do + not_if "iptables -C OUTPUT -t nat -o lo -p tcp --dport 443 -j REDIRECT --to-port 8443" +end # Save the iptables rules case node['platform'] when 'ubuntu', 'debian' execute 'iptables-save > /etc/iptables/rules.v4' -when 'rhel', 'redhat', 'centos' +when 'rhel', 'redhat', 'centos', 'oracle' execute 'iptables-save > /etc/sysconfig/iptables' end diff --git a/cookbooks/esri-tomcat/templates/default/server.xml.erb b/cookbooks/esri-tomcat/templates/default/server.xml.erb index 5df0e26..387833c 100644 --- a/cookbooks/esri-tomcat/templates/default/server.xml.erb +++ b/cookbooks/esri-tomcat/templates/default/server.xml.erb @@ -1,4 +1,4 @@ - + - + + + - +