Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Docker Novosibirsk Meetup #3 - Docker in Production

292 views

Published on

News about Docker 1.13 and experience with Docker in Production.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Docker Novosibirsk Meetup #3 - Docker in Production

  1. 1. Docker in Production Something new or just buzzwords?
  2. 2. Gianluca Arbezzano Software Engineer @CurrencyFair DevOps enthusiast and Open Source developer. ● http://scaledocker.com ● http://gianarb.it ● https://twitter.com/gianarb ● https://github.com/gianarb ● hello@thumpflow.com > Automate the boring stuffs.
  3. 3. Internet users in the World http://www.internetlivestats.com/internet-users/
  4. 4. Cloud Computing 1960s The initial concepts of time-sharing became popularized via RJE (Remote Job Entry); [ 1990s Telecommunications companies, who previously offered primarily dedicated point-to-point data circuits, began offering virtual private network (VPN) services with comparable quality of service, but at a lower cost. 2000s Cloud computing has come into existence. In early 2008, NASA's OpenNebula 2006s Amazon introduced its Elastic Compute Cloud. 2008s Microsoft Azure was announced as "Azure". It was released on 1 February 2010 as Windows Azure 2010s Rackspace Hosting and NASA jointly launched an open-source cloud-software initiative known as OpenStack https://en.wikipedia.org/wiki/Cloud_computing#Origin_of_the_term
  5. 5. Your application and your business That’s what matters
  6. 6. Problems that I see ● Onboarding new users ● Testing ● Deploy your application ● Scalability ● Timing ● Number of applications
  7. 7. Why containers are good ● Easier to deploy ● Good to keep developers and system administrator frends ● Less expensive to manage in time compared with VM. But you still need VMs or at least servers. ● Immutable
  8. 8. you still need VMs or at least servers.
  9. 9. You still need to manage ● Network ● Hostname ● Firewall ● Maybe some tools like vim, you always need vim ● Docker itself needs to be installed and configurated
  10. 10. Everything as code: 1. Cloud init 2. Configuration management 3. Docker https://github.com/chef-cookbooks/docker
  11. 11. VPN - It’s not complicated! Stop to think that... https://community.openvpn.net/openvpn/wiki/BridgingAndRouting
  12. 12. dockerd -H fd:// -H tcp://10.7.5.22 --label kind=private
  13. 13. 6 October 2016 © 2016 CurrencyFair Ltd Docker 1.13 makes production environment good.
  14. 14. 6 October 2016 © 2016 CurrencyFair Ltd CLI redesign Docker CLI is always a privileged client for the daemon. Thousand of users learn how to run contains with this tools: docker run -it alpine sleep 10
  15. 15. 6 October 2016 © 2016 CurrencyFair Ltd CLI redesign Advanced users or scripts to build complex solution: find '/var/lib/docker/volumes/' -mindepth 1 -maxdepth 1 -type d | grep -vFf <( docker ps -aq | xargs docker inspect | jq -r '.[]|.Mounts|.[]|.Name|select(.)' )
  16. 16. 6 October 2016 © 2016 CurrencyFair Ltd But was time for a little re-design
  17. 17. 6 October 2016 © 2016 CurrencyFair Ltd top level command ● checkpoint Manage checkpoints ● container Manage containers ● image Manage images ● network Manage networks ● node Manage Swarm nodes ● plugin Manage plugins ● secret Manage Docker secrets ● service Manage services ● stack Manage Docker stacks ● swarm Manage Swarm ● system Manage Docker ● volume Manage volumes 100% compatible with the old commands: run, stop, start and so on http://blog.arungupta.me/docker-1-13-management-commands/
  18. 18. 6 October 2016 © 2016 CurrencyFair Ltd Keep your environment clean docker system docker system info == docker info docker system event => to follow stream’s events from deamon docker system prune => to clean your env from bad layers, volumes and networks
  19. 19. 6 October 2016 © 2016 CurrencyFair Ltd Welcome compose v3 version: ‘3’ services: micro: image: gianarb/micro:1.2.0 deploy: mode: replicated replicas: 2 resources: limits: cpus: '0.25' memory: 512M reservations: cpus: '0.25' memory: 256M restart_policy: condition: on-failure delay: 5s max_attempts: 3 window: 120s Compatible with Swarm mode docker stack create -c ./docker-compose.yml frontend
  20. 20. 6 October 2016 © 2016 CurrencyFair Ltd Secrets are available in Swarm mode docker secret create well ./secret.json docker service create --secret well alpine sleep 1000 Secrets are running in directory /run
  21. 21. 6 October 2016 © 2016 CurrencyFair Ltd Squash layers docker build --squash -t jenkins-sq .
  22. 22. Demo ● https://github.com/gianarb/micro ● https://github.com/gianarb/docker-stack ● https://github.com/gianarb/papiro ● https://docs.docker.com/engine/swarm/secrets/ ● https://docs.docker.com/engine/reference/commandline/system/ ● https://docs.docker.com/docker-cloud/apps/stack-yaml-reference/
  23. 23. Thanks http://gianarb.it

×