Deploying new OneList instance to EKS

Prerequisites

 

Recommended Configuration

Environments

EKS

SQL

Environments

EKS

SQL

Production

Worker node: EC2 T3.large, 2 vCPU, 16 GiB RAM

Worker node count: 3;

 

Amazon RDS for SQL Server

  • collation: SQL_Latin1_General_CP1_CI_AS

  • size: Standard instance, db.t4.large

Databases: 

  • OneList_p

  • RoleManager_p

  • Comms_p

Non-production

Worker node: EC2 T3.large, 2 vCPU, 16 GiB RAM

Worker node count: 3;

Amazon RDS for SQL Server

  • collation: SQL_Latin1_General_CP1_CI_AS

  • size: Standard instance, db.t4.large

Databases: the "x" represents the environment tag, e.g. d for Development, q for QA.

  • OneList_x

  • RoleManager_x

  • Comms_x

Connect to EKS cluster

  1. Configure your AWS CLI credential if it is not yet configured.
    Run command below and input information prompted.
    aws configure
    For more information, see Configuring the AWS CLI.

  2. Set context to the EKS cluster. Run the command below.
    aws eks --region <region> update-kubeconfig --name <cluster_name>

Deployment steps

Open a command prompt from the folder that contains the YAML deployment files. Flow steps below to deploy OneList.

1. Create the Kubernetes namespace

Run the command below to create the Kubernetes namespace for the OneList environment, e.g. onelist-dev.

kubectl create namespace <ONELIST_NAMESPACE>

For example: 

kubectl create namespace onelist-dev

2. Create ConfigMap and Secret

The values.yaml file configures the required environment variables that are used by OneList services.

Open the "values.yaml" in notepad and update the following fields with the actual value. 

Save the "values.yaml" file.

3. Install the AWS Load Balancer Controller add-on (if not installed)

  1. Verify that if the controller is installed. Skip this section if already installed.

    kubectl get deployment -n kube-system aws-load-balancer-controller

    If you see the following. The Controller is installed.

    NAME READY UP-TO-DATE AVAILABLE AGE aws-load-balancer-controller 2/2 2 2 20h
  2. Follow this instruction to create a n OIDC provider for the cluster.
    https://docs.aws.amazon.com/eks/latest/userguide/enable-iam-roles-for-service-accounts.html

  3. Skip this step if AWSLoadBalancerControllerIAMPolicy policy already exist.

    Download an IAM policy file.
    https://raw.githubusercontent.com/kubernetes-sigs/aws-load-balancer-controller/v2.4.7/docs/install/iam_policy.json

    Create an IAM policy using the policy downloaded in the previous step.

    aws iam create-policy \ --policy-name AWSLoadBalancerControllerIAMPolicy \ --policy-document file://iam_policy.json
  4. Check if role AmazonEKSLoadBalancerControllerRole already exists. If already exists, use another role name.

    a. Create an IAM role. Replace my-cluster with the name of your cluster, 111122223333 with your account ID, AmazonEKSLoadBalancerControllerRole with your role name and then run the command.

  5. Install the AWS Load Balancer Controller using Helm. Replace region-code, vpc-xxxxxxxx and my-cluster with the correct value.

4. Deploy OneList Helm chart

Enter the folder that contains the values.yaml and onelist.tgz files. Run the command below.

helm install <ONELIST_NAMESPACE> -n <ONELIST_NAMESPACE> -f .\values.yaml onelist.tgz

For example:

helm install onelist-dev -n onelist-dev -f .\values.yaml onelist.tgz

5. Get the generated AWS public URL for OneList DNS configuration

Run the following command to discover the public URL of the environment for configuring the OneList DNS alias.

kubectl get ingress -n <ONELIST_NAMESPACE>

The AWS public URL is similar to this: e6325261-onelist650-onelis-7461-1342161572.ap-southeast-2.elb.amazonaws.com

6. Create the administrator user account

  • Navigate to the OneList URL in the browser, you will be presented to the following page to create the first user account. The System Administrator access is automatically granted to this user account.

  • Log on using the email and password of the newly created user account to complete the application configuration steps.