On Software Engineering

in the Cloud Era

https://on-sw-eng.netlify.app

Start With Why

  • I ❤️ software engineering
  • Deliver value
  • Experience knowledge

whoami

Agenda

  • DevOps
  • Culture & organization
  • Principles & practices
  • Technology & tools

Goal

  • Overview and intro about the topic
  • Focus on software engineering aspects for microservices in the cloud
  • Software craftsmanship (code, build, test) is considered a commodity and won’t be treated in this talk

DevOps

DevOps Loop

image credits

What Is DevOps?

DevOps is the combination of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity: evolving and improving products at a faster pace than organizations using traditional software development and infrastructure management processes. This speed enables organizations to better serve their customers and compete more effectively in the market.

https://aws.amazon.com/devops/what-is-devops/

DevOps Compared

image credits

CA(L)MS

  • Culture
  • Automation
  • Lean
  • Measurement
  • Sharing

Pillars of DevOps

  • Culture & organization
  • Principles & practices
  • Technology & tools

Culture & Organization

The Second Law of Consulting

“No matter how it looks at first, it’s always a people problem.” – Gerald Weinberg

The Secrets of Consulting

Continuous Improvement

“If it hurts, do it more often, and bring the pain forward.” – Jez Humble

https://continuousdelivery.com

Automate Everything

“Automate everything and make those parts that can’t be automated a self-service.” – Gregor Hohpe

Gregor’s Ramblings

Automation Reloaded

“Hire the people who will automate themselves out of a job, then just keep giving them jobs.” – Jezzie Frazelle

https://twitter.com/jessfraz/status/942031487809085440

Internet Unicorn: Spotify

image credits

Internet Unicorn: AWS

“You build it, you run it” – Werner Vogels

image credits

Meanwhile in Corporate Land

https://www.scaledagileframework.com

Principles & Practices

Microservices

image credits

What Are Microservices?

  • Independently deployable
  • Modelled around a business domain
  • Own their state
  • Provide flexibility
  • Help with alignment of architecture and organization
  • Smart endpoints, dumb pipes

Twelve-Factor App (1/2)

  1. One codebase in version control
  2. Declare and isolate dependencies
  3. Config in the environment
  4. Backing services as attached resources
  5. Separate build and run stages
  6. Execute app as stateless processes

https://12factor.net

Twelve-Factor App (2/2)

  1. Export services via port binding
  2. Scale out via the process model
  3. Fast startup and graceful shutdown
  4. Keep dev, staging, and production as similar as possible
  5. Treat logs as events streams
  6. Admin processes as one-off processes

https://12factor.net

Continuous Integration

image credits

What Is Continous Integration?

Continuous Integration (CI) is a development practice that requires developers to integrate code into a shared repository several times a day. Each check-in is then verified by an automated build, allowing teams to detect problems early.

By integrating regularly, you can detect errors quickly and locate them more easily

https://www.thoughtworks.com/continuous-integration

What Is Continuous Delivery?

Continuous Delivery (CD) is the ability to get changes of all types—including new features, configuration changes, bug fixes, and experiments—into production, or into the hands of users, safely and quickly in a sustainable way.

https://continuousdelivery.com

Benefits of Continuous Delivery

  • Low-risk releases
  • Faster time to market
  • Higher quality
  • Lower costs
  • Better products
  • Happier teams

Deployment Pipeline

image credits

What Is a Deployment Pipeline?

  • Automated manifestation of your process for getting software from version control into the hands of your users
  • Push-button deployments
  • Feedback loop
  • Increasing confidence

Continuous Deployment

image credits

Infrastructure as Code

image credits

Infrastructure as Code

Infrastructure as Code (IaC) means writing code (which can be done using a high level language or any descriptive language) to manage configurations and automate provisioning of infrastructure in addition to deployments. This is not simply writing scripts, but involves using tested and proven software development practices that are already being used in application development. For example: version control, testing, small deployments, use of design patterns etc.

Infrastructure as Code: A Reason to Smile

Everything as Code

  • Software
  • Configuration
  • Infrastructure

Git Branching Models

Database Migrations

  • Automate your DB migration
  • Put the migration scripts under version control
  • Use idempotent steps
  • Use an appropriate tool such as Flyway

GitOps

image credits

What Is GitOps?

  • Declarative deployments
  • Git as the central source of truth
  • GitOps diffs declared state (in Git) with observed state (live system)
  • Changes are observable, verifiable, and audited
  • “Operations by pull requests”: all intended operations are commited by PRs
  • Rollback & D/R

Chaos Engineering

image credits

What Is Chaos Engineering?

Chaos Engineering is the discipline of experimenting on a system in order to build confidence in the system’s capability to withstand turbulent conditions in production.

https://principlesofchaos.org

Technology & Tools

Cloud Native

image credits

Cloud Native Definition (1/2)

Cloud native technologies empower organizations to build and run scalable applications in modern, dynamic environments such as public, private, and hybrid clouds. Containers, service meshes, microservices, immutable infrastructure, and declarative APIs exemplify this approach.

These techniques enable loosely coupled systems that are resilient, manageable, and observable. Combined with robust automation, they allow engineers to make high-impact changes frequently and predictably with minimal toil.

Cloud Native Definition (2/2)

The Cloud Native Computing Foundation (CNCF) seeks to drive adoption of this paradigm by fostering and sustaining an ecosystem of open source, vendor-neutral projects. We democratize state-of-the-art patterns to make these innovations accessible for everyone.

https://github.com/cncf/toc/blob/master/DEFINITION.md

Cloud Native Landscape

https://landscape.cncf.io

Cloud Native Trail Map

https://github.com/cncf/trailmap

Observability

image credits

What Is Observability?

In control theory, observability is a measure of how well internal states of a system can be inferred by knowledge of its external outputs. The observability and controllability of a system are mathematical duals.

https://en.wikipedia.org/wiki/Observability

Logging

image credits

What Is Logging?

A log is a timestamped text record, either structured (recommended) or unstructured, with metadata.

Metrics

image credits

What Are Metrics?

A metric is a measurement about a service, captured at runtime.

Tracing

image credits

What Is Tracing?

Traces track the progression of a single request, called a trace, as it is handled by services that make up an application.

Containers (Docker)

image credits

What Are Containers?

  • Standardized mechanism for building, deploying, and operating applications
  • Isolation of applications
  • Clear definition of interface between application and infrastructure
  • Potential to unify workflows
  • Dev and test environments similar to production

Container Orchestration (Kubernetes)

Kubernetes (K8s) is an open-source system for automating deployment, scaling, and management of containerized applications.

https://kubernetes.io

What Is Kubernetes?

Kubernetes, at its basic level, is a system for running and coordinating containerized applications across a cluster of machines. It is a platform designed to manage the lifecycle of containerized applications and services using methods that provide predictability, scalability, and high availability.

Deployment Strategies

  1. Recreate
  2. Rolling Update
  3. Blue/Green
  4. Canary
  5. A/B Testing
  6. Shadow

Service Mesh

image credits

What Is a Service Mesh?

  • Traffic control: service discovery, routing, load balancing, circuit breaking, traffic splitting, fault injection, etc.
  • Security: zero-trust networking, mutual auth (mTLS), RBAC, dynamic policies, rate limiting (DoS), etc.
  • Observability: metrics (golden signals), distributed traces, access logs

Books

acend Trainings

10% Voucher Code: ACEND4DIN21

Presentation Source

https://github.com/johanngyger/on-sw-eng

Thank You!