Иван Гаас - docker, containers, and the future of application delivery
TRANSCRIPT
![Page 1: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/1.jpg)
Docker, Containers, and the Futureof Application Delivery
Ivan Gaas
![Page 2: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/2.jpg)
Ivan GaasDevOps Engineer
Problems:
• How to configure destination server the same way of my one?
• How to do it repeatable and automatically?• How to delivery my project to this server?• How to be sure my project will work always
with right environment?
![Page 3: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/3.jpg)
Ivan GaasDevOps Engineer
Chefbase = %w{ apt build-essential git curl vim }apache= %w{ apache2 apache2::mod_rewrite apache2::mod_php5 apache2::mod_expires }php = %w{ php php::module_mysql php::module_memcache php::module_gd php::module_curl}mysql = %w{ mysql::server}drupal= %w{ drush memcached }[base, apache, php, mysql, drupal].each do |group| group.each {|recipe| include_recipe recipe}endpkgs = value_for_platform( [ 'centos', 'redhat', 'fedora' ] => 'default' => %w{ pcre-devel php-mcrypt } }, [ 'debian', 'ubuntu' ] => { 'default' => %w{ libpcre3-dev php5-mcrypt } }, 'default' => %w{ libpcre3-dev php5-mcrypt})pkgs.each {|pkg| package ( pkg ) { action :install } }php_pear ('uploadprogress') { action :install }template "#{node['php']['ext_conf_dir']}/deploy-drupal.ini" do source "deploy-drupal.ini.erb" mode 0644 owner "root" group "root" notifies :reload, "service[apache2]"end
class drupal_sandbox ( $virtual_document_root = '/srv/www/vhost/%0', $use_varnish = false, $php_memory_limit = $drupal_sandbox::params::php_memory_limit, $apache_addr = $drupal_sandbox::params::apache_addr, $apache_port = $drupal_sandbox::params::apache_port, $memcache_mem = $drupal_sandbox::params::memcache_mem, $apache_mpm_wk_max_clients = $drupal_sandbox::params::apache_mpm_wk_max_clients, $fpm_max_children = $drupal_sandbox::params::fpm_max_children, $fpm_start_servers = $drupal_sandbox::params::fpm_start_servers, $fpm_min_spare_servers = $drupal_sandbox::params::fpm_min_spare_servers, $fpm_max_spare_servers = $drupal_sandbox::params::fpm_max_spare_servers, $innodb_buffer_pool_size = $drupal_sandbox::params::innodb_buffer_pool_size, $innodb_log_file_size = $drupal_sandbox::params::innodb_log_file_size) inherits drupal_sandbox::params
Puppet- group_by: key={{ ansible_os_family }}- name: make sure the ssh user is part of users user: name={{ ansible_ssh_user }} groups=users,{{ www_user }} append=yes when: ansible_ssh_user != 'root'- name: make sure the vhosts directory exists (ignore chgrp errors on vagrant) file: path=/var/www/vhosts/{{ item.key }} state=directory mode=2775 owner={{ ansible_ssh_user }} group=users with_dict: sites ignore_errors: true- name: Clone the code from repository git: repo={{ item.value.git }} dest=/var/www/vhosts/{{ item.key }}/drupal version={{ item.value.version }} accept_hostkey=yes with_dict: sites sudo: no- name: Create files folder (ignore chgrp errors on vagrant) file: path=/var/www/vhosts/{{ item.key }}/drupal/sites/default/files state=directory mode=2775 owner={{ ansible_ssh_user }} group={{ www_user }} recurse=yes with_dict: sites ignore_errors: true- name: Create cache folder (boost) (ignore chgrp errors on vagrant)
Ansible
Skipped over 100500 lines…
![Page 4: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/4.jpg)
Ivan GaasDevOps Engineer
WTF???
Chef Puppet
Ansib
leSaltStack
![Page 5: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/5.jpg)
Ivan GaasDevOps Engineer
Why and what is Docker?
![Page 6: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/6.jpg)
Ivan GaasDevOps Engineer
Environment compatibility nightmare
![Page 7: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/7.jpg)
Ivan GaasDevOps Engineer
Cargo transport pre 1960
![Page 8: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/8.jpg)
Ivan GaasDevOps Engineer
Delivery matrix
![Page 9: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/9.jpg)
Ivan GaasDevOps Engineer
Solution: shipping containers
![Page 10: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/10.jpg)
Ivan GaasDevOps Engineer
Containers are standard
![Page 11: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/11.jpg)
Ivan GaasDevOps Engineer
Docker containers
![Page 12: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/12.jpg)
Ivan GaasDevOps Engineer
Delivery matrix
![Page 13: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/13.jpg)
Ivan GaasDevOps Engineer
Docker is not only containers but packaging layers
Me: Anyone:
Base layer
Base layer
My layer Anyone’s layer
Common layerCommon layer
![Page 14: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/14.jpg)
Ivan GaasDevOps Engineer
Docker layers
![Page 15: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/15.jpg)
Ivan GaasDevOps Engineer
Fast and easy startJust learn:
• docker pull• docker run• docker exec• docker commit• docker push
As easy as basic GIT!
![Page 16: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/16.jpg)
Ivan GaasDevOps Engineer
Enjoy!
![Page 17: Иван Гаас - Docker, Containers, and the Future of Application Delivery](https://reader033.vdocument.in/reader033/viewer/2022051404/5882e4821a28ab33258b6c2d/html5/thumbnails/17.jpg)
Ivan GaasDevOps Engineer
Ivan GaasDevOps Engineer
https://www.linkedin.com/in/ivangaas
Золотой спонсор:
Thank you!
При поддержке: Серебряный спонсор: