Thomas Rossetto - Container and microservices: a love story - Codemotion Milan 2017
-
Upload
codemotion -
Category
Technology
-
view
99 -
download
3
Transcript of Thomas Rossetto - Container and microservices: a love story - Codemotion Milan 2017
A ❤ STORYCONTAINER AND MICROSERVICES:
👋 I’M THOMAS
NICE TO MEET YOU!
CONTAINER AND MICROSERVICES: A ❤ STORY
WHAT ABOUT THIS
❤ STORY ?
CONTAINER AND MICROSERVICES: A ❤ STORY
💼 MY FIRST WORK DAY
CONTAINER AND MICROSERVICES: A ❤ STORY
MICROSERVICE’S PROS
▸ Relatively small
▸ Improve fault isolation
▸ Develop & deploy independently
▸ Improves tuning & scaling
CONTAINER AND MICROSERVICES: A ❤ STORY
🏃 MY SECOND WORK DAY
CONTAINER AND MICROSERVICES: A ❤ STORY
IT WAS NOT SO GOOD
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
▸ Additional complexity of a distributed system
▸ Testing is more complex
▸ Internal process for communication purpose
▸ A bad APIs design it’s very dangerous
▸ Development environment it’s hard to setup
CONTAINER AND MICROSERVICES: A ❤ STORY
MICROSERVICE’S CONS
Development environment it’s
hard to setup 😤
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
OUR MICROSERVICES TECHNOLOGY/TOOLS
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
3 days * 2 people =
6 days!⬇
🗑
CONTAINER AND MICROSERVICES: A ❤ STORY
Context
&
CONTAINER AND MICROSERVICES: A ❤ STORY
( )
CONTAINER AND MICROSERVICES: A ❤ STORY
x days * y people =
z days!
🤔
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
Simulates isolate systems
Usable in more OS
Ready to use
Easy to install
Easy to use
🤔
CONTAINER AND MICROSERVICES: A ❤ STORY
💡
CONTAINER AND MICROSERVICES: A ❤ STORY
💡
CONTAINER AND MICROSERVICES: A ❤ STORY
🤓
CONTAINER AND MICROSERVICES: A ❤ STORY
Simulate isolate systems
Usable in more OS
Ready to use
Easy to install
Easy to use
🤔
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER FOR MAC/WINDOWS
Docker for Mac/Windows is an easy-to-install desktop app for building, debugging and testing
Dockerized apps on a Mac/PC.
😎
CONTAINER AND MICROSERVICES: A ❤ STORY
Docker platform
Docker compose
Docker CLI
Docker Notary CLI
CONTAINER AND MICROSERVICES: A ❤ STORY
Docker platform
Docker compose Docker CLI
Docker Notary CLI
CONTAINER AND MICROSERVICES: A ❤ STORY
Simulate isolate systems
Usable in more OS
Ready to use
Easy to install
Easy to use
🤔
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
DEMO TIME
(
CONTAINER AND MICROSERVICES: A ❤ STORY
DEMO FILES
•Dockerfile
•docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER IMAGE
DOCKER IMAGE
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER IMAGE
FROM ruby RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs RUN mkdir /my_app WORKDIR /my_app RUN gem install rails
File: ./my_app/Dockerfile
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER IMAGE
FROM ruby RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs RUN mkdir /my_app WORKDIR /my_app RUN gem install rails
File: ./my_app/Dockerfile
CONTAINER AND MICROSERVICES: A ❤ STORY
https://hub.docker.com/
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER IMAGE
FROM ruby RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs RUN mkdir /my_app WORKDIR /my_app RUN gem install rails
File: ./my_app/Dockerfile
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER IMAGE
FROM ruby RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs RUN mkdir /my_app WORKDIR /my_app RUN gem install rails
File: ./my_app/Dockerfile
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER IMAGE
FROM ruby RUN apt-get update -qq && apt-get install -y build-essential libpq-dev nodejs RUN mkdir /my_app WORKDIR /my_app RUN gem install rails
File: ./my_app/Dockerfile
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
DOCKER COMPOSE
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
version: '3' services: web: build: ./my_app command: bash -c "bundle install --path=/cache && rails s -p 3000 -b '0.0.0.0'" ports: - "4000:3000" volumes: - ./my_app/my_rails_app:/myapp - ./my_app/gem_cache:/cache depends_on: - db db: image: postgres
DOCKER COMPOSEFile: ./docker-compose.yml
CONTAINER AND MICROSERVICES: A ❤ STORY
( )
WEB DB WEB DB
CONTAINER AND MICROSERVICES: A ❤ STORY
0.25 days * 2 people =
0.5 day!
CONTAINER AND MICROSERVICES: A ❤ STORY
CONTAINER AND MICROSERVICES: A ❤ STORY
IT’S TIME TO SAY GOODBYE 😢
CONTAINER AND MICROSERVICES: A ❤ STORY
BUT FIRST…
CONTAINER AND MICROSERVICES: A ❤ STORY
▸ Microservices
▸ Docker compose
▸ How portable and repeatable development environment save your time!
…WHAT HAVE WE SEEN TODAY?
CONTAINER AND MICROSERVICES: A ❤ STORY
SO, WHY I’M IN ❤?▸ Microservices architecture gave me a new point
of view
▸ Thanks to microservices, I found a way to use and understand containers
▸ Life is too short for waste your time
“YOUR WORK IS GOING TO FILL A LARGE PART OF YOUR LIFE, AND THE ONLY WAY TO BE TRULY SATISFIED IS TO DO WHAT YOU BELIEVE IS GREAT WORK. AND THE ONLY WAY TO DO GREAT WORK IS TO LOVE WHAT YOU DO.” STEVE JOBS
CONTAINER AND MICROSERVICES: A ❤ STORY
🙏 THANK YOU!
🙋1 QUESTIONS?
@Rosse91
Software developer @ Seesaw
Coordinator of Programmers in Padua
community
👋 THANKS FOR
COMING HAVE A NICE DAY
SEE YOU AROUND!