• Nenhum resultado encontrado

DevOps Continuous Integration and Delivery

N/A
N/A
Protected

Academic year: 2022

Share "DevOps Continuous Integration and Delivery"

Copied!
41
0
0

Texto

(1)

DevOps

Continuous Integration and Delivery

Arthur de Moura Del Esposte - 9534332 Athos Coimbra Ribeiro - 9532618

Presentation reviewed by Rogério Cardoso

(2)

Evolution of Software Engineering

2

(3)

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.

(4)

Agile software development

Individuals 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

(5)

Agile software development

SaaS Book - Chapters 1, 7, 8, 9, 10, 12

http://www.agilemanifesto.org/

Principles

Practices Methodologies

(6)

Eureka! - Automated Tests

6

(7)

Software Development vs. Tests

Iterative Development

Continuous Delivery

Refactoring

Test!

Simplicity

Feedback

Collective Code Ownership

(8)

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

(9)

Types of tests

Production Tests like black-box monitoring may also ensure that small

core functionalities are available.

(10)

The problems with tests

10

(11)

Common problems about tests

● 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”

(12)

Eureka! - Continuous Integration

12

(13)

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

CI

(14)

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

(15)

My software is ready,

just need to put it into

production!

(16)

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

(17)

The gap between

Development and

Operation

(18)

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

(19)

Eureka! - DevOps

(20)

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/

(21)

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

(22)

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)
(24)

DevOps - Basic Concepts

24

(25)

Ok … But how?

● Version control

● Automated tests

● Automated builds

● Automated packaging

● Automated deploy

● Infrastructure as code

● "Push on green"

● Black-box monitoring

(26)

26

(27)
(28)

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

(29)

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

(30)

Related Tools

30

(31)

Version Control System

https://subversion.apache.org/

https://www.mercurial-scm.org/

https://git-scm.com/

(32)

Automated tests

32 junit.org/

rspec.info/

https://cucumber.io/

(33)

Continuous Integration

https://travis-ci.org/

https://about.gitlab.com/gitlab-ci/

https://jenkins.io/

(34)

Continuous Delivery

34 https://www.chef.io/

https://puppet.com/

https://www.ansible.com/

(35)

Monitoring

munin-monitoring.org/

www.zabbix.com/

https://www.nagios.org/

(36)

Virtualization

36 https://www.vagrantup.com/

www.linux-kvm.org/

https://www.docker.com/ https://linuxcontainers.org/

https://www.virtualbox.org/

(37)

Our Experiences

(38)

38

(39)

"Toda vez que alguém modifica algo diretamente em um servidor de produção, um gatinho morre em algum lugar".

(40)

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

(41)

We code!

Referências

Documentos relacionados

Foi possível estimar parâmetros cinéticos relacionados à reação de hidrólise alcalina dos ésteres acetato de etila, estearina e palmitato de isopropila, também

Podemos verificar, que na técnica da Meia-Camada, as isotermas de refino dos cordões de solda da segunda camada penetram totalmente sobre a ZTA dos cordões de

Dissertação apresentada ao Programa de Pós-Graduação em Psicologia Institucional do Centro de Ciências Humanas e Naturais da Universidade Federal do Espírito Santo, como

Cambiar la reflexión, sobre el “porqué” se ha decidido de hacerlo y cuales resultados se han obtenido, no en el sentido estrictamente económico que sé esperaban , sobre como

O projeto ou proposta de revisão deverá ser votado pelas duas assem - bléias em term os idênticos, sendo que ela será definitiva depois de aprovada pelo referendum. Todavia, o

Diante do exposto, para um atendimento de melhor qualidade em relação à Unidade de Dispensação de Medicamentos de Alto Custo, a Ouvidoria de Saúde do Estado de Minas

determinants of blood pressure (BP), and thus, shift working and fixed nighttime work provides a suitable environment for the study of the effect of circadian

De acordo com a Organização Mundial de Saúde, não se deve interromper o programa de vacinação a crianças em zonas com uma elevada incidência de VIH, porque em primeiro lugar,