---
title: Optional EC2 Configuration
slug: dsp-installation-guide/optional-ec2-configuration
description: Learn how to set up your environment to deploy Kron DSP on Kubernetes using AWS EKS. This document covers everything from installing AWS CLI, kubectl, eksctl, and Helm, to copying necessary files, configuring Docker Compose YAML file, installing Docker fi
docTags: 
createdAt: 2023-04-17T13:32:42.000Z
---

## EC2 Environmental Setup

Kron DSP is deployed on Kubernetes for easy autoscaling. AWS EKS will be used on deployment. All below installation steps must be executed on CMS.

First start with installing AWS CLI, that’s needed to connect to your AWS account:

:::CodeblockTabs
CURL

```curl
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"unzip awscliv2.zip
```
:::

:::CodeblockTabs
Shell

```shell
sudo ./aws/install -i /usr/local/aws-cli -b /usr/local/bin
```
:::

For more information: [https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html](https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html)

Next install kubectl with below commands:

:::CodeblockTabs
CURL

```curl
curl -O https://s3.us-west-2.amazonaws.com/amazon-eks/1.26.2/2023-03-17/bin/linux/amd64/kubectl
```
:::

:::CodeblockTabs
Shell

```shell
chmod +x ./kubectl

mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
```
:::

For more information: [https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html](https://docs.aws.amazon.com/eks/latest/userguide/install-kubectl.html)

After that install eksctl with below commands:

:::CodeblockTabs
CURL

```curl
curl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
```
:::

:::CodeblockTabs
Shell

```shell
sudo mv /tmp/eksctl /usr/local/bin
```
:::

For more information: [https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html](https://docs.aws.amazon.com/eks/latest/userguide/eksctl.html)

Last install helm with below commands:

:::CodeblockTabs
CURL

```curl
curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh
```
:::

:::CodeblockTabs
Shell

```shell
chmod 700 get_helm.sh

./get_helm.sh
```
:::

For more information: [https://docs.aws.amazon.com/eks/latest/userguide/helm.html](https://docs.aws.amazon.com/eks/latest/userguide/helm.html)



# EC2 CMS Deployment&#x20;

## Copy 'ms' folder on EC2

In this step, you will copy the "ms" folder to an EC2 (Elastic Compute Cloud) instance. The "ms" folder contains the configuration for the microservices that make up the application.



## Copy 'docker-compose-deploy.yml' on EC2

The "docker-compose-deploy.yml" file is a YAML configuration file that defines the Docker containers and environment that make up the application. In this step, you will copy this file to the EC2 instance.

## Configure Docker Compose YML&#x20;

This step involves editing the "docker-compose-deploy.yml" file to configure the database connection parameters to match the RDS instance you created earlier. Specifically, you will configure the DB\_URL, DB\_USERNAME, and DB\_PASSWORD parameters to connect to the database.



## Docker File installation&#x20;

This step involves logging in to the Docker hub of Kron Technologies. There will be specific read only user given to you with an access token. File can be installed after the login.



## Docker Deployment

This is the final step of the deployment process. It involves running the Docker containers defined in the "docker-compose-deploy.yml" file on the EC2 instance. This step brings all the components together and launches the application.&#x20;

