Orchestration

WAHYU ADT
UKM Heroes
Published in
4 min readNov 7, 2019

Hello again ! today we are going to discuss the continuation of the topic Deployment that can be reached here. So now we are going deeper on what it is called Docker Orchestration.

source

What is Docker Orchestration actually? Docker containers itself is created to enable fast and reliable deployment of an application. Either components or tiers. Docker then create a container that makes application ready to deploy, with all the prerequisite stuff included. With the existence of the docker itself, we can ensure the ability to manage deployment and maintenance.

But what if our apps consists of multilayer or multiservice? The maintenance and the deployment is manageable if it’s only ten containers or so. That scalability problem then brings what we called container orchestration. The orchestration will manage the lifecycles of containers in large and dynamic environments. So orchestration mainly control about the deployment, load balancing, configuration, and maintenance in large scale

Creating the Docker Image

To create a Docker image, we need to have a Dockerfile that will be the base to create the image. It will list or explain what and how the image contain the app.

The script consists of build and package. The node based image is needed since our angular is a JS framework. The npm install to build the image and prepare all the dependencies. Then npm build to compile into the html, css, and js files.

After we compile the image, we will move to the Nginx since it is used as our web server to display our resources. we copy the compiled resources to the appropriate folder and assigned the port 80

Gitlab CD as Deployment

If you want to use the continuous integration and deployment a.k.a CI/CD in gitlab, we need to use .gitlab-ci.yml file. The gitlab ci in our project :

In the deployment, exist Docker in Docker that is actually a docker engine inside of a docker image, so we can have a docker for staging or deployment inside one. If we happen to already have built an image before, we can use it as reference from the cached image to make image building faster.

Amazon Web Service

Amplify Console

The amplify console is an original CI/CD web hosting service by Amazon Web Service. The CI/CD is pretty much similar to gitlab’s. Usually used for a serverless web apps. Amplify creates frontend and backend environmnets every time we add new features.

AppSync

Amazon introduce the AppSync as the tools to build big, scalable application that requires frequent updates, or even real-time updates using database. AWS AppSync will automatically as real time updates the data in web and mobile applications and update data for offline users when they reconnect. The key here is data synchronization.

DynamoDB

Amazon (again) presents a key-value and document database that can handle even at any scale that is used to build serverless apps and runs in high-performance.

Cognito

Cognito is other amazon service that focused on identity management and user authentication. In our project, Cognito take role as primary user pool and identity pool to access other resources

S3

Simple Storage Service. Store system storage and mainly now for images.

Application

Angular

Angular is our frontend framework. A request from the Product Owner since the backend already use and implemented on angular.

Amplify JS

Amplify JS classifying the AWS serevices that we use to categories like auth, storage, and API. Amplify JS is a framework that can work with other frontend framework like angular.

RETAKE 15Nov2019

The Software Architecture Diagram

Our software architecture diagram

For more detailed picture or diagram, go here.

--

--