@MMarahatta
manishmarahatta.com.np
me@manishmarahatta.com.np
"programmer, emacs aficionado, linux addict, activist"
CONTAINER REVOLUTION
...one SHIT STUFF to rule them all
History
Solomon Hykes and dotCloud
- dotCloud were essentially a Heroku competitor.
- Hykes was using LXC.
- Docker was borne from the tools Hykes was building at dotCloud.
- March 2013.
- He was simply open sourcing a way of parallelisation that had been around for a few years.
Why/How is it so powerful??
Vertical versus Horizontal
How to find a web page
Vertically
Step 1: Get a very, very, very big computer.
Step 2: Get a very, very, very fast Internet connection.
Step 3: Load every page on the Internet.
Horizontally
Step 1: Get lots of computers to scrape the Internet. Yesterday.
Step 2: Store just the text using something like Balanced Binary Trees.
Step 3: Search the Internet in RAM.
Questions??? so far...
The limits of physics
Balanced Binary Search Tree
Concurrency versus Parallelism
Interruptible versus Independent
Walking on the street is interruptible.
But answering your phone is not independent.
Putting out a fire is independent.
But not interruptible.
Race Conditions
Handling lots of web
- Independent, but not interruptible. Eg; failed email delivery messages
- Racks with 256RAM and 16 cores :)
- VMs are programmable, which saves labour and money.
- Arbitrary scaling and parallelism mean we can forget about physics.
- ‘Elastic computing’ saves money.
Independence As A Service
- Heroku was a natural evolution of shared hosting. But not using VMs.
- Less access to servers (no FTP, no permanent storage, etc) and strict requirements (git, all external services must be run separately).
- But it could be easily and arbitrarily scaled.
Independence As A Service
- please have a look at github.com/manishmarahatta/peas
- it's nothing but a great thing
- heroku = peas
Formalisation of Parallelisation
- LXC: Linux containers.
- Google and other large compute companies.
- Doesn’t virtualize CPU/RAM it restricts access to them.
- More like `init` process than a VM.
- PHP, Python, Ruby, Java: all run on Linux.
Codebase in Revision Control
- Backup, querying history, collaborating (like a mutex).
- Moving code between live, distributed, concurrent, containers is quicker.
- Prevents hotfixing culture.
- Better for onboarding new devs.
- `docker pull/push`.
Explicitly Declare Dependencies
- Code does not exist in isolation. Depends on DB protocol versions etc.
- Independence must carefully acknowledge dependence.
- `docker build`
Store Config in the Environment
- Better for testing. Forces you to decouple code.
- Single Responsibility Principle.
- The 4 cornerstone environments: developers/testing/workers/production.
- Hot-swapping dead databases.
- `docker run --env`
Testing Gives You Half of Docker
- Dependencies, Config, Backing Services, Seperated Build/Run, Disposability.
- Testing requires a fundamental shift in how you write code.
- Similar to Docker, it requires changing fundamentally changing your workflow and the way you think.
The Utopian Vision
- Docker isn’t just a thing to put apps in.
- It aims to improve the entire world of creating, testing, collaborating, deploying, updating and scaling apps.
Democratisation of the Internet
- If an app can be completely made independent then there is no need for the company surrounding the app.
- Apps can be deployed directly from Github with no devops.
- Imagine if all the essential Internet services such as search and social media were funded like Wikipedia.
DanaBox
DOCKER & DOCKER-COMPOSE FOR DEVELOPERS👧👨
AGENDA | WHY WE ARE HERE ?
- about 🐳 docker{,-compose} | basics, why and how of it
- some demo of how I am using it
- generalize where to start…
- swag😅 some hacks and tips
wh❓ is docker in 25 words… के हो त खास मा ?
ABOUT | DOCKER.*
- docker is a tool to make it easier to create, deploy, run applications using containers=> 15 words :nailedit:
-
in simple words
docker is like DRY version of old giant virtual machines, i.e, reuse existing stuffs(kernel) && leverage the containers for once good {packaging, deploying…}
-
docker-compose is yet another awesome tool to glue all those containers with simple YAML file definition
[DEMO#1] I NEED TO BRING UP MY SERVICES AND BOOT UP THE APP
[DEMO#2] A NEW HIRE JUST ARRIVED;
lets show him what/how we are building all these days…
[DEMO#3] TESTING HEADLESS STUFFS:
I want to run headless selenium test with nightwatch
-
I am afraid I can't make gif here…
if you are interested: docker-selenium/wiki/Getting-Started-with-Hub-and-Nodes it was super, just like that.
[DEMO#4] SCALE MY APPS ON LOCALHOST
you gotta be kidding me🤔 🤨 🤭
ENOUGH OF SWAG😅, LETS TALK BUSINESS
WHAT WE ALL CAN DO
- start our docker saga 😎
- learn to docker-compose the development stack
- play-with-docker some random useful projects
-
learn to leverage docker for your
weirdusecaseyes, I will help you do that for free
🤑
CHALLENGES AHEAD
-
how to make docker to prod ?
- I have heard X companies of Nepal does this, but wonder 🤔 why they share it not.
- kubernetes कुबेर निटिस राम्रो सँग भन्न नि अाउदैन, sticker चाइ पाको बेला टास्याहो
-
need a community support, meetups like these could give us kick-start thinking
- experimenting more
- see for your self if docker is a thing, starting tonight ;)
-
convinceshowing your team/bo$$ how painless development could be
QUIZ
??????????????????
Container Revolution
By Manish Marahatta
Container Revolution
BI DevOps
- 56