New AWS infrastructure for Omnipack using IaC

23 September 2020

New AWS infrastructure using IaC

 

For Omnipack, the e-commerce logistics company, we have prepared a new infrastructure in Amazon Web Services, using the Inrastructure as a Code approach and containerization.

 

Introduction

Omnipack is a company that deals with warehousing, packaging, shipping, as well as handling returns from online stores. Managing e-commerce logistics, it has integrations with most of the store engines (Shoper, Presta, WooCommerce, Shoplo, Shopify, Allegro, Show Room, IdoSell, RedCart, GoShop) and cooperates with the most popular courier companies (DPD, InPost, PP, Way2Send, UPS, FedEx, DHL, Paczka w Ruchu).

Their typical order comes from the store partner through an integrator, then the stock, product collection, order picking, order packing and bill of lading printing, confirmation of realization, career transfer and tracking of the package are verified. Omnipack records the highest traffic at the end of the year, during the Christmas shopping period, during Black Friday or Free Delivery Day.

 

Problem

Omnipack had a traditional infrastructure, based on VPS servers. A new challenge turned out to be the issue of scaling, hence the client asked us to propose an appropriate solution that would also include Kubernetes and Kafka. As Hostersi and AWS Advanced Consulting Partner, we convinced the client to Amazon Web Services.

 

Implementation

For our client, we designed the infrastructure at Amazon Web Services from scratch, taking into account his current needs. To automate some of the tasks, we decided to design the environment in AWS according to the Infrastructure as a Code approach. This allowed us to define the configuration of the application infrastructure in the form of a configuration template and to easily launch and manage AWS services.

The entire infrastructure is located in one region (eu-central-1 - Frankfurt). The network was divided into subnetworks according to layers: public, private, database. Each of them has its equivalent in each of the three availability zones (AZ). The new environment is mostly stateless - all critical elements have been migrated to containers. As Hostersi, we also maintain an environment based on Kubernetes.

 

Infrastructure scheme

new aws infrastructure using iac

 

The project uses the following AWS services:

Amazon EKS - is a fully managed Kubernetes service. The layer on which the whole application is based - manages virtual servers with containers (docker), access to the application (Loadbalancer ELB, directing traffic to the interior of the cluster - Traefik v2)

Amazon RDS for MySQL - the relational database service that makes it easy to set up, operate, and scale MySQL deployments in the cloud. In the project it provides access to application data

Amazon RDS for PostgreSQL – gives an access to the capabilities of the familiar PostgreSQL database engine. In the project it provides access to application data

Amazon Simple Storage Service (Amazon S3) - an object storage service that offers industry-leading scalability, data availability, security, and performance. Buckets containing static files, client files, backups

Amazon MSK - fully managed service that makes it easy for you to build and run applications that use Apache Kafka to process streaming data. Kafka cluster, used by applications.

Amazon CloudWatch - monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers. CloudWatch provides data and actionable insights to monitor applications, respond to system-wide performance changes, optimize resource utilization, and get a unified view of operational health

The AWS Command Line Interface (CLI) - a unified tool to manage AWS services from the command line and automate them through scripts AWS Command Line Interface

AWS CloudFormation provides a common language to model and provision AWS and third party application resources in your cloud environment. We used it for the automatic launch and management of AWS service collections according to the IaC approach

Amazon ElastiCache - fully managed in-memory data store, compatible with Redis or Memcached. Power real-time applications with sub-millisecond latency. It enables easy use of fully scalable cache.

 

External services:

Kubectl - a tool for direct access to the k8s cluster

Terraform - a tool for infrastructure management

Helm - package management in k8s

Terraform Switcher - switches automatically to the appropriate version of Terraform

 

The results

Omnipack has a new, scalable, easily managed and modern infrastructure based on Amazon Web Services. The IaC approach using AWS CloudFormation automates many processes, and the use of containers and Terraform allows you to implement changes in the application and deliver new versions 2x faster.  The time to build a new environment has been reduced from a few weeks to a few hours. This may prove to be crucial for achieving a competitive advantage on the e-commerce market. 

 

 

ANY QUESTIONS? CONTACT US

 

Read also: