Design patterns et Design Emergeant - Micro Days - Modern Software Development -
Modern Software Development
-
Upload
angel-conde-manjon -
Category
Software
-
view
76 -
download
0
Transcript of Modern Software Development
![Page 1: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/1.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/2.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/3.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/4.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/5.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/6.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/7.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/8.jpg)
©2016 IKERLAN. All rights reserved 8
Slack – Team communication
![Page 9: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/9.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/10.jpg)
©2016 IKERLAN. All rights reserved 10
Trello – Project Management
![Page 11: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/11.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/12.jpg)
©2016 IKERLAN. All rights reserved 12
Jenkins – Example
![Page 13: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/13.jpg)
©2016 IKERLAN. All rights reserved 13
Jenkins – GitHub Integration
![Page 14: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/14.jpg)
©2016 IKERLAN. All rights reserved 14
IDEs
![Page 15: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/15.jpg)
©2016 IKERLAN. All rights reserved 15
Debugging and Profiling
![Page 16: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/16.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/17.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/18.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/19.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/20.jpg)
©2016 IKERLAN. All rights reserved 20
Microservices
![Page 21: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/21.jpg)
©2016 IKERLAN. All rights reserved 21
Microservices
![Page 22: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/22.jpg)
©2016 IKERLAN. All rights reserved 22
Microservices
![Page 23: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/23.jpg)
©2016 IKERLAN. All rights reserved 23
Microservices – Scaling
![Page 24: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/24.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/25.jpg)
©2016 IKERLAN. All rights reserved 25
Microservices – High Availability
![Page 26: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/26.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/27.jpg)
©2016 IKERLAN. All rights reserved 27
Microservices – Service Discovery
![Page 28: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/28.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/29.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/30.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/31.jpg)
©2016 IKERLAN. All rights reserved 31
Microservices – Message Brokers
![Page 32: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/32.jpg)
©2016 IKERLAN. All rights reserved 32
Microservices – Message Brokers
![Page 33: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/33.jpg)
©2016 IKERLAN. All rights reserved 33
Microservices – Message Brokers
![Page 34: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/34.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/35.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/36.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/37.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/38.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/39.jpg)
©2016 IKERLAN. All rights reserved 39
Hashicorp Stack – Vagrant
![Page 40: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/40.jpg)
©2016 IKERLAN. All rights reserved 40
Hashicorp Stack – Consul
![Page 41: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/41.jpg)
©2016 IKERLAN. All rights reserved 41
Provisioning
Automatize your applications environment.
Install/configure platforms/software.
![Page 42: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/42.jpg)
©2016 IKERLAN. All rights reserved 42
Ansible – Example
![Page 43: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/43.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/44.jpg)
©2016 IKERLAN. All rights reserved 44
The Continuous wheel
![Page 45: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/45.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/46.jpg)
©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](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/47.jpg)
©2016 IKERLAN. All rights reserved 47
Continuous Delivery
![Page 48: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/48.jpg)
©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 49: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/49.jpg)
©2016 IKERLAN. All rights reserved 49
References (II)
http://progrium.com/blog/2014/07/29/understanding-modern-service-discovery-with-docker/
http://progrium.com/blog/2014/08/20/consul-service-discovery-with-docker/
https://github.com/ansible/ansible-examples
https://martin.kleppmann.com/2015/01/24/stream-processing-at-dev-winter.html
https://www.digitalocean.com/community/tutorials/how-to-configure-consul-in-a-production-environment-on-ubuntu-14-04
![Page 50: Modern Software Development](https://reader035.fdocuments.net/reader035/viewer/2022081604/589ae05e1a28abee708b4d65/html5/thumbnails/50.jpg)
©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: