Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Automated deployment with open source tools

Automated deployment with open source tools

Avatar for Sardor Muminov

Sardor Muminov

March 12, 2017

Other Decks in Programming

Transcript

  1. Who I am • Backend software engineer • IT systems

    engineer • Open source enthusiast • Python, Javascript and Rust (learning) muminoff muminoff
  2. Software deployment is all of the activities that make a

    software system available for use. ― Wikipedia
  3. Manual deployments • not consistent across environments • slow, neither

    repeatable nor reliable • require extensive documentation (often outdated) • hinder collaboration (usually conducted by a few experts)
  4. Why automated deployment? • less error-prone and much more repeatable

    • anyone in the team can deploy software • engineers spend their time developing software • deploying to somewhere new is not a headache • you can release more frequently
  5. Traditional workflow (FTP, SFTP, SCP) FTP, SSH HTTP Codebase Local

    Windows macOS Linux Server Directory Web-server Windows macOS Linux Request Browser Mobile API client
  6. Traditional workflow (Git, SVN, Mercurial) git push Codebase Local Server

    Directory Web-server Request Browser Mobile API client HTTP VCS Repository versions git pull Windows macOS Linux Github Gitlab Self hosted Windows macOS Linux
  7. Automated workflow VCS commit checkout Build Automation poll for changes

    www Production environment Unit tests test Sandbox environment deploy deploy Developer
  8. Chef • Written in Ruby (client) / Erlang (server) •

    Not-easy to learn and deploy • Highly mature and works at massive scale • Used by big companies ◦ (e.g. Facebook, Microsoft, Bloomberg)
  9. Puppet • Written in Ruby • Requires master (track infrastructure)

    • Depends on agent • Used by big companies ◦ (e.g. RedHat, Microsoft)
  10. Salt • Written in Python • Requires agent (minions) •

    Depends on PyDSL and Python • Used by big companies ◦ (e.g. Pivotal, CloudFlare)
  11. Ansible • Written in Python • Agent-less • Supports any

    programming language • Excellent security using SSH / SSH2 • Being used by companies: ◦ NASA, Twitter, Attlasian ◦ Evernote, RedHat, Cisco ◦ EASports, GoPro, etc.
  12. Fabric • Written in Python • Easy to learn, extend

    • Programmatically integration • Can be integrated with 3rd party tools
  13. Summary Benefits Manual deployment Automated deployment Less time consumption ⚝

    ◾ Less error prone ⚝ ◾ Repeatable ⚝ ◾ Collaboration ⚝ ◾
  14. Example workflow (Ansible) 10.1.2.40 Ubuntu/xenial 10.1.2.41 CentOS/7 10.1.2.43 Debian/jessie localhost

    Docker 192.168.2.3 VMWare Developer Host inventory 10.1.2.40 10.1.2.41 10.1.2.43 playbook
  15. Example workflow (Ansible) Developer 10.1.2.60 Server deploy $ git pull

    origin master … $ npm install … $ bower install … $ gulp run build … $ supervisorctl restart all … $ service nginx reload …