Microservices Case StudyShipped
Neelesh Pateriya
@ Cloud Innovation Lab - CTO (Ken Owens)
2© 2015 Cisco and/or its affiliates. All rights reserved. Cisco PublicPresentation ID
• Introduction
• Decision Timeline
• Architectural Choices
• Micro Services – Project Management
• Conclusion
Agenda
3© 2014 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Shipped Hybrid DevOps platform
enables developers to easily
Build, Deploy and Run
Containerized Microservices
4© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
ProjectManagement
ContinuousIntegration
Shipped 1.0
SourceControl
ContinuousDeployment
ApplicationOrchestration
DeveloperTools
ServiceAssurance
ConsulKafkaElasticsearchInfluxDB
IssueManagement
MesosMarathonConsulTerraformDroneGitHubGitHub
Cisco Spark
Build PacksEclipseVagrantDocker GitHub
Collaboration
5© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Shipped 10,000ft View
Environment
Shipped
GitHub Drone
CCS Region 2CCS Region 1
MicroserviceInfrastructure
MicroserviceInfrastructure
ShippedDeploy
MetaCloud
MicroserviceInfrastructure
Marketplace
Catalog
Laptop
Sandbox
Developer
6© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Microservices Architecture
Shipped-Core
Deploy
Event
Build
Logging
RepositoryContainer
CCS Region 2CCS Region 1
MicroserviceInfrastructure
MicroserviceInfrastructure
MetaCloud
MicroserviceInfrastructure
Cloud OS : Mesos-MarathonService Discovery: Consul 1. Registrator 2. Marathon-HAProxy. Logging Framework: 1. Logstash, ES, Kibana 2.Logstash, HDFS, ZoomData
Market Place
Metric
7© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Microservices Incremental Development
Idea Brainstorm
• Identified key services components
Investigation\ Prototype
•Validation of idea by creating monolithic.
Development Version 0.1
•Core API Service
• Infrastructure services
Development release 0.2
•Event Service
•User Interface
•SQL to Cassandra
Development release 0.3
•Build Service
•Cassandra As A Service.
•Container repository service
Development release 0.4
•Logging service
•Market Place
•….
8© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Drone• Builds source and runs unit tests in docker container (CI Slave).
• Very flexible build slave with developer capable of defining environment.
• Developer defines build, test, publish steps, no central admin.
• Open source product, Cisco shipped team contribute to build next gen version.
Continuous Integration
9© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Support multiple clustering in longer (first/default)
• Mesos-Marathon
• Kubernetes
• Docker Swarm
• Mesos-Kubernetes
Docker Clustering Choice
10© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Micro Services Infrastructure
Marathon
Controller Node
dnsmasq
Mesos Leader
ConsulServer
Registrator
Zookeeper
Docker
Linux
MesosSlave
Resource Node
dnsmasq
ConsulSlave
Registrator HAProxy
Docker
Linux
App App
11© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Multi Datacenter: Micro Services Discovery
1. Consul,Registrator, ConsulTemplate HAProxy2. Marathon/HAProxy, Consul
12© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Service Discovery & Load Balancer
MicroService-1MicroService-1MicroService-1
(Github repo)
MicroService-1MicroService-1MicroService-2
(Github repo)
MicroService-1MicroService-1Dependency-1
(Marketplace App)
MicroService-1MicroService-1Dependency-2
(Marketplace App)
Docker containers Mesos – Marathon (MS-infra)
Deploy Env. (Staging)
(MS-Infra)
(MS-Infra)
ConsulTemplate
HAProxy
Consul (DNS)
Registrator
1. Registrator monitors Docker events
2. Registrator adds docker instances host:port to service-name mapping to consul.
3. Consul exposes information via inbuilt DNS
4. Consult templates watches changes in Consul
5. HAProxy configuration is updated based on changes in consul
6. Namespace naming convention environment.project.service.shipped.com
13© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Cassandra v/s SQL
Node1
Node2Node3
Node1
Node2Node3
Multiple Datacenters
DC1 DC1
14© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
Timeline: Microservices and Team Growth
Idea Brainstorm
• Identified key services components
• 1 Pizza Size
Investigation\ Prototype
• Validation of idea by creating monolithic.
• 1 Pizza Size
Development Version 0.1
• Core API Service
• Infrastructure services
• 2 Pizza size (teams)
Development release 0.2
• Event Service
• User Interface
• SQL to Cassandra
• 3 Pizza Size
15© 2015 Cisco and/or its affiliates. All rights reserved. Cisco Confidential
• Day 1 design consider Microservices .
• Evaluate each service independently for scalability.
• Microservice enables easily changing service internal implementation with minimal impact to consumer.
• Microservices not only enables breaking software into manageable size but it also make team size manageable.
Conclusion
Thank you
16© 2015 Cisco and/or its affiliates. All rights reserved. Cisco PublicPresentation ID