GEOG 865
Cloud and Server GIS

Building an ArcGIS Server site with Cloud Formation

PrintPrint

In this part of the lesson, you'll use Cloud Formation to create an ArcGIS Enterprise site on Amazon EC2. 

Clean Up Lesson 1 Resources

Before we proceed to create a new EC2 machine instance for Enterprise, I recommend that we terminate the instance and storage you created in Lesson 1. We won't use that machine or its storage subsequently, so we may as well remove it and not incur any more potential costs.

  1. In your AWS Console, browse to your Elastic IP and disassociate it from the Lesson 1 machine instance. (Do not delete your Elastic IP. You will reuse it throughout the course.)
  2. In your AWS Console, browse to your EC2 Instances and Terminate the one from Lesson 1.
  3. In your AWS Console, browse to your Elastic Block Storage Volumes, and delete the Volume that was created for your Lesson 1 machine instance. (Important Reminder: Don't delete a volume for a machine instance that you still plan to use. Regardless of whether the Instance is Running or Stopped, the storage Volume needs to exist. To delete a storage volume is akin to removing a physical hard drive from your desktop computer; it doesn't matter if your computer is on or off, if you throw out the drive the machine is useless.)

Create an S3 Bucket for Config Files

To simplify the Cloud Formation installation, we will upload a few config files to an S3 Bucket, from which the template can access them. You will refer to them later as you customize the template parameters.

  1. Log into AWS and click the Services menu.
  2. Select S3 under the Storage section.
  3. Click the Create Bucket button and proceed to create a bucket with the name, deploymentbucketNAME, replacing “NAME” with your own last name. For example, mine would be deploymentbucketbaxter. This bucket name can be anything, but must be unique.
  4. All other settings may be left at their default values.
  5. Upload the following three files from the Student Downloads folder in the Start Here! module in Canvas to your S3 bucket:
    1. The ArcGIS Server license file (.prvc)
    2. The ArcGIS Portal license file (.json)
    3. The SSL Certificate file (.pfx)
    4. The CloudFormation template file (.json)

Launch Cloud Formation Template

  1. Log into your AWS Management Console.
  2. Browse to the CloudFormation section under Services menu (you may need to expand All Services).
  3. Click the Create Stack button and choose the New Resources option.
  4. Leave the Template is Ready option selected, and leave the Amazon S3 URL option selected.
  5. Return to your S3 Bucket and click on the CloudFormation template .json file you uploaded.
    1. On its overview page you should see an Object URL.
    2. Copy that URL and paste it into the Amazon S3 URL box back in the CloudFormation template.
  6. Click the Next button.
  7. Refer to the document, Geog865CloudFormationParameters, in our course management system for details on what to enter on the Specify Stack Details page of the stack creation. You will find it in the Lesson 2 Module. In this section, you will provide a name for your Instance, the Elastic IP you'll associate with it, what type of AWS machine you'd like it to run on, all the license files for Enterprise/Server/Portal, passwords for the Windows and ArcGIS user accounts that will be created, your fully-qualified domain name, and the SSL Certificate that will secure your site. You may leave all other settings at their defaults. When you've entered all the information, click Next.
  8. On the Configure Stack Options page, be sure that the Stack Failure Options section is set to "Preserve successfully provisioned resources." By setting this parameter, if the cloud formation process encounters an error when setting up the ArcGIS components your EC2 Instance will persist. This way you can use Remote Desktop to log into your machine and investigate what the problem was. Without changing this setting, the entire EC2 Instance would be deleted making it difficult to troubleshoot.
  9. On the next page, check the box acknowledging the IAM resources note, and click Create Stack.
  10. The process will take some time to complete, likely an hour or more, and it may not be obvious that anything is happening. You will see an indication of what is going on in the Status column, and if you check the box next to the Stack Name, you will see more details under the Events tab.
  11. DO NOT PROCEED until the Status column for your stack on the Cloud Formation page shows "CREATE_COMPLETE" in green text.
  12. When the Stack indicates that it is complete, return to your AWS Console and browse to your EC2 Instances.
  13. Check to see that your new machine is successfully running, evidenced by a green “running” indicator and that it is no longer “initializing.” (Even if you see your new instance here, don’t proceed until the Cloud Formation stack is also complete.)

    If you receive an error in the CloudFormation Event page, you may see information about what step in the process caused the issue. The Event logs in the CloudFormation page sometimes don't seem to be that helpful. If the problem was due to something during the ArcGIS software configuration on the server, the errors are logged in files saved on your EC2 instance. If your Instance was created and is still there, use Remote Desktop to sign into it. Open a File Explorer and use the View - Options - Change Folder and Search Options settings to be sure you can see protected operating system files, see file extensions, see hiddn folders, etc. The log folder that ArcGIS generates is hidden by default.

    Browse to C:\cinc and open arcgis-enterprise-primary.log in a text editor. You'll see entries with their respective timestamps as they occured during the install. Scroll through the entries in chronological order until you encounter one with a Warning or Error indicator. That should indicate what the issue was.

Your new machine instance is now set up and ready for you to log into and start working with ArcGIS Server.