Nowadays, we heard a lot regarding micro services and DevOps but then, what are the impacts for an application development and how to really achieve this? The demo will demonstrate the benefits of using Docker (and related tools / technologies) for a micro services application and then having a continuous integration / tests / deployment workflow on CCS/Nimbus.
DEVNET-1169 CI/CT/CD on a Micro Services Applications using Docker, Salt & Nimbus.
1.
2. CI/CT/CD on a Micro services
applications using Docker, Salt &
Nimbus
Jeremie Garnier
Senior Software Engineer,
Chief Technology and Architecture Office, Cisco Systems
DevNet - 0077
4. • Control the multiscreen experience & ease the development of synchronized
applications
• No constraints on the application : The application is designed &
implemented without any constraint related to the cloud solution (ex
HTML5/CSS3D/WebGL, Native, Android, …)
• A DevOps approach, using modern solutions like Docker which brings
reduced TTM.
Context & objectives
5. Multiscreen : Layout engine
• The layout engine is a system that takes a packaged stream(s) of content and
determines the optimum way of presenting it on all the devices that are
available in a given environment.
• It is responsible for controlling the multiscreen experience & ease the
development of synchronized applications (integration of 2D physics engine)
• LE manages a set of applications (logical declaration). An application can
contain a set of widgets. The aim of the application level is really to define the
UX. Then, LE takes into account the application/widgets definition and the
environment in order to well execute the UX in the room.
6. Key concepts in use
• Git: source control
• Jenkins: build container(s), run tests (sandbox), push to Registry. No container
is shipped if sandbox tests failed
• Docker: portable, lightweight application runtime and packaging tool. Used for
micro services architecture to keep services isolated
• Consul: service discovery and configuration. Keep services isolated.
• SaltStack: infrastructure automation
• Salt Cloud: CCS resources provisioning
• Cisco Cloud Services: OpenStack
9. Micro Services composition
Services
Discovery
DB store
(mongo)
LE core (node.js)
Pub Sub
(redis)
Physic engine
(chipmunk)
Doc
(swagger)
Core front end
API Sync API
collalite-app
(apache,html5,js)
app-hub
(togetherjs hub,
node)
Audio, chat
Html,js,login
10. Docker & registry
• Easy to package sub part of the whole solution
• 2min for getting an E2E system
• Faster deployment: getting updates not whole images
• Registry: pushing & pulling images
13. Continuous integration & delivery: Jenkins & Docker
• Jenkins as the main part of the CI/CD
• Jenkins slaves in a Docker container
• Docker registry as our main delivery manager TBR
• Sandbox for each commit to ensure clean registry
14. Continuous Integration & Delivery: overview
Docker
registry
Jenkins Slave
1. Builder
2. Unit Test
3. Group Tests
4. Push
Scheduler
5. Notify
staging
prod
1. deploy
2. Group
tests
1. staging
2. prod
4. Group
tests
3. deploy
15. SandBox mode (Group Tests): LE example
1. commit
LE Core LE PE
Pub Sub DB store
Docker
registry
Docker
link
Docker
link
2. Launch
sandbox
[Test OK] push image to registry
3. Functional
Tests
16. Continuous Testing
• Implement from dev environment to production
• Sandbox environment makes clean registry
• E2E tests for ensuring not breaking anything
• Load tests for detecting bottlenecks & ensuring global stability
17. Continuous Testing
• E2E tests using Frisby.js: REST API testing framework built on node.js and
Jasmine (JUnit report)
18. Continuous Testing
• Load tests using Gatling.io: open source load testing framework based on
Scala, Aka and Netty.
20. Continuous Deployment
• SaltStack: SaltStack is extremely fast and scalable systems and configuration
management software for predictive orchestration, cloud and data center
automation, server provisioning, application deployment and more.
• Scheduler (in house tool): on top of SaltStack for orchestrating Docker container
deployment from registry to staging/production. Making links with Jenkins &
commits.
21. Where we are regarding DevOps?.
Continuous
integration
Continuous tests
Continuous
delivery
Continuous
deployment
Ops
24. Collalite application
• Develop a collaborative user application running on PC, tablet, smartphone
for sharing notes. It can be used for mind map, brainstorm or Kanban session
for instance. The user device is used as the input device for writing notes. Then
such a note can be sent on another surface, a shared main dashboard for
group visualization.
• The layout engine is responsible for organizing the notes. A physic engine is
integrated into the layout engine for managing objects movement, collision …
• Collalite integrates a group chat feature and audio call between participants.
Not just a trend, The big idea behind microservices is to architect large, complex and long-lived applications as a set of cohesive services that evolve over time. The term microservices strongly suggests that the services should be small.
Like Service oriented architecture
scalability, flexibility …
Facebook quote, Move fast and break things. Facebook's used that for years: it's a philosophy of trying out new ideas quickly so you can see if they survive in the marketplace. If they do, refine them; if they don't, throw it away without blowing a lot of time on development. From Mark Zuckerberg
In our case, we build pipeline which allow to move our application faster but then, we ensure the stability & quality