SlideShare une entreprise Scribd logo
1  sur  20
Télécharger pour lire hors ligne
Local development
environment
evolution
Serhiy, DevOps Engineer
Title
Title
Project review
Project highlights:
● Intellectual system for jobs searching
● Over 50 production servers (scalable)
● Millions of users
● 6Tb+ of processing data
● Over 1 billion emails sent yearly
Title
Title
Project review
Env definition
Project review
Env definition
Environment components:
1. Hardware
2. Operating system
3. Compiler/Interpreter/Translator
4. Modules, libraries
5. Database
6. etc.
Env requirements
Title
Env definition
Env requirements
Stage 0 schema
Requirements:
1. Cross-platform
2. Maximum likeness to production
3. Optimal resource usage
4. Fast and easy implementation
5. Convenient usage
6. All production environment changes should be
fetched to local environment automatically
7. Space for experiments
Title
Env requirements
Stage 0 schema
Stage 0 review
Title
Stage 0 schema
Stage 0 review
Stage 1 schema
Procs:
● StackOverflow guides
enough to start
● No need to deal with
virtualization
Cons:
● Host system become
messy
● Software versions
issues
● Difficulties with
backup/reproducing
● Different systems on
Production and
Workstation
Stage 0: Self management
Title
Stage 0 review
Stage 1 schema
Virtualbox
Title
Stage 1 schema
Virtualbox
Stage 1 review
● Cross platform
● Import/export VM appliances
● Shared folders
● Port forwarding
● Shared Clipboard
Title
Virtualbox
Stage 1 review
Stage 2 schema
Procs:
● Less time to start with
development
● Possibility to keep
applications isolated
● Similar environment for
all devs
● Easy to reset
environment
Cons:
● Manual software updates
● State dataset with manual updating
● Environments desynchronization
with a time
● Time-cost process of centralised
image update
Stage 1: Prepared VirtualBox images
Title
Stage 1 review
Stage 2 schema
Chef
Title
Stage 2 schema
Chef
Vagrant
● Source control
● Cross-platform
● Possibility to keep infrastructure
up to date permanently
● Ruby-powered
● Awesome Chef Supermarket
● TestKitchen
● Inspec Tests
● Attributes overriding
● Secrets management
Title
Chef
Vagrant
Vagrant config
● Source control
● Cross-platform
● Different VMs with same
tool(VirtualBox/VMware/EC2...)
● Ruby-powered
● Different provisioners
● MultiVM and internal networking
management
Title
Vagrant
Vagrant config
Vagrantfile
name: fetch
box_url: "https://s3.amazonaws.com/~/virtualbox.box"
hostname: serhii-local.project.com
cpu: 2
memory: 1024
network:
ports:
guest: 8082
host: 8081
ip: 192.168.0.228
chef:
version: 12.19.36
server_url:"https://chef.project.com/organizations/project"
key_path: "vagrant.pem"
client_name: vagrant
environment: development
role: ['basic', 'local']
synced_dirs:
- name: 'Api_1'
host_path: "PUT YOUR LOCAL PATH HERE"
guest_path: "/home/api_1/app"
owner: api_1
group: api
mount: false
Title
Vagrant config
Vagrantfile
Stage 2 review
require 'yaml'
cfg = YAML.load_file(File.join(File.dirname(__FILE__), 'config.yaml'))
Vagrant.configure("2") do |config|
config.vm.box = cfg['name']
config.vm.box_url = cfg['box_url']
config.vm.hostname = cfg['hostname']
config.vm.network(:private_network, {:ip=>cfg['network']['ip']})
config.vm.provider "virtualbox" do |v|
v.memory = cfg['memory']
v.cpus = cfg['cpu']
end
mount_synced_dirs(config.vm,cfg['synced_dirs'])
config.vm.provision :chef_client do |chef|
chef.version = cfg['chef']['version']
chef.chef_server_url = cfg['chef']['server_url']
chef.validation_key_path = cfg['chef']['key_path']
chef.validation_client_name = cfg['chef']['client_name']
chef.environment = cfg['chef']['environment']
chef.encrypted_data_bag_secret_key_path = 'encrypted_data_bag_secret'
cfg['chef']['role'].each do |role|
chef.add_role role
end
end
end
Title
Vagrantfile
Stage 2 review
Stage 3 schema
Procs:
● Set up environment in 1
command
● Keeping local env in synch
with production
● Environment versioning
● Easy to reproduce
Cons:
● Long initial provisioning
● High workstation
resource usage
Stage 2: Vagrant + Chef
Title
Stage 2 review
Stage 3 schema
Docker
Title
Stage 3 schema
Docker
Solution example
● Lightweight system-level
virtualization
● Keeping build configuration
alongside the code
● Layers
● Docker images as artifacts
● Docker-compose
● Different orchestration
services
● Docker-hub
● Alpine-based images for
production
Title
Docker
Solution example
Stage 3 review
Dockerfile example:
FROM node:8.6
WORKDIR /code
COPY package.json /code/package.json
RUN npm install
COPY . /code
RUN npm test
CMD ["npm", "start"]
docker-compose.yml example:
version: "3"
services:
cache:
image: redis:4
networks:
- project
ports:
- "6379:6379"
web:
build: .
command: node --inspect-brk=0.0.0.0:5858 worker.js
volumes:
- .:/code
networks:
- project
ports:
- "5858:5858"
networks:
project:
driver: bridge
Title
Solution example
Stage 3 review
Thanks
Procs:
● Fast set up
● Fully isolated microservices
● Possibility to run cluster
locally
● Keeping environment
configuration alongside the
code
Cons:
● Time costs for learning
new technology
Stage 3: Docker + Docker-Compose
Title
Stage 3 review
Thanks
Thank you for attention!

Contenu connexe

Tendances

Tendances (20)

Play Support in Cloud Foundry
Play Support in Cloud FoundryPlay Support in Cloud Foundry
Play Support in Cloud Foundry
 
ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013ESIGate dev meeting #4 21-11-2013
ESIGate dev meeting #4 21-11-2013
 
Scaling Development Environments with Docker
Scaling Development Environments with DockerScaling Development Environments with Docker
Scaling Development Environments with Docker
 
Ansible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less CoffeeAnsible: How to Get More Sleep and Require Less Coffee
Ansible: How to Get More Sleep and Require Less Coffee
 
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
Docker at Shopify: From This-Looks-Fun to Production by Simon Eskildsen (Shop...
 
runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...runC: The little engine that could (run Docker containers) by Docker Captain ...
runC: The little engine that could (run Docker containers) by Docker Captain ...
 
Managing Large Selenium Grid
Managing Large Selenium Grid�Managing Large Selenium Grid�
Managing Large Selenium Grid
 
Ansible presentation
Ansible presentationAnsible presentation
Ansible presentation
 
CRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migrationCRX2Oak - all the secrets of repository migration
CRX2Oak - all the secrets of repository migration
 
Automated Deployment with Capistrano
Automated Deployment with CapistranoAutomated Deployment with Capistrano
Automated Deployment with Capistrano
 
Powerhsell dsc for chef veterans
Powerhsell dsc for chef veteransPowerhsell dsc for chef veterans
Powerhsell dsc for chef veterans
 
Chef and PowerShell Desired State Configuration
Chef and PowerShell Desired State ConfigurationChef and PowerShell Desired State Configuration
Chef and PowerShell Desired State Configuration
 
Docker based Architecture by Denys Serdiuk
Docker based Architecture by Denys SerdiukDocker based Architecture by Denys Serdiuk
Docker based Architecture by Denys Serdiuk
 
Docker practical solutions
Docker practical solutionsDocker practical solutions
Docker practical solutions
 
Web Developer Tools
Web Developer ToolsWeb Developer Tools
Web Developer Tools
 
[MDBCI] Mariadb continuous integration tool
[MDBCI] Mariadb continuous integration tool[MDBCI] Mariadb continuous integration tool
[MDBCI] Mariadb continuous integration tool
 
Configuration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needsConfiguration Management - Finding the tool to fit your needs
Configuration Management - Finding the tool to fit your needs
 
Tips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with ChefTips and Tricks for Automating Windows with Chef
Tips and Tricks for Automating Windows with Chef
 
fabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShiftfabric8 ... and Docker, Kubernetes & OpenShift
fabric8 ... and Docker, Kubernetes & OpenShift
 
Clocker - The Docker Cloud Maker
Clocker - The Docker Cloud MakerClocker - The Docker Cloud Maker
Clocker - The Docker Cloud Maker
 

Similaire à Local development environment evolution

Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
Akshaya Mahapatra
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
Nick Belhomme
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
vstorm83
 

Similaire à Local development environment evolution (20)

Automating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps ApproachAutomating Software Development Life Cycle - A DevOps Approach
Automating Software Development Life Cycle - A DevOps Approach
 
A complete guide to Node.js
A complete guide to Node.jsA complete guide to Node.js
A complete guide to Node.js
 
Mastering selenium for automated acceptance tests
Mastering selenium for automated acceptance testsMastering selenium for automated acceptance tests
Mastering selenium for automated acceptance tests
 
Automation day red hat ansible
   Automation day red hat ansible    Automation day red hat ansible
Automation day red hat ansible
 
Automating Complex Setups with Puppet
Automating Complex Setups with PuppetAutomating Complex Setups with Puppet
Automating Complex Setups with Puppet
 
DevOPS training - Day 2/2
DevOPS training - Day 2/2DevOPS training - Day 2/2
DevOPS training - Day 2/2
 
Automação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOpsAutomação do físico ao NetSecDevOps
Automação do físico ao NetSecDevOps
 
Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015Ansible benelux meetup - Amsterdam 27-5-2015
Ansible benelux meetup - Amsterdam 27-5-2015
 
Deploying windows containers with kubernetes
Deploying windows containers with kubernetesDeploying windows containers with kubernetes
Deploying windows containers with kubernetes
 
Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
WordPress Development Environments
WordPress Development Environments WordPress Development Environments
WordPress Development Environments
 
Dockers zero to hero
Dockers zero to heroDockers zero to hero
Dockers zero to hero
 
Ansible Automation to Rule Them All
Ansible Automation to Rule Them AllAnsible Automation to Rule Them All
Ansible Automation to Rule Them All
 
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
Nagios Conference 2014 - Spenser Reinhardt - Detecting Security Breaches With...
 
Sprint 17
Sprint 17Sprint 17
Sprint 17
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
4. open mano set up and usage
4. open mano set up and usage4. open mano set up and usage
4. open mano set up and usage
 
eXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework IntroductioneXo Platform SEA - Play Framework Introduction
eXo Platform SEA - Play Framework Introduction
 
Automating complex infrastructures with Puppet
Automating complex infrastructures with PuppetAutomating complex infrastructures with Puppet
Automating complex infrastructures with Puppet
 
Node.js to the rescue
Node.js to the rescueNode.js to the rescue
Node.js to the rescue
 

Plus de Wise Engineering

Plus de Wise Engineering (6)

Releasing Elixir/Phoenix Applications
Releasing Elixir/Phoenix ApplicationsReleasing Elixir/Phoenix Applications
Releasing Elixir/Phoenix Applications
 
Transition to Infrastructure as Code
Transition to Infrastructure as CodeTransition to Infrastructure as Code
Transition to Infrastructure as Code
 
Scheduled delivery of a large amount of emails
Scheduled delivery of a large amount of emailsScheduled delivery of a large amount of emails
Scheduled delivery of a large amount of emails
 
Launch safely with Feature Flags
Launch safely with Feature FlagsLaunch safely with Feature Flags
Launch safely with Feature Flags
 
Search query assistance. Autosuggestion
Search query assistance. AutosuggestionSearch query assistance. Autosuggestion
Search query assistance. Autosuggestion
 
Build and release iOS apps using Fastlane tools
Build and release iOS apps using Fastlane toolsBuild and release iOS apps using Fastlane tools
Build and release iOS apps using Fastlane tools
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 

Local development environment evolution

  • 1. Local development environment evolution Serhiy, DevOps Engineer Title Title Project review
  • 2. Project highlights: ● Intellectual system for jobs searching ● Over 50 production servers (scalable) ● Millions of users ● 6Tb+ of processing data ● Over 1 billion emails sent yearly Title Title Project review Env definition
  • 3. Project review Env definition Environment components: 1. Hardware 2. Operating system 3. Compiler/Interpreter/Translator 4. Modules, libraries 5. Database 6. etc. Env requirements
  • 4. Title Env definition Env requirements Stage 0 schema Requirements: 1. Cross-platform 2. Maximum likeness to production 3. Optimal resource usage 4. Fast and easy implementation 5. Convenient usage 6. All production environment changes should be fetched to local environment automatically 7. Space for experiments
  • 5. Title Env requirements Stage 0 schema Stage 0 review
  • 6. Title Stage 0 schema Stage 0 review Stage 1 schema Procs: ● StackOverflow guides enough to start ● No need to deal with virtualization Cons: ● Host system become messy ● Software versions issues ● Difficulties with backup/reproducing ● Different systems on Production and Workstation Stage 0: Self management
  • 7. Title Stage 0 review Stage 1 schema Virtualbox
  • 8. Title Stage 1 schema Virtualbox Stage 1 review ● Cross platform ● Import/export VM appliances ● Shared folders ● Port forwarding ● Shared Clipboard
  • 9. Title Virtualbox Stage 1 review Stage 2 schema Procs: ● Less time to start with development ● Possibility to keep applications isolated ● Similar environment for all devs ● Easy to reset environment Cons: ● Manual software updates ● State dataset with manual updating ● Environments desynchronization with a time ● Time-cost process of centralised image update Stage 1: Prepared VirtualBox images
  • 10. Title Stage 1 review Stage 2 schema Chef
  • 11. Title Stage 2 schema Chef Vagrant ● Source control ● Cross-platform ● Possibility to keep infrastructure up to date permanently ● Ruby-powered ● Awesome Chef Supermarket ● TestKitchen ● Inspec Tests ● Attributes overriding ● Secrets management
  • 12. Title Chef Vagrant Vagrant config ● Source control ● Cross-platform ● Different VMs with same tool(VirtualBox/VMware/EC2...) ● Ruby-powered ● Different provisioners ● MultiVM and internal networking management
  • 13. Title Vagrant Vagrant config Vagrantfile name: fetch box_url: "https://s3.amazonaws.com/~/virtualbox.box" hostname: serhii-local.project.com cpu: 2 memory: 1024 network: ports: guest: 8082 host: 8081 ip: 192.168.0.228 chef: version: 12.19.36 server_url:"https://chef.project.com/organizations/project" key_path: "vagrant.pem" client_name: vagrant environment: development role: ['basic', 'local'] synced_dirs: - name: 'Api_1' host_path: "PUT YOUR LOCAL PATH HERE" guest_path: "/home/api_1/app" owner: api_1 group: api mount: false
  • 14. Title Vagrant config Vagrantfile Stage 2 review require 'yaml' cfg = YAML.load_file(File.join(File.dirname(__FILE__), 'config.yaml')) Vagrant.configure("2") do |config| config.vm.box = cfg['name'] config.vm.box_url = cfg['box_url'] config.vm.hostname = cfg['hostname'] config.vm.network(:private_network, {:ip=>cfg['network']['ip']}) config.vm.provider "virtualbox" do |v| v.memory = cfg['memory'] v.cpus = cfg['cpu'] end mount_synced_dirs(config.vm,cfg['synced_dirs']) config.vm.provision :chef_client do |chef| chef.version = cfg['chef']['version'] chef.chef_server_url = cfg['chef']['server_url'] chef.validation_key_path = cfg['chef']['key_path'] chef.validation_client_name = cfg['chef']['client_name'] chef.environment = cfg['chef']['environment'] chef.encrypted_data_bag_secret_key_path = 'encrypted_data_bag_secret' cfg['chef']['role'].each do |role| chef.add_role role end end end
  • 15. Title Vagrantfile Stage 2 review Stage 3 schema Procs: ● Set up environment in 1 command ● Keeping local env in synch with production ● Environment versioning ● Easy to reproduce Cons: ● Long initial provisioning ● High workstation resource usage Stage 2: Vagrant + Chef
  • 16. Title Stage 2 review Stage 3 schema Docker
  • 17. Title Stage 3 schema Docker Solution example ● Lightweight system-level virtualization ● Keeping build configuration alongside the code ● Layers ● Docker images as artifacts ● Docker-compose ● Different orchestration services ● Docker-hub ● Alpine-based images for production
  • 18. Title Docker Solution example Stage 3 review Dockerfile example: FROM node:8.6 WORKDIR /code COPY package.json /code/package.json RUN npm install COPY . /code RUN npm test CMD ["npm", "start"] docker-compose.yml example: version: "3" services: cache: image: redis:4 networks: - project ports: - "6379:6379" web: build: . command: node --inspect-brk=0.0.0.0:5858 worker.js volumes: - .:/code networks: - project ports: - "5858:5858" networks: project: driver: bridge
  • 19. Title Solution example Stage 3 review Thanks Procs: ● Fast set up ● Fully isolated microservices ● Possibility to run cluster locally ● Keeping environment configuration alongside the code Cons: ● Time costs for learning new technology Stage 3: Docker + Docker-Compose
  • 20. Title Stage 3 review Thanks Thank you for attention!