Modern Software Development

50
016 IKERLAN. All rights reserved ©2016 IKERLAN. All rights reserved Ikerlan – Modern Software Development Ángel Conde– [DevOps & Data Engineer] 2016/4/4

Transcript of Modern Software Development

Page 1: Modern Software Development

©2016 IKERLAN. All rights reserved©2016 IKERLAN. All rights reserved

Ikerlan – Modern Software Development

Ángel Conde– [DevOps & Data Engineer]2016/4/4

Page 2: Modern Software Development

©2016 IKERLAN. All rights reserved 2

Outline

1. Environment – Software tools

2. Architecture – Cloud based software

3. Ops – Coded Infrastructure

4. Deployment – Into the Continuous I/D wheel

Page 3: Modern Software Development

©2016 IKERLAN. All rights reserved 3

Git

Why another Version Control System?

1. Fast

2. Decentralized

3. Branch management made easy.

4. Everyone is using it!

Page 4: Modern Software Development

©2016 IKERLAN. All rights reserved 4

Git – Branch flow

A branch for each different feature.

Use tags for identification.

Merge / Rebase concepts.

Page 5: Modern Software Development

©2016 IKERLAN. All rights reserved 5

Git – Basic Example

git clone [email protected]:foo/bar.git cd bartouch something git add something git commit -a -m "foo" git push

User A:

User B:

git pullecho “blah blah” | tee --append somethinggit commit –a –m “added something”git push

Page 6: Modern Software Development

©2016 IKERLAN. All rights reserved 6

GitHub – Social VCS

Issues / Releases / Milestones.

Promotes collaboration between developers.

Pull request concept for Open Source projects.

Open Source alternative, .

Page 7: Modern Software Development

©2016 IKERLAN. All rights reserved 7

Slack – Team communication

Write less emails.

Integration with 3rd party tools (GitHub, Trello).

Useful search functions.

Snippets, share your code.

Works everywhere.

Private channels.

Page 8: Modern Software Development

©2016 IKERLAN. All rights reserved 8

Slack – Team communication

Page 9: Modern Software Development

©2016 IKERLAN. All rights reserved 9

Trello – Project Management

Kanban system from Toyota.

Three main elements:

1. Boards: used to house a project.

2. Lists: organize your tasks into lists.

3. Cards: to-do items.

Cards can be moved between lists.

Page 10: Modern Software Development

©2016 IKERLAN. All rights reserved 10

Trello – Project Management

Page 11: Modern Software Development

©2016 IKERLAN. All rights reserved 11

Jenkins – CI Server

Automate your tests on each Push.

Hundreds of plugins.

Provides Continuous Delivery support.

Multiple languages support.

Distributed model Master / Slaves.

Page 12: Modern Software Development

©2016 IKERLAN. All rights reserved 12

Jenkins – Example

Page 13: Modern Software Development

©2016 IKERLAN. All rights reserved 13

Jenkins – GitHub Integration

Page 14: Modern Software Development

©2016 IKERLAN. All rights reserved 14

IDEs

Page 15: Modern Software Development

©2016 IKERLAN. All rights reserved 15

Debugging and Profiling

Page 16: Modern Software Development

©2016 IKERLAN. All rights reserved 16

Outline

1. Environment – Software tools

2. Architecture – Cloud based software

3. Ops – Coded Infrastructure

4. Deployment – Into the Continuous I/D wheel

Page 17: Modern Software Development

©2016 IKERLAN. All rights reserved 17

Cloud based software

On Premise

On Cloud

Hybrid

PROVIDERS TYPES

IaaS

PaaS

SaaS

SERVICES

Page 18: Modern Software Development

©2016 IKERLAN. All rights reserved 18

Cloud based software

Reduce infrastructure costs.

SaaS for further cost reduction.

Scalability Elasticity.

High Availability.

Blue-Green deployments.

Microservices

Page 19: Modern Software Development

©2016 IKERLAN. All rights reserved 19

Microservices

Very simple, focus on doing one thing well.

Each service can be built using the best tool.

Systems inherently loosely coupled.

Multiple teams can deliver independently.

Page 20: Modern Software Development

©2016 IKERLAN. All rights reserved 20

Microservices

Page 21: Modern Software Development

©2016 IKERLAN. All rights reserved 21

Microservices

Page 22: Modern Software Development

©2016 IKERLAN. All rights reserved 22

Microservices

Page 23: Modern Software Development

©2016 IKERLAN. All rights reserved 23

Microservices – Scaling

Page 24: Modern Software Development

©2016 IKERLAN. All rights reserved 24

Microservices – High Availability

Design “stateless” apps.

Use different availability zones.

Load balancers serve to healthy instances.

Store sessions outside the apps (Redis).

Page 25: Modern Software Development

©2016 IKERLAN. All rights reserved 25

Microservices – High Availability

Page 26: Modern Software Development

©2016 IKERLAN. All rights reserved 26

Microservices – Service Discovery

Dynamically distributed architecture.

Is there at least one DB instance running?

At which IP?

On which port?

Page 27: Modern Software Development

©2016 IKERLAN. All rights reserved 27

Microservices – Service Discovery

Page 28: Modern Software Development

©2016 IKERLAN. All rights reserved 28

Microservices – Message Brokers

Kafka: LinkedIn’s message Broker

Influenced by transaction logs from the DB world.

High-throughput, low-latency.

Used by: Cisco, Netflix, Uber, PayPal, Spotify..

Topics & Partitions.

Page 29: Modern Software Development

©2016 IKERLAN. All rights reserved 29

Microservices – Message Brokers

LOGS EVERYWHERE

1. DB storage engines.

2. DB replication

3. Distributed consensus, aka Zookeeper .

4. Kafka.

Page 30: Modern Software Development

©2016 IKERLAN. All rights reserved 30

Microservices – Message Brokers

Byte Stream

In-memory

Blocking/backpressure

One-to-one (tee)

KAFKA UNIX PIPES

Messages

Durable

Buffering

Multi-subscriber

Page 31: Modern Software Development

©2016 IKERLAN. All rights reserved 31

Microservices – Message Brokers

Page 32: Modern Software Development

©2016 IKERLAN. All rights reserved 32

Microservices – Message Brokers

Page 33: Modern Software Development

©2016 IKERLAN. All rights reserved 33

Microservices – Message Brokers

Page 34: Modern Software Development

©2016 IKERLAN. All rights reserved 34

Beyond the VM´s – Docker

•Multiple isolated user space instances.

•On par with bare metal performance of servers.

• Solves “Works on my machine” syndrome.

Docker: a container based virtualization system

App A App B

Libs

Guest OS

Libs

Guest OS

Hypervisor

Host OS

Server

App B

Docker Engine

Host OS

Server

App A

Libs LibsVMs Docker

Page 35: Modern Software Development

©2016 IKERLAN. All rights reserved 35

Orchestration

Kubernetes: Google´s approach to container orchestration.

Apache Mesos: Mesosphere approach´s, promoted to Apache top level project.

Docker Swarm: Docker native clustering orchestration system.

Page 36: Modern Software Development

©2016 IKERLAN. All rights reserved 36

Outline

1. Environment – Software tools

2. Architecture – Cloud based software

3. Ops – Coded Infrastructure

4. Deployment – Into the Continuous I/D wheel

Page 37: Modern Software Development

©2016 IKERLAN. All rights reserved 37

Infrastructure as a Code (IaC)

Automatize your infrastructure.

Keep your developers happy.

Launch VMs, configure OS and configure applications.

Software Defined Networks -- Microsoft platform.

Page 38: Modern Software Development

©2016 IKERLAN. All rights reserved 38

Consul: service discovery and configuration.

Vagrant: portable work environments.

Terraform: build, change and version infrastructure.

Vault: centralized secret management.

Hashicorp Stack

Page 39: Modern Software Development

©2016 IKERLAN. All rights reserved 39

Hashicorp Stack – Vagrant

Page 40: Modern Software Development

©2016 IKERLAN. All rights reserved 40

Hashicorp Stack – Consul

Page 41: Modern Software Development

©2016 IKERLAN. All rights reserved 41

Provisioning

Automatize your applications environment.

Install/configure platforms/software.

Page 42: Modern Software Development

©2016 IKERLAN. All rights reserved 42

Ansible – Example

Page 43: Modern Software Development

©2016 IKERLAN. All rights reserved 43

Outline

1. Environment – Software tools

2. Architecture – Cloud based software

3. Ops – Coded Infrastructure

4. Deployment – Into the Continuous I/D wheel

Page 44: Modern Software Development

©2016 IKERLAN. All rights reserved 44

The Continuous wheel

Page 45: Modern Software Development

©2016 IKERLAN. All rights reserved 45

Continuous Integration

Adopted first on Extreme Programming.

Remove the problem of finding later issues in the build lifecycle.

Enforces disciple of frequent automated testing.

Immediate feedback on system-wide impact of local changes.

Metrics reports focus developers on improve the code.

Page 46: Modern Software Development

©2016 IKERLAN. All rights reserved 46

Continuous Delivery

Ensure that the software can be reliable released any time.

Build, test and release software faster and frequently.

Accelerated time to market.

Building the right product (user feedback).

Productivity and efficiency.

Page 47: Modern Software Development

©2016 IKERLAN. All rights reserved 47

Continuous Delivery

Page 48: Modern Software Development

©2016 IKERLAN. All rights reserved 48

References

https://git-scm.com/book/es/v1

http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/

http://wpcurve.com/trello-for-project-management/

http://techblog.netflix.com/2016/03/how-we-build-code-at-netflix.html

http://developers.redhat.com/blog/2014/08/14/find-fix-memory-leaks-java-application/

https://www.youtube.com/watch?v=YCC-CpTE2LU

http://www.tutorialspoint.com/jenkins/index.htm

Page 50: Modern Software Development

©2016 IKERLAN. All rights reserved

IKERLAN Polo GaraiaC/ Goiru , 920500 Arrasate-Mondragón

Tel.: 943 71 02 12Fax: 943 79 69 44

IKERLAN Unidad de energíaParque Tecnológico de Álava,C/ Juan de la Cierva, 101510 Miñano

Tel.: 945 29 70 32Fax: 943 79 69 44

www.ikerlan.es

ORONA IDeO - Innovation cityPol. Industrial Galarreta, Parcela 10.5, Edificio A320120 Hernani

Tel.: 945 29 70 32Fax: 943 79 69 44

IKERLANPº. J. Mª. Arizmendiarrieta, 2

20500 Arrasate-Mondragón

Tel.: 943 71 24 00Fax: 943 79 69 44

Questions?Email: [email protected]

Thanks for your attention: