Deployment in AWS with Auto Scaling (DRAFT): Difference between revisions
Dgreenwood (talk | contribs) |
Dgreenwood (talk | contribs) No edit summary |
||
| (47 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{| | {|class="wip-box" | ||
| | | | ||
'''WIP''' | |||
| | |||
This article is a work-in-progress. This article represents our current understanding of the topic. It is subject to revision and expansion in the future. | |||
This tag will be removed upon draft completion. | This tag will be removed upon draft completion. | ||
|} | |} | ||
<section begin="glossary" /> | |||
< | <blockquote> | ||
Easily scale your Grooper processing with cloud-based computing using Amazon Web Services and Auto Scaling. | Easily scale your Grooper processing with cloud-based computing using Amazon Web Services and Auto Scaling. | ||
</blockquote> | </blockquote> | ||
<section end="glossary" /> | |||
== About AWS == | == About AWS == | ||
| Line 50: | Line 52: | ||
{|cellpadding=10 cellspacing=5 | {|cellpadding=10 cellspacing=5 | ||
|valign=top style="width: | |valign=top style="width:16%"| | ||
[[File:2021-aws-diagram-main.png|center]] | [[File:2021-aws-diagram-main.png|center]] | ||
|valign=top| | |valign=top| | ||
| Line 94: | Line 96: | ||
<tab name="System Specs" style="margin:20px"> | <tab name="System Specs" style="margin:20px"> | ||
=== System Specs === | === System Specs === | ||
Next, you will choose the virtual machines system specifications. There is some flexibility in your choices. However, there are some requirements and best practice suggestions you'll need to keep in mind. You will configure the following: | |||
{|cellpadding=10 cellspacing=5 | {|cellpadding=10 cellspacing=5 | ||
|valign=top style="width:40%"| | |valign=top style="width:40%"| | ||
# '''Application and OS Image''' | # '''Application and OS Image''' | ||
#* '''Windows Server 2012''' or later or '''Windows 10''' or later is required. | #* '''Windows Server 2012''' or later or '''Windows 10''' or later is required. | ||
| Line 105: | Line 106: | ||
#* ''For the purposes of this tutorial, we selected '''Microsoft Windows Server 2019 with SQL Server 2012 Standard'''. This takes care of both these requirements.'' | #* ''For the purposes of this tutorial, we selected '''Microsoft Windows Server 2019 with SQL Server 2012 Standard'''. This takes care of both these requirements.'' | ||
#* For more information on instances and AMIs, visit Amazon's documentation [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2Win_Infrastructure.html here]. | #* For more information on instances and AMIs, visit Amazon's documentation [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/EC2Win_Infrastructure.html here]. | ||
# '''Instance Type''' | |valign=top| | ||
[[File:2021-aws-how-to-04-1.png]] | |||
|- | |||
|valign=top| | |||
#<li value=2> '''Instance Type''' | |||
#* These settings define the CPU and RAM for the virtual machine. | #* These settings define the CPU and RAM for the virtual machine. | ||
#* Server RAM should be 16GB or more. | #* Server RAM should be 16GB or more. | ||
| Line 111: | Line 116: | ||
#* ''We selected the "m6i.xlarge" instance type, which meets these requirements. There are, however, other instance types that also meet these requirements. For example, the "t3.xlarge" has the same number of cores and RAM, but is cheaper and performs slower.'' | #* ''We selected the "m6i.xlarge" instance type, which meets these requirements. There are, however, other instance types that also meet these requirements. For example, the "t3.xlarge" has the same number of cores and RAM, but is cheaper and performs slower.'' | ||
#* For more information on instance types, visit Amazon's documentation [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html here]. | #* For more information on instance types, visit Amazon's documentation [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/instance-types.html here]. | ||
# '''Storage''' | |valign=top| | ||
[[File:2021-aws-how-to-04-2.png]] | |||
|- | |||
|valign=top| | |||
#<li value=3> '''Storage''' | |||
#* The storage will need to accommodate the Grooper database and file store. | #* The storage will need to accommodate the Grooper database and file store. | ||
#* AWS has a variety of storage options for you to choose from, including SSD and HDD options. There are also scalable storage options, allowing you to dynamically increase the instance's storage, as needed. | #* AWS has a variety of storage options for you to choose from, including SSD and HDD options. There are also scalable storage options, allowing you to dynamically increase the instance's storage, as needed. | ||
| Line 117: | Line 126: | ||
#* For more information on storage options, visit Amazon's documentation [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Storage.html here] | #* For more information on storage options, visit Amazon's documentation [https://docs.aws.amazon.com/AWSEC2/latest/WindowsGuide/Storage.html here] | ||
|valign=top| | |valign=top| | ||
[[File:2021-aws-how-to-04.png]] | [[File:2021-aws-how-to-04-3.png]] | ||
|} | |} | ||
</tab> | </tab> | ||
| Line 162: | Line 171: | ||
=== Launch Instance === | === Launch Instance === | ||
# At the bottom of the '''Summary''' heading, press the ''Launch instance'' button. | # At the bottom of the '''Summary''' heading, press the '''Launch instance''' button. | ||
|valign=top| | |valign=top| | ||
[[File:2021-aws-how-to-07.png]] | [[File:2021-aws-how-to-07.png]] | ||
| Line 180: | Line 189: | ||
#* The instance must be running in order to connect to it. Right-click an instance to start/stop it. | #* The instance must be running in order to connect to it. Right-click an instance to start/stop it. | ||
#* If this is a new instance, Amazon will perform a series of initialization checks before you can connect to it. This may take a few minutes. | #* If this is a new instance, Amazon will perform a series of initialization checks before you can connect to it. This may take a few minutes. | ||
# Press the ''Connect'' button to connect to the selected instance. | # Press the '''Connect''' button to connect to the selected instance. | ||
|valign=top| | |valign=top| | ||
[[File:2021-aws-how-to-09.png]] | [[File:2021-aws-how-to-09.png]] | ||
| Line 186: | Line 195: | ||
|valign=top| | |valign=top| | ||
<br> | <br> | ||
#<li value=4> To connect to the instance using RDP, select the ''RDP'' tab. | #<li value=4> To connect to the instance using RDP, select the '''RDP''' tab. | ||
# If this is your first time connecting to the instance, you will need to decrypt a password from your key pair. To do this, press the ''Get Password'' link and follow its instructions. | # If this is your first time connecting to the instance, you will need to decrypt a password from your key pair. To do this, press the '''Get Password''' link and follow its instructions. | ||
# Once you have your password, select the ''Download remote desktop file'' button to download an RDP file. | # Once you have your password, select the '''Download remote desktop file''' button to download an RDP file. | ||
|valign=top| | |valign=top| | ||
[[File:2021-aws-how-to-10.png]] | [[File:2021-aws-how-to-10.png]] | ||
| Line 199: | Line 208: | ||
|} | |} | ||
</tab> | </tab> | ||
<tab name="Grooper Installation" style="margin:20px"> | <tab name="Grooper Installation and Configuration" style="margin:20px"> | ||
=== Grooper Installation === | === Grooper Installation and Configuration === | ||
Once connected to the "Main" instance, you must do the following: | Once connected to the "Main" instance, you must do the following: | ||
| Line 209: | Line 218: | ||
# Install a '''Grooper Licensing''' service. | # Install a '''Grooper Licensing''' service. | ||
#* Be sure to include the VM's hostname in the security credentials for the user name. | #* Be sure to include the VM's hostname in the security credentials for the user name. | ||
# Manually adjust the file store's path in '''Grooper Design Studio'''. | |||
#* You will need to change the root of the UNC path from the machine's name to its private IP address. See the "Manually Adjust File Store Path" section below for more details. | |||
If you need guidance on installing and configuring '''Grooper''' or a '''Grooper Licensing''' service, please visit the the Install and Setup article on the Grooper Wiki. | If you need guidance on installing and configuring '''Grooper''' or a '''Grooper Licensing''' service, please visit the the Install and Setup article on the Grooper Wiki. | ||
| Line 214: | Line 225: | ||
* [[Install and Setup - 2022|Install and Setup - Version 2022]] | * [[Install and Setup - 2022|Install and Setup - Version 2022]] | ||
''For Version 2022'' | ''For Version 2022 and beyond'' | ||
If you are using the '''Grooper Web Client''', you must install IIS on the server and install the '''Grooper Web Client''' application. If you need guidance, please visit the Web Client article on the Grooper Wiki. | If you are using the '''Grooper Web Client''', you must install IIS on the server and install the '''Grooper Web Client''' application. If you need guidance, please visit the Web Client article on the Grooper Wiki. | ||
* [[Web Client | * [[Web Client]] | ||
=== Manually Adjust File Store Path === | === Manually Adjust File Store Path === | ||
| Line 227: | Line 238: | ||
:<code>\\<private IP address>\<folder path></code> | :<code>\\<private IP address>\<folder path></code> | ||
{| | {|class="fyi-box" | ||
| | | | ||
'''FYI''' | |||
| | |||
You can copy the Main instance's IP address from the | You can copy the Main instance's IP address from the EC2 Dashboard. Simply select the instance using the '''Instances''' interface and look for "Private IPv4 addresses" in the '''Details''' tab. | ||
|} | |} | ||
| Line 245: | Line 256: | ||
{| | {|class="attn-box" | ||
| | | | ||
⚠ | |||
| | |||
'''''It is generally ill-advised to manually adjust a Grooper object's properties using the Properties tab.''''' | '''''It is generally ill-advised to manually adjust a Grooper object's properties using the Properties tab.''''' | ||
| Line 264: | Line 275: | ||
{|cellpadding=10 cellspacing=5 | {|cellpadding=10 cellspacing=5 | ||
|valign=top style="width: | |valign=top style="width:22%"| | ||
[[File:2021-aws-diagram-security-group.png|center]] | [[File:2021-aws-diagram-security-group.png|center]] | ||
| | | | ||
| Line 291: | Line 302: | ||
|valign=top style="width:40%"| | |valign=top style="width:40%"| | ||
<br> | <br> | ||
First, you will need to access the Main instance's Security Group from the | First, you will need to access the Main instance's Security Group from the EC2 Dashboard. | ||
# You can access all Security Groups using the '''Security Groups''' link in the left hand navigation panel. | # You can access all Security Groups using the '''Security Groups''' link in the left hand navigation panel. | ||
# Or, you can select the Main instance from the '''Instances''' interface. | # Or, you can select the Main instance from the '''Instances''' interface. | ||
# Then, select the '''Security''' tab. | # Then, select the '''Security''' tab. | ||
# Then, select the item under "Security groups". | # Then, select the item under "Security groups". | ||
#* In our case, this is the security group we created when we launched our Main instance. | #* In our case, this is the security group we created when we launched our Main instance. | ||
#* Remember this Security Group's name. We will need to reference it later when creating our Worker instances. | #* Remember this Security Group's name. We will need to reference it later when creating our Worker instances. | ||
| Line 332: | Line 343: | ||
|} | |} | ||
{| | {|class="attn-box" | ||
| | | | ||
⚠ | |||
| | |||
These inbound rules will also need to be added to the Windows Firewall in the Main and Worker instances (or you can turn off the Windows Firewall on both machines). | These inbound rules will also need to be added to the Windows Firewall in the Main and Worker instances (or you can turn off the Windows Firewall on both machines). | ||
|} | |} | ||
| Line 342: | Line 353: | ||
{|cellpadding=10 cellspacing=5 | {|cellpadding=10 cellspacing=5 | ||
| | |style="width:16%"| | ||
[[File:2021-aws-diagram-worker.png|center]] | [[File:2021-aws-diagram-worker.png|center]] | ||
| | |||
Next, we will launch and configure the "Worker" EC2 instance. This virtual machine will be the image template for our processing machines. These virtual machines will process work supplied by the Main server's Grooper Repository. As such the following must be installed on the Worker instance after launching it: | Next, we will launch and configure the "Worker" EC2 instance. This virtual machine will be the image template for our processing machines. These virtual machines will process work supplied by the Main server's Grooper Repository. | ||
As such, the following must be installed on the Worker instance after launching it: | |||
* Grooper must be installed. | * Grooper must be installed. | ||
* They must be able to connect to the Main instance's Grooper Repository | * They must be able to connect to the Main instance's Grooper Repository | ||
| Line 395: | Line 408: | ||
|} | |} | ||
</tab> | </tab> | ||
<tab name="Grooper Installation" style="margin:20px"> | <tab name="Grooper Installation and Configuration" style="margin:20px"> | ||
=== Grooper Installation === | === Grooper Installation and Configuration === | ||
Once connected to the "Worker" instance, you must do the following: | |||
# Install '''Grooper'''. | |||
# Connect to the Main instance's '''Grooper Repository'''. | |||
#* See the "Connect to the Grooper Repository" section below for more specifics. | |||
# License the Worker instance using Main's license URL. | |||
#* See the "License the Worker Instance" section below for more specifics. | |||
# Install an '''Activity Processing''' service, running four threads. | |||
#* Please note when entering the '''''User Name''''' property, you typically use the following format: | |||
#::<code><machine name>\<user name></code> | |||
#* Because Auto Scaling is going to create new machines using an image of this Worker instance, the machine names will necessarily change. Use the "dot" shortcut instead, a la: | |||
#::<code>.\<user name></code> | |||
# Verify the Worker instance has access to the '''Grooper Repository's''' database and file store. | |||
#* See the "Verification" section below for more details. | |||
If you need guidance on installing '''Grooper''', please visit the the Install and Setup article on the Grooper Wiki. | |||
* [[Install and Setup - 2021|Install and Setup - Version 2021]] | |||
* [[Install and Setup - 2022|Install and Setup - Version 2022]] | |||
If you need more information about Activity Processing services, please visit the Activity Processing article on the Grooper Wiki. | |||
* [[Activity Processing - 2.90|Activity Processing - For Versions 2021 and earlier]] | |||
* [[Activity Processing - 2022|Activity Processing - For Versions 2022 and later]] | |||
=== Connect to the Grooper Repository === | |||
For the most part, you will connect to Main's Grooper Repository as you would normally. However, there is one key difference: | |||
* Instead of using the server's hostname when connecting to the Grooper Repository database, you will need to use its private IP address. | |||
{|class="fyi-box" | |||
| | |||
'''FYI''' | |||
| | |||
You can copy the Main instance's IP address from the EC2 Dashboard. Simply select the instance using the '''Instances''' interface and look for "Private IPv4 addresses" in the '''Details''' tab. | |||
|} | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
# In the '''''Server Name''''' property, enter the Main instance's private IP address. | |||
# FYI: Don't forget to enter the logon credentials to access the database, if necessary. | |||
|valign=top| | |||
[[File:2021-aws-how-to-21.png]] | |||
|} | |||
=== License the Worker Instance === | |||
When licensing the Worker instance, you will also need to use the Main instance's private IP address. | |||
Typically, when licensing a client machine with hosted license, you will use a URL with the following format: | |||
:<code>http://<hostname>:13900/LicenseService.svc</code> | |||
However, for this deployment, you will replace the hostname with the Main instance's private IP address, using the following format: | |||
:<code>http://<private IP address>:13900/LicenseService.svc</code> | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
To license the Worker instance, after connecting to Main's '''Grooper Repository''', open '''Grooper Design Studio''', then: | |||
# Select the root node of the repository. | |||
# Select the '''''License Server URL''''' property. | |||
# Enter the URL with the private IP address in place of the hostname. | |||
#* i.e. <code>http://###.##.##.##:13900/LicenseService.svc</code> | |||
#* ''FYI: You may need to close and reopen Grooper to verify licensing.'' | |||
|valign=top| | |||
[[File:2021-aws-how-to-22.png]] | |||
|} | |||
=== Verification === | |||
Prior to continuing, you should verify the following things: | |||
# The Worker instance has access to Main's '''Grooper Repository''' database | |||
# The Worker instance has access to Main's '''Grooper Repository''' file store. | |||
# The Worker instance's '''Grooper''' is licensed using Main's hosted license. | |||
#* Main's '''Grooper Licensing''' service must be running to verify this. | |||
# The Worker instance's '''Activity Processing''' service is running and executing '''Unattended Activity''' steps for production '''Batches'''. | |||
To test this, you should do the following: | |||
Logged into the ''Worker'' instance, try and copy and paste a document into a test '''Batch'''. Then, load that document's content (i.e. right click the '''Batch Folder''' and select ''File System Link > Load Content''). | |||
If you can do so, you've verified the following: | |||
# The Worker instance's '''Grooper''' is licensed (You'd get an error message upon opening '''Grooper Design Studio''' if it wasn't). | |||
# The Worker instance has access to Main's '''Grooper Repository''' database (You wouldn't be able to create a test '''Batch''' if there was some restriction on your database access). | |||
# The Worker instance has access to Main's '''Grooper Repository''' file store (You wouldn't be able to paste a document into Grooper and load its content if there is something restricting your file store access). | |||
Logged into the ''Main'' instance, test the '''Activity Processing''' service is running correctly | |||
* To do this, make a simple '''Batch Process''' (It could just have one step in it. It doesn't matter, it just needs to be an automatable '''Unattended Activity''' step). | |||
* Then, import a document into a new '''Batch''', assigning it the '''Batch Process'''. | |||
* Last, ensure the '''Batch''' is not "paused". | |||
If the '''Batch Process's''' steps execute automatically, you've verified the Worker instance's '''Activity Processing''' service is running and executing '''Unattended Activity''' steps for production '''Batches'''. | |||
</tab> | </tab> | ||
</tabs> | </tabs> | ||
=== Create an Amazon Machine Image (AMI) of the Worker Instance === | === Step 4: Create an Amazon Machine Image (AMI) of the Worker Instance === | ||
=== Create a Launch Template === | {|cellpadding=10 cellspacing=5 | ||
|valign=top style="width:40%"| | |||
[[File:2021-aws-diagram-iamge.png|center]] | |||
| | |||
In order to set up AWS Auto Scaling, you first need an Amazon Machine Image (AMI) and a Launch Template. | |||
Next, we will take a snapshot of our Worker instance and save it as an image. Now that the Worker has '''Grooper''' installed and licensed, we've verified it can access Main's '''Grooper Repository''', and it has an Activity Processing service installed, we can create its image. This is easily done in just a few steps. | |||
|} | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
First, ensure the Worker instance is running ''and'' the the '''Activity Processing''' service is also running. | |||
# In the EC2 Dashboard, navigate to the '''Instances''' interface in the navigation panel. | |||
# Right-click the Worker instance. | |||
# Select '''Images and templates'''. | |||
# Then, select '''Create image'''. | |||
|valign=top| | |||
[[File:2021-aws-how-to-23.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=5> On the following screen, name your image, using the '''Image name''' property. | |||
#* We've named ours "Worker Image". | |||
# Press the '''Create image''' button. | |||
|valign=top| | |||
[[File:2021-aws-how-to-24.png]] | |||
|} | |||
=== Step 5: Create a Launch Template === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:35%"| | |||
[[File:2021-aws-diagram-launch-template.png|center]] | |||
| | |||
Now that we have an image, we can create our Launch Template. | |||
A Launch Template defines settings to launch a new instance. This will allow Auto Scaling to create new virtual machines from the image we took in the previous step, and place it within the right Security Group. Auto Scaling will use this Launch Template to launch multiple new Worker instances, as processing demands require it. | |||
|} | |||
<tabs style="margin:20px"> | |||
<tab name="Create a New Launch Template" style="margin:20px"> | |||
=== Create a New Launch Template === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
# To create a Launch Template, navigate to the '''Launch Templates''' interface in the navigation panel. | |||
# Press the '''Create launch template''' button. | |||
|valign=top| | |||
[[File:2021-aws-how-to-25.png]] | |||
|} | |||
</tab> | |||
<tab name="Configure the Launch Template" style="margin:20px"> | |||
=== Configure the Launch Template === | |||
Configuring a Launch Template is a lot like launching a new instance. Just in our case, instead of creating an instance from a "blank" operating system, we're going to be creating instances from our Worker image. | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
# First, you'll need to give your Launch Template a name. | |||
|valign=top| | |||
[[File:2021-aws-how-to-26.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=2> Then, you'll need to select your image. | |||
::a. Select the '''My AMIs''' tab. | |||
::b. Select your Worker image from the dropdown selection list. | |||
|valign=top| | |||
[[File:2021-aws-how-to-27.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=3> Next, choose your instance type. | |||
#* You should choose whatever CPU and RAM configuration you chose for the Worker instance. | |||
|valign=top| | |||
[[File:2021-aws-how-to-28.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=4> Be sure to use the same Key Pair you used for the Main and Worker instances. | |||
|valign=top| | |||
[[File:2021-aws-how-to-29.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=5> CRITICAL!! Be sure to select the ''same'' Security Group the Main and Worker instances are using. | |||
|valign=top| | |||
[[File:2021-aws-how-to-30.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=6> When finished, at the bottom of the '''Summary''' heading, press the '''Create launch template''' button. | |||
|valign=top| | |||
[[File:2021-aws-how-to-31.png]] | |||
|} | |||
</tab> | |||
</tabs> | |||
=== Step 6: Configure the Auto Scaling Policies === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:35%"| | |||
[[File:2021-aws-diagram-auto-scaling.png|center]] | |||
| | |||
Finally, we come to the Auto Scaling setup. | |||
With an Auto Scaling Group, we will define a capacity and a scaling policy for our Worker machines. The capacity (or "group size") will determine the minimum and maximum numbers of Worker instances running at any one time. The scaling policy will contain the rules for when to spin up and spin down Worker instances. For example, we will tell our scaling policy to create a new Worker instance whenever the Worker pool's CPU utilization exceeds 50%. | |||
|} | |||
<tabs style="margin:20px"> | |||
<tab name="Create a New Auto Scaling Group" style="margin:20px"> | |||
=== Create a New Auto Scaling Group === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
To make a new '''Auto Scaling Group''': | |||
# In the EC2 Dashboard, scroll to the bottom of the left navigation panel and select '''Auto Scaling Groups'''. | |||
# Press the '''Create an Auto Scaling group''' button. | |||
|valgin=top| | |||
[[File:2021-aws-how-to-32.png]] | |||
|} | |||
</tab> | |||
<tab name="Name the Group and Select Launch Template" style="margin:20px"> | |||
=== Name the Group and Select Launch Template === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
# In the '''Name''' panel, give your Auto Scaling Group a name. | |||
# In the '''Launch template''' panel, select the Launch Template you created previously. | |||
#* This is the Launch Template designed to launch new Worker instances from your Worker image. | |||
# Press the '''Next''' button at the bottom of the page to continue. | |||
|valgin=top| | |||
[[File:2021-aws-how-to-33.png]] | |||
|} | |||
</tab> | |||
<tab name="Select Availability Zone" style="margin:20px"> | |||
=== Select Availability Zone === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
The most important part of the next set of configuration panels is selecting your '''Availability Zone'''. The '''Availability Zone''' for your Auto Scaling Group ''must match'' that of your Main and Worker instances. | |||
{|class="fyi-box" | |||
| | |||
'''FYI''' | |||
| | |||
If you have forgotten what Availability Zone you've placed your Main and Worker instances in, you can find your instances' Availability Zones in the '''Instances''' interface. | |||
|} | |||
|valign=top| | |||
[[File:2021-aws-how-to-34.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
# On the '''Choose instance launch options'' page, select the appropriate Availability Zone from the dropdown list. | |||
# Press the '''Next''' button at the bottom of the page to continue. | |||
|valgin=top| | |||
[[File:2021-aws-how-to-35.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
{|class="fyi-box" | |||
| | |||
'''FYI''' | |||
| | |||
The next configuration screen allows you to configure some advanced options, if you so choose, such as adding a load balancer, health checks, and other advanced options. | |||
We will not do so for the purposes of this tutorial. We will move on to the next configuration screen "Step 4: Configure group size and scaling policies". | |||
|} | |||
|valign=top| | |||
[[File:2021-aws-how-to-36.png]] | |||
|} | |||
</tab> | |||
<tab name="Set Capacity and Scaling Policies" style="margin:20px"> | |||
=== Set Capacity and Scaling Policies === | |||
On the next screen, you can configure the '''Group size''' and '''Scaling policies'''. These allow you to give the parameters to dynamically scale your Worker instances. | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
The '''Group size''' determines three important settings regarding the capacity of your Auto Scaling Group. In other words, how many Worker instances will be running at any one time. | |||
# The '''Desired capacity''' determines the base number of instances running at all times. | |||
#* We've set this to "2". So, when Auto Scaling is enabled, we will start out with two Worker instances. AWS will create and boot up two Worker instances for us. | |||
#* This number ''must'' be within the minimum and maximum capacity. | |||
# The '''Minimum capacity''' determines the minimum number of instances created and running at any one time. | |||
#* No less than this number of instances will be created. | |||
# The '''Maximum capacity''' determines the maximum number of instances created and running at any one time. | |||
#* No more than this number of instances will be created. | |||
|valign=top| | |||
[[File:2021-aws-how-to-37.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
The '''Scaling policies''' determine what metric is used to spin up new Worker instances, as needed, and spin them down whenever they're not needed anymore. | |||
# Select '''Target tracking scaling policy''' to set the scaling metric. | |||
# Use the '''Metric type''' property to select what will determine if a new instance is created or terminated. | |||
#* In our case, we're using ''Average CPU utilization''. Instances will be scaled based on what percentage of the processing resources are used by the various Worker instances in the group. | |||
# Set the '''Target value'''. | |||
#* This determines the percentage of CPU utilization required to spin up and down new Worker instances, in our case. If more than 50% of the combined CPU resources are working, a new instance will be created (up to the maximum capacity). If less than 50% of the CPU resources are working, instances will be terminated (up to the minimum capacity). | |||
# Optionally, the '''Instances need''' property can be configured to define a "buffer" before using the metric measurement. | |||
# When finished configuring the Group Size and Scaling Policies, press the '''Next''' button at the bottom of the page to continue. | |||
|valign=top| | |||
[[File:2021-aws-how-to-38.png]] | |||
|} | |||
</tab> | |||
<tab name="Review and Create Auto Scaling Group" style="margin:20px"> | |||
=== Review and Create Auto Scaling Group === | |||
{|cellpadding=10 cellspacing=5 | |||
|valign=top style="width:40%"| | |||
<br> | |||
# The last step is to review your your Auto Scaling Group in the '''Review''' screen. | |||
{|class="fyi-box" | |||
| | |||
'''FYI''' | |||
| | |||
You can optionally add notifications and tags in Steps 5 and 6 of the Auto Scaling Group setup. We chose not to for the purposes of this tutorial. | |||
|} | |||
|valign=top| | |||
[[File:2021-aws-how-to-39.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
#<li value=2> When you are satisfied with your configuration, scroll down to the bottom of the '''Review''' screen and press the '''Create Auto Scaling group'''. | |||
|valign=top| | |||
[[File:2021-aws-how-to-40.png]] | |||
|- | |||
|valign=top| | |||
<br> | |||
# Upon creating the Auto Scaling Group, AWS will automatically spin up the number of Worker instances listed for the desired capacity. | |||
#* Since our Worker image has an Activity Processing service installed, these instances will start grabbing work from the Main instance's Grooper Repository. | |||
#* Whenever these instances' CPU usage exceeds 50%, a new Worker instance will be created. | |||
#* Whenever the total CPU usage falls below 50%, a Worker instance will be terminated. | |||
|valign=top| | |||
[[File:2021-aws-how-to-41.png]] | |||
|} | |||
</tab> | |||
</tabs> | |||
[[Category:Articles]] | |||
[[Category:Version 2021]] | |||
[[Category:Version 2022]] | |||
Latest revision as of 11:26, 12 January 2024
|
WIP |
This article is a work-in-progress. This article represents our current understanding of the topic. It is subject to revision and expansion in the future. This tag will be removed upon draft completion. |
Easily scale your Grooper processing with cloud-based computing using Amazon Web Services and Auto Scaling.
About AWS
Imagine you normally process a hundred documents a day. Then, out of nowhere, you start getting a thousand documents a day. Maybe its a busy time of year for you. Maybe you landed a huge client and need to process their paperwork. Great news! But how do you account for the increase in computing demands? How do you both scale up your IT infrastructure to meet the new demand and scale it down once the demand has subsided?
One answer lies in cloud-based computing. Spinning up a pool of virtual machines to process the additional workload is, generally speaking, quicker and more cost effective than purchasing and deploying physical computers. Furthermore, what are you going to do once you're done processing all that extra work? With a cloud-based IT infrastructure, you can quickly deactivate those machines and re-activate them as needed on-demand. With a physical infrastructure, you're stuck holding a lot of additional hardware until you need it again.
Amazon Web Services (AWS) is one of the most popular on-demand cloud computing providers. Their Elastic Compute Cloud (EC2) gives users a pay-as-you-go model to create, launch and terminate virtual computers, as needed. These virtual machines (which Amazon calls "instances") can be built to mirror physical computer specifications, including operating system, CPU, RAM and storage options. EC2 encourages scalability with web services that allow you to take a snapshot of a server's configuration (an Amazon Machine Image or "AMI") and boot a virtual machine with whatever software you need already loaded.
Furthermore, the process of spinning up and spinning down virtual machines can be automated with AWS Auto Scaling. This allows users to set automatic scaling parameters, defining when to launch new EC2 instances to meet surges in processing demand. The virtual machines are then terminated as soon as demand dies down. With a pay-for-use model, you only pay for the machines while they're running. Ultimately, this saves you time scaling your IT infrastructure up and down and saves you money only paying for what you need when you need it.
In this article, we will show you how to set up a scalable Grooper deployment using Amazon Web Services (AWS), Elastic Compute Cloud (EC2) instances and Auto Scaling.
- For more information on EC2 instances, visit Amazon's EC2 documentation.
- For more information on Auto Scaling, visit Amazon's Auto Scaling documentation.
The General Process
The general steps to complete this deployment setup are as follows:
- Launch the "Main" EC2 instance.
- This is the virtual machine that hosts the Grooper Repository's database and file store and the Grooper license for the "Worker" machines.
- Setup the Security Group.
- In AWS, Security Groups are a set of firewall rules, restricting inbound and outbound traffic based on protocols and port numbers.
- Launch the "Worker" EC2 instance.
- This is the virtual machine performing automated processing tasks.
- Grooper will need to be installed. Grooper will need to be licensed using the Main instance's hosted licensing. The Worker instance will need to be able to connect to the Main instance's Grooper Repository.
- Create an Amazon Machine Image (AMI) of the Worker instance.
- This image will be a snapshot of the Worker machine, with Grooper installed and ready for document processing.
- This is used to create new Worker instances automatically according to the Auto Scaling setup.
- Create a Launch Template.
- Essentially, a Launch Template is a set of instructions to launch a new EC2 instance programmatically (rather than manually, as done in step 3).
- Auto Scaling will use the Launch Template to create new Worker instances, using the AMI created in step 5, and assign the right Security Group.
- Configure the Auto Scaling policies.
- This defines the minimum and maximum number of virtual machines to be added as well as the scaling rules, what conditions should be met to spin up and down new EC2 instances.

How To
Step 1: Launch the "Main" EC2 Instance
Getting Started
|
|
|
|
|
|
|
|
System Specs
Next, you will choose the virtual machines system specifications. There is some flexibility in your choices. However, there are some requirements and best practice suggestions you'll need to keep in mind. You will configure the following:
|
|
|
|
|
Network Settings
Generally speaking, every organization will have their own network security requirements. Your IT department will need to configure the EC2 instance's Network Settings panel according to your needs. For the purposes of this demo, we will use the default Network Settings.
- For more information on networking, visit the Amazon documentation here.
- For more information on security, visit the Amazon documentation here.
|
We will create a new Security Group in this demonstration. |
Login Info
Amazon strongly recommends you log into EC2 instances using a key pair. If you plan on connecting to your virtual machines using RDP (which we will in this tutorial), you must specify a key pair.
- For more information on key pairs, please visit the Amazon documentation here.
|
We have already generated a key pair and selected it. |
When you've finished configuring the EC2 instance, you will need to launch it, and then connect to it to install and configure Grooper.
Launch Instance
|
|
|
|
|
Connect to Instance
|
|
|
|
|
|
|
Grooper Installation and Configuration
Once connected to the "Main" instance, you must do the following:
- Install Grooper.
- Configure a new Grooper Repository.
- You will need to know the server's hostname when creating the Grooper database.
- If you are unsure of the VM's hostname, open a Command Prompt and enter "hostname".
- Install a Grooper Licensing service.
- Be sure to include the VM's hostname in the security credentials for the user name.
- Manually adjust the file store's path in Grooper Design Studio.
- You will need to change the root of the UNC path from the machine's name to its private IP address. See the "Manually Adjust File Store Path" section below for more details.
If you need guidance on installing and configuring Grooper or a Grooper Licensing service, please visit the the Install and Setup article on the Grooper Wiki.
For Version 2022 and beyond
If you are using the Grooper Web Client, you must install IIS on the server and install the Grooper Web Client application. If you need guidance, please visit the Web Client article on the Grooper Wiki.
Manually Adjust File Store Path
Typically, when you initialize a Grooper Repository, you give a UNC path for the folder location in the following format:
\\<machine name>\<folder path>
However, when the Worker instance accesses the file store, it will need to use the Main instance's private IP address, using the following UNC path format:
\\<private IP address>\<folder path>
|
FYI |
You can copy the Main instance's IP address from the EC2 Dashboard. Simply select the instance using the Instances interface and look for "Private IPv4 addresses" in the Details tab. |
Therefore, you will need to manually adjust the Grooper file store's storage path. To do so, open Grooper Design Studio and perform the following steps:
|
Step 2: Setup the Security Group
For this deployment, you will need to configure the following protocols and ports for inbound traffic:
TCP (Transmission Control Protocol)
- Port 13950
- This will open access for the Grooper REST API.
- Port 13900
- This will open access for the Grooper Licensing service, allowing the Main instance to supply licenses for the Worker instances.
- Port 13930
- Only required for version 2022 and later
- This will open access for the Grooper Web Client
- Port 13905
- Only required for version 2022 and later
- This will open access for the Grooper Desktop scanning application.
ICMP (Internet Control Message Protocol)
- All ports
- This will allow communication between the Main instance and the Worker instances, ultimately allowing the Worker instances to access Main's Grooper Repository for document processing.
|
|
|||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||
|
|
|
⚠ |
These inbound rules will also need to be added to the Windows Firewall in the Main and Worker instances (or you can turn off the Windows Firewall on both machines). |
Step 3: Launch the "Worker" EC2 Instance
Launch Configuration
For the most part, launching this instance will be very similar to launching the Main instance, with a few things to keep in mind.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Grooper Installation and Configuration
Once connected to the "Worker" instance, you must do the following:
- Install Grooper.
- Connect to the Main instance's Grooper Repository.
- See the "Connect to the Grooper Repository" section below for more specifics.
- License the Worker instance using Main's license URL.
- See the "License the Worker Instance" section below for more specifics.
- Install an Activity Processing service, running four threads.
- Please note when entering the User Name property, you typically use the following format:
<machine name>\<user name>
- Because Auto Scaling is going to create new machines using an image of this Worker instance, the machine names will necessarily change. Use the "dot" shortcut instead, a la:
.\<user name>
- Verify the Worker instance has access to the Grooper Repository's database and file store.
- See the "Verification" section below for more details.
If you need guidance on installing Grooper, please visit the the Install and Setup article on the Grooper Wiki.
If you need more information about Activity Processing services, please visit the Activity Processing article on the Grooper Wiki.
- Activity Processing - For Versions 2021 and earlier
- Activity Processing - For Versions 2022 and later
Connect to the Grooper Repository
For the most part, you will connect to Main's Grooper Repository as you would normally. However, there is one key difference:
- Instead of using the server's hostname when connecting to the Grooper Repository database, you will need to use its private IP address.
|
FYI |
You can copy the Main instance's IP address from the EC2 Dashboard. Simply select the instance using the Instances interface and look for "Private IPv4 addresses" in the Details tab. |
|
|
License the Worker Instance
When licensing the Worker instance, you will also need to use the Main instance's private IP address.
Typically, when licensing a client machine with hosted license, you will use a URL with the following format:
http://<hostname>:13900/LicenseService.svc
However, for this deployment, you will replace the hostname with the Main instance's private IP address, using the following format:
http://<private IP address>:13900/LicenseService.svc
|
|
Verification
Prior to continuing, you should verify the following things:
- The Worker instance has access to Main's Grooper Repository database
- The Worker instance has access to Main's Grooper Repository file store.
- The Worker instance's Grooper is licensed using Main's hosted license.
- Main's Grooper Licensing service must be running to verify this.
- The Worker instance's Activity Processing service is running and executing Unattended Activity steps for production Batches.
To test this, you should do the following:
Logged into the Worker instance, try and copy and paste a document into a test Batch. Then, load that document's content (i.e. right click the Batch Folder and select File System Link > Load Content).
If you can do so, you've verified the following:
- The Worker instance's Grooper is licensed (You'd get an error message upon opening Grooper Design Studio if it wasn't).
- The Worker instance has access to Main's Grooper Repository database (You wouldn't be able to create a test Batch if there was some restriction on your database access).
- The Worker instance has access to Main's Grooper Repository file store (You wouldn't be able to paste a document into Grooper and load its content if there is something restricting your file store access).
Logged into the Main instance, test the Activity Processing service is running correctly
- To do this, make a simple Batch Process (It could just have one step in it. It doesn't matter, it just needs to be an automatable Unattended Activity step).
- Then, import a document into a new Batch, assigning it the Batch Process.
- Last, ensure the Batch is not "paused".
If the Batch Process's steps execute automatically, you've verified the Worker instance's Activity Processing service is running and executing Unattended Activity steps for production Batches.
Step 4: Create an Amazon Machine Image (AMI) of the Worker Instance
|
|
|
|
|
Step 5: Create a Launch Template
Create a New Launch Template
|
|
Configure the Launch Template
Configuring a Launch Template is a lot like launching a new instance. Just in our case, instead of creating an instance from a "blank" operating system, we're going to be creating instances from our Worker image.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Step 6: Configure the Auto Scaling Policies
Create a New Auto Scaling Group
|
|
Name the Group and Select Launch Template
|
|
Select Availability Zone
|
|
|||
|
|
|||
|
|
Set Capacity and Scaling Policies
On the next screen, you can configure the Group size and Scaling policies. These allow you to give the parameters to dynamically scale your Worker instances.
|
|
|
|
|
Review and Create Auto Scaling Group
|
|
|||
|
|
|||
|
|
















































