Database automated deployment and versioning ...for smart people
Automated deployment
-
Upload
sardorbek-muminov -
Category
Software
-
view
39 -
download
0
Transcript of Automated deployment
![Page 1: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/1.jpg)
AUTOMATED DEPLOYMENT
with open-source tools
2017.03.12Sardor Muminov
![Page 2: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/2.jpg)
Who I am
● Backend software engineer
● IT systems engineer
● Open source enthusiast
● Python, Javascript and Rust (learning)
muminoff
muminoff
![Page 3: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/3.jpg)
Software deployment is all of the activities that make a software system available for use.
― Wikipedia
![Page 4: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/4.jpg)
Manual deployments
● not consistent across environments
● slow, neither repeatable nor reliable
● require extensive documentation (often outdated)
● hinder collaboration (usually conducted by a few experts)
![Page 5: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/5.jpg)
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
![Page 6: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/6.jpg)
Traditional workflow (FTP, SFTP, SCP)
FTP, SSH HTTPCodebase
Local
WindowsmacOSLinux
Server
Directory
Web-server
WindowsmacOSLinux
Request
Browser
Mobile
API client
![Page 7: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/7.jpg)
Traditional workflow (Git, SVN, Mercurial)
git push Codebase
Local Server
Directory
Web-server
Request
Browser
Mobile
API client
HTTP
VCS
Repository
versions
git pull
WindowsmacOSLinux
GithubGitlab
Self hosted
WindowsmacOSLinux
![Page 8: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/8.jpg)
Automated workflow
VCS
commitcheckout
Build Automation
poll for changes
www
Productionenvironment
Unit tests
test
Sandboxenvironment
deploy
deployDeveloper
![Page 9: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/9.jpg)
Open source automation tools
● Chef
● Puppet
● Salt
● Ansible
● Fabric
![Page 10: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/10.jpg)
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)
![Page 11: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/11.jpg)
Puppet
● Written in Ruby
● Requires master (track infrastructure)
● Depends on agent
● Used by big companies
○ (e.g. RedHat, Microsoft)
![Page 12: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/12.jpg)
Salt
● Written in Python
● Requires agent (minions)
● Depends on PyDSL and Python
● Used by big companies
○ (e.g. Pivotal, CloudFlare)
![Page 13: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/13.jpg)
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.
![Page 14: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/14.jpg)
Fabric
● Written in Python
● Easy to learn, extend
● Programmatically integration
● Can be integrated with 3rd party tools
![Page 15: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/15.jpg)
Summary
Benefits Manual deployment Automated deployment
Less time consumption ⚝ ◾
Less error prone ⚝ ◾
Repeatable ⚝ ◾
Collaboration ⚝ ◾
![Page 16: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/16.jpg)
Continuous Delivery Vs. Continuous Deployment
![Page 17: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/17.jpg)
Continuous Delivery Vs. Continuous Deployment
![Page 18: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/18.jpg)
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 inventory10.1.2.4010.1.2.4110.1.2.43
playbook
![Page 19: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/19.jpg)
Example workflow (Ansible)
Developer10.1.2.60
Server
deploy
$ git pull origin master
…
$ npm install
…
$ bower install
…
$ gulp run build
…
$ supervisorctl restart all
…
$ service nginx reload
…
![Page 20: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/20.jpg)
Demo
![Page 21: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/21.jpg)
References
1. https://en.wikipedia.org/wiki/Software_deployment
2. https://en.wikipedia.org/wiki/Software_release_life_cycle
3. https://en.wikipedia.org/wiki/Release_management
4. https://en.wikipedia.org/wiki/DevOps
5. https://en.wikipedia.org/wiki/Ansible_(software)
6. https://www.ansible.com
7. http://www.fabfile.org/
![Page 22: Automated deployment](https://reader031.fdocuments.in/reader031/viewer/2022030306/58d0e7a91a28abba558b551f/html5/thumbnails/22.jpg)
Thank you