SlideShare uma empresa Scribd logo
1 de 27
Baixar para ler offline
Adventures in
docker-compose
with Node.js
Whoami
Giovanni Lela
CTO@LinkMe
cofounder@MeanMilan
@lambrojos
http://github.com/lambrojos
Things no developer/architect/CTO likes in during
development
● recognizing wrong choices when it is too late
● mantaining different development
environments
● targeting that VERY specific version
of something
● spending hours on configuring the
dev environment
Fighting back
● Create approximation of systems and
architectures
● Isolate yourself from the host
● Infrastructure as code
● Automate like there is no to tomorrow
Isolated work environments and teamwork
● If you are working on a backend application
front end people can avoid writing tons of
mocks or use a shared staging environment
● In case of error the application state can be
debugged easily
Vagrant
Vagrant made this approach popular by
virtualizing machines on real
hypervisors,
● Very accurate replicas
● Performance issues when running
complex architectures
● Provisioning looks intense
Docker
● You don’t have virtual machines
● The OS kernel is shared in virtualized
environment called containers.
● The virtualized processes are essentially native, do
not require the overhead of virtual machines and still
provide a high level of isolation from the host OS
Docker in a nutshell
Some docker terms
● Image: a readonly template for creating
containers - they are defined with simple files
called Dockerfiles
● Container: A Docker container is a runnable
instance of a Docker image
Some more docker terms
● Registry: a repository of docker images
● Volumes: (aka data volumes): folders that
bypass docker’s union filesystem. We can use
them to map folders from the host machine to
the container
Containers and layers
Example Dockerfile
A dockerfile is like a recipe to build an image
Each line corresponds to a new layer in the image.
FROM node:7
RUN npm install -g knex nodemon mocha istanbul node-gyp snyk jsdoc
WORKDIR /src
Docker CLI is semi hard
Docker CLI can have quite a lot of options
Setting up a serious multi container environment
can be very hard
docker run -d -v ~/nginxlogs:/var/log/nginx -p 5000:80 -i nginx --
entrypoint /bin/bash example/nginx
Enter docker compose
Compose is a tool for defining
and running multi-container
Docker applications.
Enter docker-compose
Docker compose helps by defining and
coordinating multiple containers.
With Compose, you define a multi-container
application in a .yml single file, then spin your
application up in a single command which does
everything that needs to be done to get it running.
Example (docker-compose.yml)
mysql:
image: mysql:5.7
environment:
MYSQL_ROOT_PASSWORD: passwordsarecool
MYSQL_DATABASE: node
volumes:
- ./conf/mysql/conf.d:/etc/mysql/conf.d
ports:
- "3306"
web:
build: .
ports:
- "80"
- "443"
- "22"
volumes:
- ./:/src
links:
- mysql
Key points
● We are not provisioning a set of machines, we
are defining a set of services
● Then isolating them in containers
● And then choosing how they interact
Cool things
Services and middlewares are super easy to install: as they can be installed right
from the docker registry, the version we want, with the image
Basic configuration is achieved with env vars, advanced configuration by mapping
volumes
Approximating the production environment
● a good approximation of
the production
environment is the key for
true happiness
● integration tests can be run
on local machines for cheap
- spot architectural issues
very very early
Even more goodies
Continous integration is super easy to setup: at its
most basic form it can be reduced to something
like:
docker-compose run myservice npm
test
Testing in docker-compose
Allows you test against real services not mocks- all
tests can be integration tests.
No CI provider lock-in (as long docker compose is
supported)
Lightweight - you can spin up a lot services and
simulate complex architectures
Production?
Can be also used to setup a quick and dirty staging
environment.
Just use the -d flag
Docker swarm?
Issues and not so cool things
It’s all fun and games as long as you work on linux
● On mac and windows it used to run on a virtual
machine
● Now it’s better because it runs on hyper-V on
windows and xhyve on MAC (which is still a
virtualization)
Issues
On mac and windows installing and updating
docker has been more time consuming than
expected
The first docker-compose up run is always
quite painful
SSH keys
What if you need your ssh credentials inside your
container? I learned to hate:
● ssh passphrases
● windows permissions
Other nasty stuff
/r/n
docker updates
mac os filesystem case sensitieves
Code time

