AWS Container Setup
  • 12 Nov 2024
  • 2 Minutes to read
  • Dark
    Light

AWS Container Setup

  • Dark
    Light

Article summary

Overview

Through its use of Modules, Decisions provides the capability to integrate with many different Container and Docker based systems. One such common containerized service integration is integration with Amazon Web Services (AWS).

Integrating with AWS gives users the ability to leverage Container Orchestration Architecture; this in turn allows users to scale and descale implementations rapidly, allowing for better performance, cost, and efficiency. The following document demonstrates how to configure a Decisions image on an AWS Container.


Example  

Example Prerequisites 
  • EC2 instances in AWS with their associated RDS instances; the EC2 instances must be a current Windows OS and the RDS instance is required for SQL Express
  • Decisions installation on the EC2 instances. (For more info see Installing on AWS)
  • .NET SDK installed on the Decisions instance
    • The current version of .NET SDK can be confirmed by running the following CMD: "dotnet --list-sdks"
    • To download the Windows Installer for .NET SDK 6.0, see Download .Net Core 6.0.
  1. After installing Decisions, navigate to System > Administration > Features.
  2. Locate the Docker Module, then click DETAILS and then INSTALL. 
  3. After the Module installs, open DecisionsServerIntaller.exe and select RESTART SERVICE. 
  4. Back in Decisions Studio, navigate to System > Security > Accounts, select CREATE ACCOUNT, and create a new User Account; for this example, provide the Username "docker@decisions.com" and the Password "docker". 
    Default Docker Account
    This Docker Account is the Default Account that is used to talk with the EC2 instance; this can be changed in AWS if the default Account is not desired. 

  5. After creating the Account, create an AWS Cluster with the default configurations by navigating to All Services > Containers > Elastic Container Serivcer > Clusters and selecting Create Cluster. 

  6. From the Select cluster template panel of the Create Cluster window, select EC2 Windows + Networking, then click Next step.

  7. From the Configure cluster panel, provide the desired Cluster name. Then, leave the rest of the values set to their default options, and click Create

  8. Afterward, navigate to All Services > Containers > Elastic Container Servicer > Task Definitions and click Create new Task Definition.

  9. Select EC2, then click Next step. 

  10. While maintaining the default configurations for this example set up, declare a Task Definition Name then set the Task memory and Task CPU values.

    Task Size Flexibility 
    Note that the Task Size settings can be adapted at the user's discretion for their environment. This example uses 1VCPU for Task CPU and 1GB for Task memory respectively.


  11. Scroll down to Container Definitions, then click Add Container

  12. Give the Container a Name, add the Docker Image "decisionscore/unstable:latest" in the Image box.

  13. Under Environmental Variables, provide the Keys and Values listed on the chart below, then click Add.

    Default Username and Password Keys/Values
    Both SETTING_USERNAME and SETTING_PASSWORD keys and their respective Values are optional.

    If these values are not used in the configuration, Decisions and the EC2 instance will use the default values of the used Account

    Key Value
    SETTING_DATABASE_CONNECTIONRDSConnectionString
    SETTING_PORTAL_BASE_URLhttp://decisionsIPorDNSname/decisions
    SETTING_SHM_BASE_URLhttp://decisionsIPorDNSname/decisions/Primary/REST
    SETTING_USERNAMEAdminEmail
    SETTING_PASSWORDAdminPassword
    SETTING_TAKE_REQUESTStrue

  14. After the Container has been added, scroll to the bottom of the page and click Create.

  15. Navigate back to the Clusters window, select the previously created Cluster.

  16. Under the Tasks tab, select Run new Task.

  17. From the Run Task window select the Task from the Task Definition > Family dropdown.

  18. Under VPC and security groups, select the desired Subnet, then scroll to the bottom of the page and select Run Task

  19. Navigate to the Logs tab by selecting the Task and clicking Logs; periodically click the Refresh button on the right-side of the page until the Logs populate with the Container Status.

    Log Population Behavior 
    Depending on the type of EC2 instance created, it may take a bit for the Logs to populate with the Container Status.

    The population of these Logs is an indication that the application has started. 

  20. Once the Task begins to run, ensure that the EC2 Instance is active and that the Container is displayed under System > Administration > Containers in the Decisions Studio. 

  21. Access the Docker Image by inputting the URL at Internal IP Swagger.


Was this article helpful?