Or·ches·tra·tion

/ˌôrkəˈstrāSHən/

Vadim Bhirawa
UKM Heroes
5 min readNov 7, 2019

--

What is this kid doing bothering people at 3 AM?

Hello, hello. It’sa me back at it again with deployment, now I’m back with a quickie and will dive deeper into Docker, this time I’m gonna talk about something called Docker Orchestration.

Source

Docker Orchestration

the arrangement or scoring of music for orchestral performance.

Of course, the above quote will most likely appear in Google if you type “Orchestration Meaning”, and roughly most people would also answer that if you randomly bothered them and ask what “Orchestration” is. However, if we break down the meaning, Orchestration can mean to plan or coordinate elements to produce a desired effect, akin to the orchestration that we want to learn.

Orchestration is actually the automated configuration, coordination, and management of computer systems and software. In this case, a Docker Orchestration deals with the automated coordination and management of Containers in Docker based on the microservices we have in our app. It is focused on managing the life cycle of containers and their dynamic environments.

Docker

I am definitely not going into more details as I already talked quite a lot about Docker in my previous post. I am probably only going to be explaining a bit about some things that I may have skimmed or rushed previously, like how Docker Images work, etc.

Docker Image

As I said previously, we can create Docker Images by configuring the Dockerfile. The Dockerfile will be the base of a Docker Image and will list the images and manage how it will be contained in the app.

We use the “FROM node:…” because our framework, Angular, is a JS Framework. Of course, we have npm install as we have to prepare all of the dependencies and it’s used to build the image as well. The npm will build it and compile to the html, js, and css files.

Now that that’s done, we use “FROM nginx” to deploy our app. Nginx is used for the web server to display our app. We copy the resources to the correct folders and assign them to port 80. That’s what “EXPOSE 80” means.

Deployment

We use Gitlab CD as Deployment, as I mentioned before. In our .gitlab-ci.yml, one of the Docker inside a Docker is actually a Docker Engine inside of a Docker Image. This is done so if we have already built an image already, that can be used as reference from the cached image to make image building even faster. Here’s a snippet of our .gitlab-ci.yml to jog our memory a bit:

AWS

As I mentioned last time too, we use AWS (Amazon Web Service). Because of this, we use AWS Amplify for webhosting.

Amplify Console

Amplify Console is a CI/CD and web hosting provided by AWS. We can use it to host full stack serverless web apps. It’s pretty similar to Gitlab, as it has a GIT-based workflow, so we can code like we always do. Front-End and Back-End Environment are created every time we add new features by Amplify.

DynamoDB

Also provided by AWS, we use DynamoDB as our main database. Amazon DynamoDB is a fully managed proprietary NoSQL database service that supports key-value and document data structures. As we have a large database, NoSQL can prove better than SQL as it scales horizontally (we only need to add new servers).

AppSync

Damn AWS! AWS back at it again for our AppSync. Amazon AppSync is a managed service that uses GraphQL to make it easy for applications to get exactly the data they need. AppSync help with combining multiple data sources into one GraphQL endpoint. We use this to query the data we have on DynamoDB by using GraphQL.

Cognito

Cognito, not Incognito on your browser. You might’ve guessed it, but this is also provided by AWS. Amazon Cognito lets us add user sign-up, sign-in, and access control to our web and mobile apps quickly and easily. Amazon Cognito scales to millions of users and supports sign-in with social identity providers, such as Facebook, Google, and Amazon, and enterprise identity providers via SAML 2.0. We use Cognito mainly as an identity/user pool to access other resources.

S3

Amazon Simple Storage Service (Amazon S3) is an object storage service that offers industry-leading scalability, data availability, security, and performance. We use S3 as the storage of our images.

While there are some other services we utilize in our project (such as IAM, CloudWatch, Lambda, etc), we use these 5 services as our main ones. The others have their specific roles.

The Application

For the application of course we use other services.

Angular

The development team in UKM Indonesia had already been using Angular before, which is why we use this. Angular is a TypeScript-based open-source web application framework and a platform for building mobile and desktop web applications.

AmplifyJS

AmplifyJS is a set of components designed to solve common web application problems with a simplistic API. It classifies the AWS Services that we use into categories like API, authentication, and storage. It’s a JavaScript framework that works flawlessly with our front-end framework, Angular. It is designed to help abstract most of AWS’s little configuration so that developer can focus more on building the app itself.

Parting Words

NONO, I didn’t mean parting words like

Goodbye Cruel World

Or something as vague as that. It’s our usual summary.

So basically there’s a lot of app that we use and Docker Orchestration is a Symphony that blends all of them together on our app.

Music to your ears, demise to my braincells.

Alright goodbye all! Here’s a parting gif from me (hehe get it?):

A great loop video for a Lo-Fi Hip-HopTrack

Adios~

Software Architecture

Former Software Architecture for UKM Indonesia

--

--