Automation of ArcGIS Enterprise: A Chef Cookbook

Chef is an IT automation framework that can automate installation and configuration of IT components/assets for ArcGIS Enterprise. Automation of ArcGIS configuration management operations, such as initial deployments, upgrades, and disaster recovery, improves operational excellence, security, and reliability of ArcGIS deployments.

Chef Cookbooks for ArcGIS is a collection of Chef cookbooks for configuration, deployment, and management of ArcGIS Enterprise, ArcGIS Pro, and ArcGIS Desktop.

Supported on Windows and Linux, Chef provides tools with configuration files. Chef components include Cookbooks, Attribute, and Chef-Server vs Client. The two main structures that you can use to automate ArcGIS Enterprise deployment are Chef Server and Chef Solo. This forgoes a Chef Server component and, instead, hosts all important resources on the target machine, along with the Chef Client.

Chef works by installing ready-to-use cookbooks, defining the configuration, and running Chef with the configuration file. In this article, I will be deploying a base ArcGIS Enterprise 11.1 by Chef. 

Here are the steps required to get ArcGIS on Chef up and running:

  • Consult the ArcGIS Enterprise 11.1 system requirements.
  • Install the Chef or Cinc 16 Client.
  • Download and extract ArcGIS Chef Cookbooks into Chef workspace directory. (Note: ArcGIS Chef cookbooks version 4.2.0. is recommended.)
  • Copy ArcGIS Cookbooks to the server and unzip to c:\chef or cinc.
  • Update the required attributes within the template JSON files.
  • Run the Chef/Cinc client on the machine as admin/superuser using a JSON file specific to the machine roles (one machine can be used in multiple roles).

Before running the deployment, you will need the following:

  • ArcGIS Online account (public or organizational) to download ArcGIS Enterprise setups
  • ArcGIS Enterprise Authorization files
  • A domain name for your website
  • SSL certificate in PKCS12 (a.k.a pfx) format issued by CA

To begin, I will set up a base ArcGIS Enterprise deployment in AWS on Windows Server 2022. It will consist of Portal for ArcGIS, ArcGIS Server, ArcGIS Data Store, and two instances of ArcGIS Web Adaptor, each configured with a portal and hosting server.

Step 1.  Install Cinc Client version 16 recommended for Chef Cookbooks for ArcGIS 4.2.0. 

In Windows PowerShell, run the command below as an admin.

Installing Cinc Client

Step 2.  Download Chef Cookbooks for ArcGIS.

Downloaded ArcGIS Chef Cookbooks

Extract the contents of arcgis-4.2.0 cookbooks.zip archive to C:\cinc.

Extract using “tar” command

Extracted cookbook zip folder

Extracted cookbooks

Step 3. Download ArcGIS Enterprise 11.1 Setups.

Copy file C:\cinc\templates\arcgis-enterprise-base\11.1\windows\arcgis-enterprise-files.json to C:\cinc

Copy using “cp” command

Edit the Arcgis-enterprise-files.json file in a text editor.

First, lets see what’s inside the JSON file.

Use “cat” command to open the json file

Edit using “vim” or “notepad.”

Add your username and password from AGOL.

Add AGO username and password.

Download the setup archives by running the following commands as an admin.

> cinc-client -z -j arcgis-enterprise-files.json

Downloading ArcGIS Archives from Esri

The setup archives are downloaded to C:\Software\Archives directory set by arcgis.repository.local_archives.

Downloaded ArcGIS Enterprise Deployment Files

Create a directory C:\Software\AuthorizationFiles\11.1 and copy software authorization files for 11.1 ArcGIS Server and Portal to that directory.

Create a folder using “mkdir” command

Copy Portal and server licenses using “cp” command

Create a directory C:\Software\Certificates and copy the SSL certificate to that directory.

Create a Directory with “mkdir’ command

Copy SSL certificate to folder using “cp” command

Step 4. Edit the JSON File for the Machine Role and Run Chef.

Change the current directory to C:\cinc. Copy the file path C:\cinc\templates\arcgis-enterprise-base\11.1\windows\arcgis-enterprise-primary.json and paste it to the directory C:\cinc.           

                                      

Copy ArcGIS Enterprise Primary Json using “cp” command

Edit the arcgis-enterprise-primary.json file in a text editor.

(Note: The attribute values must be JSON-escaped.)

A copied ArcGIS Enterprise Primary Json file

                                                   

ArcGIS-Enteprise-Primary.Json file 

To install base ArcGIS Enterprise on a single machine, edit arcgis-enterprise-primary.json and use it to run Cinc Client in local mode on the machine.

Edit ArcGIS Enterprise Primary JSON

Edited ArcGIS Enterprise Primary Json -To edit

To deploy ArcGIS Enterprise by Chef after the edit, run the following command in Microsoft PowerShell as an administrator from the cinc folder:

>  cinc-client -z -j arcgis-enterprise-primary.json

Deploying ArcGIS Enterprise by Chef

Deploying ArcGIS Web Adaptor for Microsoft Internet Information Services (IIS)

Configuring SSL

Portal for ArcGIS installation

Portal for ArcGIS deployment

ArcGIS Web Adaptor for Portal

ArcGIS Server deployment

ArcGIS Enterprise deployment

ArcGIS Server Web Adaptor

ArcGIS Datastore deployment

ArcGIS Enterprise by Chef Federation

 

ArcGIS Enterprise 11.1 has been successfully deployed and federated by Chef.

ArcGIS Enterprise by Chef federated sites

ArcGIS Enterprise Deployment by Chef External URLs:

https://arcgis-chef.geopowered.com/portal/home/

https://arcgis-chef.geopowered.com/portal/portaladmin/

https://arcgis-chef.geopowered.com/server/manager

https://arcgis-chef.geopowered.com/server/admin

Our Services

Geo Jobe is here to help you deploy Chef safely and reliably on any public cloud provider! We offer self-managed and managed service cloud deployments. Please reach out to us today via connect@geo-jobe.com, so we can help you leverage Chef in your own environment!

Want more from GEO Jobe? Check out these other articles from our MapThis! blog:

Avatar photo

Support Technician, Tier 3

Tonny Segero is a Tier 3 Support Technician at GEO Jobe.