Алексей васильев программирование на c в примерах и задачах

Алексей Васильев, Railsware

Alexey Vasiliev

Application Infrastructure

A high performance, reliable, and secure integrated technology infrastructure for managing multiple hosted applications by Application Service Providers

Application infrastructure, comprised of application servers, web servers, and often database servers, is a core component in most network architectures


Devops is About CAMS

  • Culture — people and process first. If you don’t have culture, all automation attempts will be fruitless
  • Automation
  • Measurement — if you can’t measure, you can’t improve
  • Sharing — creating a culture where people share ideas and problems is critical

Devops is not a plan, it’s a reaction; Devops is not a product

Benefits of DevOps

  • Technical benefits:
    • Continuous software delivery
    • Less complex problems to fix
    • Faster resolution of problems
  • Business benefits:
    • Faster delivery of features
    • More stable operating environments
    • More time available to add value (rather than fix/maintain)

Benefits of DevOps

DevOps CookbookPhoenix Project

Configuration management software

  • Chef
  • Puppet
  • Ansible
  • SaltStack
  • CFEngine
  • Juju
  • many others



  • Chef Solo
    • Runs locally (push model)
    • Simple for beginning and small amount of nodes
  • Chef Server
    • Server/Client model (pull model)
    • Good for big amount of nodes (servers)
    • Node data storage
    • Search indexes
    • A centralized API that interacts with and integrates infrastructure components



Chef benefits

Chef is like unit tests for your servers

Ezra Zygmuntowicz
  • Ruby DSL
  • Good dependency systems: Berkshelf, librarian-chef
  • +2000 vendor cookbooks
  • Good team workflow
  • Support Windows
  • Huge amount of testing tools


Chef testing tools

  • ChefSpec, ServerSpec, Bats
  • Test Kitchen
  • Chef Zero
  • Minitest
  • Fauxhai
  • Cucumber
  • Foodcritic

Chef TDD

Chef disadvantages

  • You need to know Ruby (infrastructure as code)
  • Need to install Chef Client on nodes
  • Chef Client can be broken (example, Rubygems Sandbox in 11/12 versions)
  • Different teams with different approaches
  • Documentation is not perfect
  • Too many tools and options

Chef Disadvantages

Chef Book


  • Runs locally (push model, like Chef Solo)
  • Client-less (need only Python)
  • YAML configs, «command to infrastructure»
  • Huge community
  • Ansible Tower for more automation


Ansible architecture

Ansible disadvantages

  • Bad team workflow
  • Small flexibility in coding
  • Poor development testing
  • Limited support for Windows
    (from 1.7 can use winrm,
    but still not perfect and small amount of modules)

Ansible Cons

Ansible Book


  • Operating system-level virtualization (cgroups + namespaces + API)
  • Libcontainer (default), libvirt, LXC (Linux Containers) and systemd-nspawn (multiple containers share the same kernel)
  • Simple configuration and distribution
  • Huge community, support by AWS, Google Cloud Platform, Microsoft Azure, IBM SoftLayer, Rackspace Cloud, etc.


Docker architecture
Docker all the things


If you can’t build a monolith, what makes you think microservices are the answer?

Simon Brown


These services need to be able to change independently of each other, and be deployed by themselves without requiring consumers to change.

Sam Newman

A single deployable service should be no bigger than a bounded context, but no smaller than an aggregate.

Ben Morris

Docker Use Cases

  • Own PaaS (it is hard!!!)
  • Software distribution
  • Fast sandbox environment (CI, user defined scripts, custom workers, build systems, etc.)
  • Debugging capabilities (avoiding «It works on my machine» syndrome)


Docker disadvantages

  • Only Docker isn’t enough to build PaaS
  • Still need configuration management (CM) tool, service discovery, etc.
  • Non-root operations inside container
  • Not good at linking across separate servers or VMs
  • Not good at isolating Linux Containers from each other (shared kernel)

Docker Disadvantages


  • DevOps isn’t tool, it is process
  • Chef: Ruby code as infrastructure
  • Ansible: command to infrastructure, client-less
  • Docker: containers for development and distrubution
  • Measure thrice and cut once