Mais conteúdo relacionado

Mais procurados

Docker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmDocker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmMario IC
 
Docker 101 Workshop slides (JavaOne 2017)
Docker 101 Workshop slides (JavaOne 2017)Docker 101 Workshop slides (JavaOne 2017)
Docker 101 Workshop slides (JavaOne 2017)Eric Smalling
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSDocker, Inc.
 
ContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with DockerContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with DockerDocker-Hanoi
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiMike Goelzer
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...Docker, Inc.
 
Docker Compose: Docker Configuration for the Real World
Docker Compose:  Docker Configuration for the Real WorldDocker Compose:  Docker Configuration for the Real World
Docker Compose: Docker Configuration for the Real WorldWill Hall
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsBen Hall
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker FundamentalsMien Dinh
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the UnionElton Stoneman
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker, Inc.
 
Docker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker, Inc.
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slidesDocker, Inc.
 

Mais procurados (20)

Docker Compose to Production with Docker Swarm
Docker Compose to Production with Docker SwarmDocker Compose to Production with Docker Swarm
Docker Compose to Production with Docker Swarm
 
Docker 101 Workshop slides (JavaOne 2017)
Docker 101 Workshop slides (JavaOne 2017)Docker 101 Workshop slides (JavaOne 2017)
Docker 101 Workshop slides (JavaOne 2017)
 
Docker
DockerDocker
Docker
 
Build & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWSBuild & Deploy Multi-Container Applications to AWS
Build & Deploy Multi-Container Applications to AWS
 
Docker and stuff
Docker and stuffDocker and stuff
Docker and stuff
 
ContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with DockerContainerDayVietnam2016: Django Development with Docker
ContainerDayVietnam2016: Django Development with Docker
 
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea LuzzardiWhat's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
What's New in Docker 1.12 (June 20, 2016) by Mike Goelzer & Andrea Luzzardi
 
Docker and CloudStack
Docker and CloudStackDocker and CloudStack
Docker and CloudStack
 
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
The Tale of a Docker-based Continuous Delivery Pipeline by Rafe Colton (ModCl...
 
Docker Compose: Docker Configuration for the Real World
Docker Compose:  Docker Configuration for the Real WorldDocker Compose:  Docker Configuration for the Real World
Docker Compose: Docker Configuration for the Real World
 
Docker compose
Docker composeDocker compose
Docker compose
 
Docker Started
Docker StartedDocker Started
Docker Started
 
Architecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based DeploymentsArchitecting .NET Applications for Docker and Container Based Deployments
Architecting .NET Applications for Docker and Container Based Deployments
 
Docker on Windows
Docker on WindowsDocker on Windows
Docker on Windows
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker Fundamentals
 
Docker and Windows: The State of the Union
Docker and Windows: The State of the UnionDocker and Windows: The State of the Union
Docker and Windows: The State of the Union
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando MayoDocker for Developers - Part 2 by Borja Burgos and Fernando Mayo
Docker for Developers - Part 2 by Borja Burgos and Fernando Mayo
 
Docker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBMDocker for Devs - John Zaccone, IBM
Docker for Devs - John Zaccone, IBM
 
Docker Security workshop slides
Docker Security workshop slidesDocker Security workshop slides
Docker Security workshop slides
 

Semelhante a Adventures in docker compose

Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday developmentJustyna Ilczuk
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tipsSamuel Chow
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned RightScale
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline Docker, Inc.
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDocker, Inc.
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101Naukri.com
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with DockerAndrey Hristov
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with DockerAndrey Hristov
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and YouBalaBit
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessDocker-Hanoi
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019UA Mobile
 
Automating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and ChefAutomating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and Chefkamalikamj
 
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
 RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do... RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...Thoughtworks
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web DevelopersBADR
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web DevelopersAmr Fawzy
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power SystemsCesar Maciel
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014Carlo Bonamico
 

Semelhante a Adventures in docker compose (20)

Docker in everyday development
Docker in everyday developmentDocker in everyday development
Docker in everyday development
 
Docker primer and tips
Docker primer and tipsDocker primer and tips
Docker primer and tips
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
 
Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned  Real-World Docker: 10 Things We've Learned
Real-World Docker: 10 Things We've Learned
 
DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline  DCSF 19 Building Your Development Pipeline
DCSF 19 Building Your Development Pipeline
 
Run automated tests in Docker
Run automated tests in DockerRun automated tests in Docker
Run automated tests in Docker
 
DCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development PipelineDCEU 18: Building Your Development Pipeline
DCEU 18: Building Your Development Pipeline
 
[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101[@NaukriEngineering] Docker 101
[@NaukriEngineering] Docker 101
 
Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
ContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small businessContainerDayVietnam2016: Dockerize a small business
ContainerDayVietnam2016: Dockerize a small business
 
До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019До чого прикладати Docker в Android? - UA Mobile 2019
До чого прикладати Docker в Android? - UA Mobile 2019
 
Dockerized maven
Dockerized mavenDockerized maven
Dockerized maven
 
Automating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and ChefAutomating Dev Environment - Introduction to Docker and Chef
Automating Dev Environment - Introduction to Docker and Chef
 
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
 RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do... RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
RootConf 2014 Bangalore: Automating the Dev Environment - Introduction to Do...
 
Docker up and Running For Web Developers
Docker up and Running For Web DevelopersDocker up and Running For Web Developers
Docker up and Running For Web Developers
 
Docker Up and Running for Web Developers
Docker Up and Running for Web DevelopersDocker Up and Running for Web Developers
Docker Up and Running for Web Developers
 
Docker on Power Systems
Docker on Power SystemsDocker on Power Systems
Docker on Power Systems
 
codemotion-docker-2014
codemotion-docker-2014codemotion-docker-2014
codemotion-docker-2014
 

Mais de LinkMe Srl

Corso su ReactJS
Corso su ReactJSCorso su ReactJS
Corso su ReactJSLinkMe Srl
 
A React Journey
A React JourneyA React Journey
A React JourneyLinkMe Srl
 
Angular Intermediate
Angular IntermediateAngular Intermediate
Angular IntermediateLinkMe Srl
 
Angular js quickstart
Angular js quickstartAngular js quickstart
Angular js quickstartLinkMe Srl
 
M&M - MeanMilan @CodeMotionMilan
M&M - MeanMilan @CodeMotionMilanM&M - MeanMilan @CodeMotionMilan
M&M - MeanMilan @CodeMotionMilanLinkMe Srl
 
Presentazione Codemotion
Presentazione Codemotion Presentazione Codemotion
Presentazione Codemotion LinkMe Srl
 

Mais de LinkMe Srl (8)

Corso su ReactJS
Corso su ReactJSCorso su ReactJS
Corso su ReactJS
 
A React Journey
A React JourneyA React Journey
A React Journey
 
Webdriver.io
Webdriver.io Webdriver.io
Webdriver.io
 
Angular Intermediate
Angular IntermediateAngular Intermediate
Angular Intermediate
 
NodeJS
NodeJSNodeJS
NodeJS
 
Angular js quickstart
Angular js quickstartAngular js quickstart
Angular js quickstart
 
M&M - MeanMilan @CodeMotionMilan
M&M - MeanMilan @CodeMotionMilanM&M - MeanMilan @CodeMotionMilan
M&M - MeanMilan @CodeMotionMilan
 
Presentazione Codemotion
Presentazione Codemotion Presentazione Codemotion
Presentazione Codemotion
 

Último

OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesDavid Newbury
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum ComputingGDSC PJATK
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationIES VE
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIUdaiappa Ramachandran
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 

Último (20)

OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
Linked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond OntologiesLinked Data in Production: Moving Beyond Ontologies
Linked Data in Production: Moving Beyond Ontologies
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Introduction to Quantum Computing
Introduction to Quantum ComputingIntroduction to Quantum Computing
Introduction to Quantum Computing
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve DecarbonizationUsing IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
Using IESVE for Loads, Sizing and Heat Pump Modeling to Achieve Decarbonization
 
RAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AIRAG Patterns and Vector Search in Generative AI
RAG Patterns and Vector Search in Generative AI
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 

Adventures in docker compose

  • 3. Things no developer/architect/CTO likes in during development ● recognizing wrong choices when it is too late ● mantaining different development environments ● targeting that VERY specific version of something ● spending hours on configuring the dev environment
  • 4. Fighting back ● Create approximation of systems and architectures ● Isolate yourself from the host ● Infrastructure as code ● Automate like there is no to tomorrow
  • 5. Isolated work environments and teamwork ● If you are working on a backend application front end people can avoid writing tons of mocks or use a shared staging environment ● In case of error the application state can be debugged easily
  • 6. Vagrant Vagrant made this approach popular by virtualizing machines on real hypervisors, ● Very accurate replicas ● Performance issues when running complex architectures ● Provisioning looks intense
  • 7. Docker ● You don’t have virtual machines ● The OS kernel is shared in virtualized environment called containers. ● The virtualized processes are essentially native, do not require the overhead of virtual machines and still provide a high level of isolation from the host OS
  • 8. Docker in a nutshell
  • 9. Some docker terms ● Image: a readonly template for creating containers - they are defined with simple files called Dockerfiles ● Container: A Docker container is a runnable instance of a Docker image
  • 10. Some more docker terms ● Registry: a repository of docker images ● Volumes: (aka data volumes): folders that bypass docker’s union filesystem. We can use them to map folders from the host machine to the container
  • 12. Example Dockerfile A dockerfile is like a recipe to build an image Each line corresponds to a new layer in the image. FROM node:7 RUN npm install -g knex nodemon mocha istanbul node-gyp snyk jsdoc WORKDIR /src
  • 13. Docker CLI is semi hard Docker CLI can have quite a lot of options Setting up a serious multi container environment can be very hard docker run -d -v ~/nginxlogs:/var/log/nginx -p 5000:80 -i nginx -- entrypoint /bin/bash example/nginx
  • 14. Enter docker compose Compose is a tool for defining and running multi-container Docker applications.
  • 15. Enter docker-compose Docker compose helps by defining and coordinating multiple containers. With Compose, you define a multi-container application in a .yml single file, then spin your application up in a single command which does everything that needs to be done to get it running.
  • 16. Example (docker-compose.yml) mysql: image: mysql:5.7 environment: MYSQL_ROOT_PASSWORD: passwordsarecool MYSQL_DATABASE: node volumes: - ./conf/mysql/conf.d:/etc/mysql/conf.d ports: - "3306" web: build: . ports: - "80" - "443" - "22" volumes: - ./:/src links: - mysql
  • 17. Key points ● We are not provisioning a set of machines, we are defining a set of services ● Then isolating them in containers ● And then choosing how they interact
  • 18. Cool things Services and middlewares are super easy to install: as they can be installed right from the docker registry, the version we want, with the image Basic configuration is achieved with env vars, advanced configuration by mapping volumes
  • 19. Approximating the production environment ● a good approximation of the production environment is the key for true happiness ● integration tests can be run on local machines for cheap - spot architectural issues very very early
  • 20. Even more goodies Continous integration is super easy to setup: at its most basic form it can be reduced to something like: docker-compose run myservice npm test
  • 21. Testing in docker-compose Allows you test against real services not mocks- all tests can be integration tests. No CI provider lock-in (as long docker compose is supported) Lightweight - you can spin up a lot services and simulate complex architectures
  • 22. Production? Can be also used to setup a quick and dirty staging environment. Just use the -d flag Docker swarm?
  • 23. Issues and not so cool things It’s all fun and games as long as you work on linux ● On mac and windows it used to run on a virtual machine ● Now it’s better because it runs on hyper-V on windows and xhyve on MAC (which is still a virtualization)
  • 24. Issues On mac and windows installing and updating docker has been more time consuming than expected The first docker-compose up run is always quite painful
  • 25. SSH keys What if you need your ssh credentials inside your container? I learned to hate: ● ssh passphrases ● windows permissions
  • 26. Other nasty stuff /r/n docker updates mac os filesystem case sensitieves