athos coimbra ribeiro - 9532618 arthur de moura del ...athoscr/files/devops_intro.pdfdev ops 20...
TRANSCRIPT
DevOpsContinuous Integration and Delivery
Arthur de Moura Del Esposte - 9534332
Athos Coimbra Ribeiro - 9532618
1
Presentation reviewed by Rogério Cardoso
Evolution of Software Engineering
2
Evolution of Software Engineering
● Software has evolved in Complexity, Price, Support, Impact…
● Software engineering has evolved as well:
○ Methodologies
○ Practices
○ Tools
● Software Engineering aims to deliver valuable high-quality software.
3
Agile software developmentIndividuals and Interactions over Processes and Tools
Working software over Comprehensive documentation
Customer collaboration over Contract negotiation
Responding to change over Following a plan
4
● SaaS Book - Chapters 1, 7, 8, 9, 10, 12
● http://www.agilemanifesto.org/
● http://noop.nl/2008/06/top-20-best-agile-development-books-ever.html
Agile software development
5
● SaaS Book - Chapters 1, 7, 8, 9, 10, 12
● http://www.agilemanifesto.org/
● http://noop.nl/2008/06/top-20-best-agile-development-books-ever.html
Principles
Practices Methodologies
Eureka! - Automated Tests
6
Software Development vs. Tests
7
Iterative Development
Continuous Delivery
Refactoring
Test!
Simplicity
Feedback
Collective Code Ownership
Automated Tests● Reproducibility
● Fast and continuous feedback
● Automated coverage analysis
● Reducing uncertainty
● Documentation
● Saves time and money
● Accuracy
Whenever a test fails it proves that something is not working as expected!
8
Types of tests
Production Tests like black-box
monitoring may also ensure that small
core functionalities are available.
9
The problems with tests
10
Common problems about tests
11
● Not everybody run tests before commit
● Complex projects tend to have complex tests (Noosfero > 1h)
● Code reviews (MR) depends on whether tests work
● Some tests pass under some environments, but not in others
Running tests
https://xkcd.com/303/
“My tests are running”
Eureka! - Continuous Integration
12
Continuous Integration● CI: Executing tests before deploying, which may be challenging for developers
○ Depends on automation
● CI can test different scenarios
○ Browser compatibility
○ Compatibility with different compiler versions
○ External services integration
○ Stress
● Test may run after each single change
SaaS Book, 12.3
13
CI
Continuous Integration● Binaries and configuration must be
○ Reproducible
○ Automated
○ We don't want unique snowflakes!
● A new release may be generated each time all tests pass
● Deploy will only succeed if the software was tested and kept stable during
development
14
My software is ready, just need to put it into production!
15
But wait...
16
● How should you handle versioning?
● Should you use a continuous build and deploy model or perform periodic builds?
● How often should you release?
● Do we have access to the production server?
● How should we delivery bug-fixes?
https://www.youtube.com/watch?v=VG5ZOOb5T9o
The gap between Development and Operation
17
Traditional Thinking
18
● Devs’ job is to add new features and Ops’ job is to keep the site stable and fast
● After finishing the development, send the code to Ops
● “It’s not my machines, it’s your code!” VS. “It’s not my code, it’s your machines!”
● When developers "throw software over the wall" for admins to update servers,
there is a loss of reliability and agility
10+ Deploys Per Day: Dev and Ops Cooperation at Flickr
Eureka! - DevOps
19
Dev Ops
20
● Developers and Sysadmins should work together in the entire software lifecycle
○ Developers should not build and throw results over the fence
○ Devs think like Ops and Ops think like Devs
● All in the name of Continuous Delivery of valuable software
https://continuousdelivery.com/
Continuous delivery● To run a reliable service, you need a reliable release process (not a snowflake)
● Stability drives agility
● Frequent releases = Fewer changes between versions = Easier troubleshooting
● Releasing can be as painless as pressing a button
● Must be thought from the beginning of the development cycle
○ it's cheaper to put these practices early than later
21
Developer + Operations = DevOps● The term DevOps emerged in industry around 2008
● DevOps principles:
○ IT involvement in each phase of the system's design and development
○ Heavy reliance on automation
○ Application of engineering practices and tools to operations tasks
● Development teams control and own their own release process
22
DevOps is a Culture!
23
DevOps - Basic Concepts
24
Ok… But how?● Version control
● Automated tests
● Automated builds
● Automated packaging
● Automated deploy
● Infrastructure as code
● "Push on green"
● Black-box monitoring
25
26
27
Reliability● Different behavior may arise in different environments
● It is important to work with different environments
○ Development
○ Testing*
○ Staging
○ Production
* Book does not mention a testing environment
28
Deploy vs. Release● Release
○ New features available for the client
● Deploy
○ New code that incrementally builds those new features
● Point Release Software
○ Fedora, Debian, Gitlab, Android
● Rolling Release Software
○ Arch Linux, Facebook, Github
29
Related Tools
30
Version Control System31
https://subversion.apache.org/https://www.mercurial-scm.org/
https://git-scm.com/
Automated tests32
junit.org/
rspec.info/
https://cucumber.io/
Continuous Integration33
https://travis-ci.org/
https://about.gitlab.com/gitlab-ci/
https://jenkins.io/
Continuous Delivery34
https://www.chef.io/
https://puppet.com/
https://www.ansible.com/
Monitoring35
munin-monitoring.org/
www.zabbix.com/
https://www.nagios.org/
Virtualization36
https://www.vagrantup.com/
www.linux-kvm.org/
https://www.docker.com/ https://linuxcontainers.org/
https://www.virtualbox.org/
Our Experiences
37
38
39
"Toda vez que alguém modifica algo diretamente em um servidor de produção, um gatinho morre em algum lugar".
Antônio Terceiro
Learn more● Site Reliability Engineering: How Google Runs Production Systems
○ Chris Jones
● Engineering Software as a Service: An Agile Approach Using Cloud Computing
○ Fox, Armando and Patterson, David
● Continuous Delivery: Reliable Software Releases through Build, Test, and
Deployment Automation
○ Jez Humble
● Also, see the mentioned tools documentation
40
We code!
41