deployment - akrabat.com
TRANSCRIPT
![Page 1: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/1.jpg)
DeploymentWithin a Traditional IT environment
Rob Allen
akrabat.com ~ @akrabat ~ January 2017
![Page 2: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/2.jpg)
What?Software deployment is all of the activities that make asoftware system available for use.
Wikipedia
Rob Allen ~ @akrabat
![Page 3: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/3.jpg)
Traditional IT environment
Rob Allen ~ @akrabat
![Page 4: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/4.jpg)
Not in this talk• Cloud deployments• Provisioning of servers• Continuous Delivery• Chat Ops
Rob Allen ~ @akrabat
![Page 5: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/5.jpg)
Fundamentals
Rob Allen ~ @akrabat
![Page 6: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/6.jpg)
Development processes
Rob Allen ~ @akrabat
![Page 7: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/7.jpg)
Code organisation• Isolate work• Work on branches• Always have a way to bugfix live
Rob Allen ~ @akrabat
![Page 8: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/8.jpg)
Feature branches
Rob Allen ~ @akrabat
![Page 9: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/9.jpg)
Git flow
Rob Allen ~ @akrabat
![Page 10: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/10.jpg)
Automatic testingAutomatically test every PR
• Coding style• Unit tests• Functional tests• Acceptance tests
Rob Allen ~ @akrabat
![Page 11: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/11.jpg)
DB schema management
Rob Allen ~ @akrabat
![Page 12: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/12.jpg)
Migrations• Schema changes stored in individual files• delta files with UP and DOWN functionality• It really doesn't matter which tool you use
Rob Allen ~ @akrabat
![Page 13: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/13.jpg)
Configuration data
Rob Allen ~ @akrabat
![Page 14: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/14.jpg)
Context awarenessEach instance needs different configuration
• Environment variables (12factor.net/config)• Local configuration file
Rob Allen ~ @akrabat
![Page 15: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/15.jpg)
Deployment
Rob Allen ~ @akrabat
![Page 16: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/16.jpg)
Manual deploymentSimply copy the files to the right place(S)FTP / rsync / Remote Desktop
Rob Allen ~ @akrabat
![Page 17: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/17.jpg)
Manual deployment• Slow• Inconsistencies between each deploy• Failures in production• No records. Who deployed what, when (or where)?
Rob Allen ~ @akrabat
![Page 18: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/18.jpg)
It's more than just code
Rob Allen ~ @akrabat
![Page 19: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/19.jpg)
Other things to think about• File permissions• Preserve user uploaded files• After upload
• Stale cache?• Cache priming?
• Keeping records
Rob Allen ~ @akrabat
![Page 20: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/20.jpg)
People aren't machines!
Rob Allen ~ @akrabat
![Page 21: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/21.jpg)
AutomationPeople:
good at creative judgementMachines:
good at doing the same thing over and over
Rob Allen ~ @akrabat
![Page 22: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/22.jpg)
Benefits• Deferred deployments• Self-service deployments• Automatically triggered deployments• Smoke tests• Automatic rollbacks
Rob Allen ~ @akrabat
![Page 23: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/23.jpg)
Scripts• Provide consistency• Provide a platform for additional abilities• No need to wait for other people• Faster and less hassle.
Rob Allen ~ @akrabat
![Page 24: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/24.jpg)
Deployment checklist• Copy files & folders• Database schema & content updates• Configuration updates• File permissions• Clear caches
Rob Allen ~ @akrabat
![Page 25: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/25.jpg)
Tooling• Simple script• Make-like tool• Specialist tool
Rob Allen ~ @akrabat
![Page 26: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/26.jpg)
Simple script• Bash• Powershell• Usually runs on the server
Rob Allen ~ @akrabat
![Page 27: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/27.jpg)
Make-like tool• Abstracted script• Easier to make cross platform• Make/Phing/Ant/Rake• More likely to push to server
Rob Allen ~ @akrabat
![Page 28: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/28.jpg)
Specialist tools• Fabric/Capistrano• Ansible/Chef/Puppet/Salt• Deploybot• More likely to be automated
Rob Allen ~ @akrabat
![Page 29: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/29.jpg)
Challenges
Rob Allen ~ @akrabat
![Page 30: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/30.jpg)
TechnicalInfrastructure challenges• Platform• Permissions
Rob Allen ~ @akrabat
![Page 31: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/31.jpg)
Political• What is acceptable?• What are you allowed to do?• Does IT change things for you?• Does IT change things unexpectedly?• Change request documentation?
Rob Allen ~ @akrabat
![Page 32: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/32.jpg)
Case studies
Rob Allen ~ @akrabat
![Page 33: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/33.jpg)
Case study 1: Internal• Self-hosted by client• Within company network• Windows/IIS/SQL Server
Rob Allen ~ @akrabat
![Page 34: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/34.jpg)
Case study 1: InternalMulti-script solution
1. Script to tag code & build tarball2. Ship tarball to UAT server via VPN3. IT copy tarball from UAT to Live4. Script to untar & run deploy steps
Rob Allen ~ @akrabat
![Page 35: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/35.jpg)
Case study 2: Minicomputer• Self-hosted by client• Some access to Internet• IBM i-series/DB2
Rob Allen ~ @akrabat
![Page 36: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/36.jpg)
Case study 2: Minicomputer• CI tooling• Checklist
• Manual tag creation for release• Automatic script to deploy
Rob Allen ~ @akrabat
![Page 37: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/37.jpg)
Final thought
Rob Allen ~ @akrabat
![Page 38: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/38.jpg)
Rob Allen ~ @akrabat
![Page 39: Deployment - akrabat.com](https://reader030.vdocuments.mx/reader030/viewer/2022020701/61f6cceb13afed627639f11b/html5/thumbnails/39.jpg)
Thank you!
Rob Allen ~ akrabat.com ~ @akrabat