AWS
This document will help guide you through understanding the process of building, deploying, and orchestrating Diarkis on AWS (EKS).
Overview
Using Diarkis is easy if you make use of our provided k8s configurations. However, please note that these configurations are in a primitive state, so feel free to modify them as necessary.
Requirements
Docker with one of the following configurations:
MacOS - Install Docker for MacOS. See the installation guide here.
Linux - Install Docker for your particular distribution of Linux according to the installation guide here. Note: Docker provides
.deb
and.rpm
packages for major distributions of Linux onx86_64/amd64
architecture, as well as experimental support for Arch-based distributions.Windows (with WSL2 or Hyper-V backend) - See the installation guide here. If installing Docker for the first time, please consider your use-case prior to backend selection.
AWS account with billing enabled. If you do not have an AWS account nor project created already, please see here to get started.
Kubernetes CLI (
kubectl
command) available for download here.EKS CLI (
eksctl
command) available for download on the AWS Workshop here.
Setup Guide
In the following steps we will guide you through the process of building, deploying, and orchestrating a template Diarkis server cluster. These instructions should be enough to help you get started.
Create ECR for Diarkis Images
Before we can push our Diarkis component images for deployment, we must first prepare remote ECR registries. As a base image we make use of alpine
by default, it can be retrieved from Docker Hub.
Create and Connect to EKS for Diarkis
Note: If an error occurs regarding NAT gateway compatibility in the selected AZ, choose a different AZ
Open EKS Firewall
Allow TCP and UDP traffic for ports 7000-8000
from 0.0.0.0/0
to EKS nodes.
We recommend setting this in the security group named: eks-cluster-sg-diarkis-*
.
Tag the Server Image and Push
From the project root generated by server-template
, run the following commands:
After generating server executables (udp
, tcp
, http
, mars
) in ./remote_bin
, build the container image:
Apply Manifest
Check if the following four components are running:
Check Diarkis Cluster
First, retrieve the public endpoint:
Send an HTTP GET request to the obtained EXTERNAL_IP
:
If you receive a response like the following, it is working correctly:
If there are missing items, there may be an issue with one of the deployed components. At this point, we recommend you to contact Diarkis support for further assistance.
Setup Cluster Autoscaler
This file is pre-configured for the cluster name diarkis
. If using a different cluster name, modify references to diarkis
in the manifest.
Setup Log Collector
Logs from containers can be aggregated using CloudWatch Logs.
fluent-bit
is already deployed in the amazon-cloudwatch
namespace, but permissions are not set.
Assign the CloudWatchAgentServerPolicy
to diarkis-public
and diarkis-private
nodes to aggregate logs. Logs will appear under /aws/containerinsights/Cluster_Name/application
, allowing for filtering.
Last updated
Was this helpful?