Deploy Your Application Using CI - CD & Docker

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 40

Deploy your application

using CI/CD & Docker


Iqbal Syamil - Devops Engineer @ Pintu & Rupiah Token
Hi, Folks 🙌

My Name Is Iqbal Syamil

- DevOps Engineer at Pintu & Rupiah Token


- Junior Students of Informatics at Telkom University
- Co-organizer at Kubernetes & Cloud Native Bandung

I also made videos on Youtube 🙌🏻

2
Version Control
https://www.optimizely.com/optimization-glossary/trunk-based-development/
“We need automation”
What Is CI/CD ?
CONTINUOUS INTEGRATION

Continuous Integration is a software development practice where members of a


team integrate their work frequently, usually each person integrates at least
daily — leading to multiple integrations per day. Each integration is verified by
an automated build (including test) to detect integration errors as quickly as
possible. -”Martin Fowler”
CI Requirements

- Automated Build
Automated script that creates packages that can be deployed to any
environment, These builds should be numbered and repeatable
- Automated tests
When Tests became fail, you know there's a real problem, and when they
pass, you're confident there are no serious problems with the system
What If the code use interpreted lang?
Meet Container
What is a container?

● Standardized packaging
for software and
dependencies
● Isolate apps from each
other
● Share the same OS kernel
● Works for all major Linux
Distributions, macOS &
Windows
“Isolate your app & ship it anywhere”
“VMs != Container”
Meet Docker

Docker is a tool designed to


make it easier to create,
deploy, and run applications
by using containers
Docker Object

- Docker Images
- Docker Container
- Docker Volumes
- Docker Network
Docker Images
Docker Image
The basis of a Docker container. Represents a full
application
- Can be pulled and pushed towards a registry
- Image names have the form [registry/][user/]name[:tag]
- The default for the tag is latest

Important Note:
Images are STATELESS and IMMUTABLE
Docker Hub

Like GitHub but for Container Images


Build Custom Images With Dockerfile

Example Dockerfile for NodeJS app

○ FROM - specify the parent image


(almost always the first command)
○ COPY - copy files from the host into
the image
○ RUN - run a command using
binaries inside the container
(install services, etc.)
○ CMD - specify the default command
(if one not specified in parent
image)
Docker Container

a running instance of docker image

https://phoenixnap.com/kb/docker-image-vs-container
Docker Volume
Docker volumes are file
systems mounted on Docker
containers to preserve data
generated by the running
container.

We can use Persistent


volume / bind volume
Docker Network

Docker networking is basically


used to establish communication
between the docker containers and
the outside world

https://ostechnix.com/explaining-docker-networking-concepts
Meet Docker Compose

Docker compose is a tool


for creating and managing
multi container applications

We can simply by using 1


command
E.g. Docker-compose up
Docker Compose: Multi Container Applications

● Build and run one container at a ● Define multi container app in docker-
time compose.yml file
● Manually connect container ● Single command to deploy entire app
together ● Handle container dependencies
● Must be careful with dependencies ● Works with Networking, Volumes
and start up order ● Easy to migrate the application to
Kubernetes
Docker-compose.yml

● Containers are all defined in a single


file called docker-compose.yml
● Each container runs a particular
component/service of your application.
For example:
○ Web frontend
○ User authentication
○ Payments gateway
○ Database
● Compose will spin up all of your
containers in a single command
CONTINUOUS DELIVERY

Continuous Deployment (CD) is a software release process that uses automated


testing to validate if changes to a codebase are correct and stable for immediate
autonomous deployment to a production environment.
CD Require Input
● Packages created by the continuous integration (CI) process
● Scripts to configure the environment, deploy the packages
● Environment-specific configuration information.
Delivery vs Deployment
Demo Time
Jangan Lupa Subscribe!

youtube.com/c/IqbalSyamil
Thank You! ✨

Reach me:
facebook.com/iqbal.syamil.39
Credits & Thanks to telegram.me/iqbalsyamil
youtube.com/c/IqbalSyamil
Imre Nagi, Google Developer Expert
We’re Hiring!
pintu.co.id/careers

40

You might also like