Modern Software Development
-
Upload
angel-conde-manjon -
Category
Software
-
view
68 -
download
0
Transcript of 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
©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
©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!
©2016 IKERLAN. All rights reserved 4
Git – Branch flow
A branch for each different feature.
Use tags for identification.
Merge / Rebase concepts.
©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
©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, .
©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.
©2016 IKERLAN. All rights reserved 8
Slack – Team communication
©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.
©2016 IKERLAN. All rights reserved 10
Trello – Project Management
©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.
©2016 IKERLAN. All rights reserved 12
Jenkins – Example
©2016 IKERLAN. All rights reserved 13
Jenkins – GitHub Integration
©2016 IKERLAN. All rights reserved 14
IDEs
©2016 IKERLAN. All rights reserved 15
Debugging and Profiling
©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
©2016 IKERLAN. All rights reserved 17
Cloud based software
On Premise
On Cloud
Hybrid
PROVIDERS TYPES
IaaS
PaaS
SaaS
SERVICES
©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
©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.
©2016 IKERLAN. All rights reserved 20
Microservices
©2016 IKERLAN. All rights reserved 21
Microservices
©2016 IKERLAN. All rights reserved 22
Microservices
©2016 IKERLAN. All rights reserved 23
Microservices – Scaling
©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).
©2016 IKERLAN. All rights reserved 25
Microservices – High Availability
©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?
©2016 IKERLAN. All rights reserved 27
Microservices – Service Discovery
©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.
©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.
©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
©2016 IKERLAN. All rights reserved 31
Microservices – Message Brokers
©2016 IKERLAN. All rights reserved 32
Microservices – Message Brokers
©2016 IKERLAN. All rights reserved 33
Microservices – Message Brokers
©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
©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.
©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
©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.
©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
©2016 IKERLAN. All rights reserved 39
Hashicorp Stack – Vagrant
©2016 IKERLAN. All rights reserved 40
Hashicorp Stack – Consul
©2016 IKERLAN. All rights reserved 41
Provisioning
Automatize your applications environment.
Install/configure platforms/software.
©2016 IKERLAN. All rights reserved 42
Ansible – Example
©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
©2016 IKERLAN. All rights reserved 44
The Continuous wheel
©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.
©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.
©2016 IKERLAN. All rights reserved 47
Continuous Delivery
©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
©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
©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: