DEV Community

Ali Abbas
Ali Abbas

Posted on

Explain CI/CD like I'm five.

Explaination of Continous Integration/Continous Delivery (CI/CD)

Latest comments (43)

Collapse
 
ayushsharma profile image
Ayush Sharma

Imagine you're delivering a pizza.

This requires two things. First, you and your 3 chefs need to make the pizza. Second, the delivery guy needs to deliver it to the customer.

The first part is Continuous Integration. You and your chefs (your team) decide what kind of pizza it is based on customer requirements. You then figure out which order everything happens in. So if someone starts deciding on the toppings before you decide which base and sauce to use, you need to stop and go back. CI involves integration checks to make sure everything happens in the correct order (is the code formatted correctly? unit tests?). Then you start placing the toppings and ensure you're following the requirements (pull-request review). If the toppings aren't good quality, you replace them (code quality scanning).

Then the delivery happens. You need to decide which delivery guy will take which route to deliver the pizza (your software product) on time. Figuring out this logsitcs and supply chain process is the Delivery part of Continuous Delivery.

When you can do both in one big smooth operation: get customer order -> assemble pizza + quality checks -> delivery pizza, you have Continuous Integration + Continuous Delivery.

Hope this helps :)

Collapse
 
jhermann profile image
Jürgen Hermann

See Continuous Delivery Explained. Maybe not ELI5, but you be the judge.

Collapse
 
v6 profile image
🦄N B🛡 • Edited

// , Awww, hello there little guy. Cute hat! My, how you've grown over the years. Cookies? Well, grandma's got a whole jar of cookies for you. Not only are they vegan, they're even gluten free!

Eat up. Don't make that face, now, little man, this was your idea.

Anyway you want to learn about CI/CD?

Well, let me ask you this, "Do you like bacon?"

After little piggies have been pumped full of enough hormones to make them big and fat and gotten chopped into bacon pieces at the farm, what has to happen next?

That's right, somebody has got to deliver them to the grocery store! (And if there's an ocean, the bacon's gotta be shipped on a ship.)

Now, in this way, bacon is like code. Somebody's gotta ship it.

And do you know who ships the code?

The Shippit Squirrel!

Here he is.

Behold The Shippit Squirrel

Cute little feller, huh?

Yes, he does all the deliveries. And his job is CI/CD.

Of course you can work with him. No, you don't have to be a squirrel, or even a chipmunk!

Now Junior, why haven't you finished your cookies????

Collapse
 
richardeschloss profile image
Richard Schloss • Edited
  1. Create one file: gitlab-ci.yml
  2. Not sure where to start with this thing? What's yml? No worries...just select a template from the gitlab dropdown to start.
  3. Click the run button and have tons of fun :) Playing for a few days will show you the way kiddo :)
Collapse
 
dansilcox profile image
Dan Silcox

Yo sushi! Each dish (chunk of code / commit / merge / whatever) is checked by the chef and plated up (built and tested - CI) and then put on the conveyor for each customer to consume (deploy to production - CD)!

Mm so hungry right now 🍣

Collapse
 
jcoelho profile image
José Coelho

Like you're 5...

Imagine your building a Lego house 🏠 🔨 with a bunch of your friends. Each of you is building a different part of the house.

Every time one of you adds its part to the existing base of the house, your teacher (CI) comes in and shakes the house to make sure nothing breaks and everything is well put together.

If every thing is OK (CI passes) she builds a replica of the house on the playground for all the other kids to play with. (CD)

Then one of the kids breaks the house and they come crying for you to fix it! 😭

Collapse
 
abhishekpakhare97 profile image
Abhishek Ramesh Pakhare

😂😂😂😂😂😂

Collapse
 
realabbas profile image
Ali Abbas

Great. 🤣🤣

Collapse
 
matthewhartstonge profile image
Matthew Hartstonge

I always explain it at work like this:

Continuous Integration (CI)/Continuous Delivery (CD) is like baking cookies.

When creating a cookie you build a recipe and go through the process of taste testing the recipe to ensure the cookie you want to cook is just right, not too much butter, salt wasn't used instead of sugar, that kind of thing.

Likewise, with code we run CI to build and test our code making sure it tastes like an API, an app or library to ensure it returns to the user a sugary tasty response that delights, not leaking any data or bugs that tastes salty or buggy...

Once you know you have a beautiful recipe that won't fail to delight, you get into the process of creating it for everyone with a cookie factory. So you get to work baking the cookies from the recipe you've tested, package them and deliver them for customers to enjoy.

With CD, we have a factory (Drone, TravisCI e.t.c.) configured to build our 'code recipe', which may or may not grab some extra ingredients (dependencies), proceeds to mix (compile) and cook (link) the cookies. Once we have a finished cookie, it can get to work packaging them (docker, exe, dmg e.t.c) and deploy/deliver them (docker registry, kubernetes e.t..c) for customers to enjoy.

Collapse
 
taragrg6 profile image
taragurung

Continuously integration: Doing whatever is required before making your codebase ready to deploy. For example: we build and test (optional) any angular application to generate a build file. Everything must be in automated fashion

Continuous deployment: putting it to server in automatic fashion

Collapse
 
markoa profile image
Marko Anastasov • Edited

Tests: Help have less 🐛 and, when you get good at it, write more clear code.

CI: Let 🤖 run your tests every time you change your code and shout if you broke anything. At the end of a CI pipeline comes out something that you can deploy.

CD: Let 🤖 deploy a new version of your app every time all tests are ✅ so you can focus on what matters.

Come for the automation to save time and avoid mistakes, stay for improved productivity. Shipping with confidence → shipping more often → happier users and you. ❤️

P.S. If you're looking for a free service, Semaphore can help. 😉

Collapse
 
onekiloparsec profile image
Cédric Foellmi

My take: Everything that is today necessary to transform lines of code into a production app / service.

Collapse
 
yonahd profile image
yonahd

In an example of a computer game (for a 5 yr old)
CI would be every time a new part (feature) is created checking and adding it to the game.
CD would be the part that every time a feature is added it would be the current version that is available.

Collapse
 
colinpear profile image
Colin Pear

Sometimes people pay me money to make them a present they can use on their computer—like a video game.

First I write the instructions on how to make the present. Then I put them into a C/CD machine.

The machine builds my present. It tests it to make sure there were no goobers, boogers, or ear wax in my instructions. And if everything's ok it packages up my preset and sends it to a magical land made of clouds called Microsoft Azure. Then all of my friends can open my present and play with it on their computers.

Collapse
 
realabbas profile image
Ali Abbas

I hope, my friends like the present.❤🖖👍🙄

Collapse
 
jaymeedwards profile image
Jayme Edwards 🍃💻 • Edited

I made a YouTube video on my channel a couple years ago for this purpose. It doesn’t get into CI much but I did my best to explain Continuous Delivery as a /principle/ so you don’t get hung up on tools or processes.

I’ve been implementing CD as a consultant for 8 years, so while I’d never consider myself an expert (see Jez Humble), I hope I can offer you some value from my experience. YMMV.

I really hope it helps someone!

Continuous Delivery: Are You Missing The Big Picture?

youtu.be/TioLSzFw7Yo

Collapse
 
derek profile image
derek • Edited

CI == Automating the running of code, tests, and or builds on a separate machine

( 𝝀,✅,🔨) 🔜💻🔜👌🏾

Good CI will prevent 👇🏽

Jackie

CD == Automating the deployment of code to a server

𝝀 🔜💻

Good CD will prevent 👇🏽

Nope

It's important to note that Continuous Delivery and Continuous Deployment are not the same thing. The two get conflated and sometimes used wrong interchangeably. Continuous Deployment specifically means deploying straight to production.

When CI/CD is put into practice it creates automation. When automation works as it is intended, it's magical.

Collapse
 
quii profile image
Chris James

No it isn't.

CI is "continuous integration". Where your team "continuously integrates" their code so everyone is working with as similar version of the code as possible.

Collapse
 
derek profile image
derek • Edited

Indeed. But I was speaking in the context of process and implementation versus the definition of the term.

Typically we’re asked to implement it, or how we’d implement it.

All with the idea of being able to integrate code more efficiently and effectively with the emphasis of “continuous”. Otherwise it would be more intermittent due to the “it works on my machine”.

Collapse
 
ogrotten profile image
ogrotten

What are your emoji supposed to mean?

Collapse
 
derek profile image
derek
  • Lambda emoji represents code
  • Check represents tests pass
  • hammer represents build
  • computer represents a machine
  • arrow represents direction over time

Some comments may only be visible to logged-in visitors. Sign in to view all comments.