Top Banner
In-cluster Open Source Testing Framework For Docker containers Neil Gehani – Sr. Product Manager, HPE-SW @GehaniNeil
24

In cluster open source testing framework - Microservices Meetup

Apr 08, 2017

Download

Software

Neil Gehani
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: In cluster open source testing framework - Microservices Meetup

In-cluster Open Source Testing Framework For Docker containers

Neil Gehani – Sr. Product Manager, HPE-SW @GehaniNeil

Page 2: In cluster open source testing framework - Microservices Meetup

About me

– Former Software Engineer

– 10+ Years as a Product Manager

– Previously at: LinkedIn, Founder of eCommerce startup, Check Point Software

– Twitter: @GehaniNeil, Website: gehani.me

– Current Role (HPESW-ADM): Solving problems for modern development teams building apps as services in containers

– Published on Slideshare.net – Product Portfolio Planning – In-cluster testing framework – Cloud-native ALM

– Medium Article on DevOps and In-Cluster Open Source Testing Framework

– Dabble in writing code, geeking out new technologies, conquering the hills of the bay area on my bike

Page 3: In cluster open source testing framework - Microservices Meetup

Applications are changing – accelerate to a digital enterprise

3Courtesy of

Page 4: In cluster open source testing framework - Microservices Meetup

Our mission

In a recent NGINX survey [Finding #7], the “biggest challenge holding back developers”

• Having to constantly trade-off between quality of code and expected speed of delivery

• Multiple and increasingly complex environments • Lack of automation tools and processes

4

To solve problems for Developers building cloud-native applications as “services” in containers.

Target users: Modern “2 pizza” development teams

Page 5: In cluster open source testing framework - Microservices Meetup

Business process

Teams should be built around business value

5

Microservices

Business activity

Page 6: In cluster open source testing framework - Microservices Meetup

Taxonomy – Modern Application Development & Delivery

– Applications or Systems are set of “services”

– “Service” = business value

– Cloud-native is a design pattern

– Microservices is an architecture – Containers are portable. “If it works on my machine, it will run in production” is real

– Platform to deploy “services” (PaaS)

– Infrastructure to run “services (IaaS) – Developers don’t care how

– Serverless is compute on-demand

– DevOps is a practice – App Transformation and DevOps are two sides of the same coin

6

DevOps goal: Maximize business value by reducing cycle time Time value of money principle applied to software delivery

Page 7: In cluster open source testing framework - Microservices Meetup

Feel the need for speed

Page 8: In cluster open source testing framework - Microservices Meetup

Balancing Time Value of Money

– Time value of delivery

– Time value of shipping

8Source: Brandon Chu - Time Value of Shipping

Page 9: In cluster open source testing framework - Microservices Meetup

Reducing cycle time minimizes risk, improves quality, speed

9

VS.

Faster release cycle Less code to validate Easier to schedule

Longer test cycles

Less predictability

Unable to adapt to change

Page 10: In cluster open source testing framework - Microservices Meetup

Principles of Microservices

Page 11: In cluster open source testing framework - Microservices Meetup

API Gateway

Start Decoupling From Your Monolith

11

Monolith

API Gateway

New Feature 1

New Feature 2

Re-factor Feature 3

UI

New UI Features

Page 12: In cluster open source testing framework - Microservices Meetup

The challengeNew matrix from hell

12Courtesy of

Page 13: In cluster open source testing framework - Microservices Meetup

Introducing TUGBOT.IOAn HPE Open Source Project

13

Page 14: In cluster open source testing framework - Microservices Meetup

MONITORPLAN TESTTESTTESTTEST

ALM Octane - AnalyticsVisualization (Kibana)ElasticSearch

Run Collect Env: Dev

Run Collect Env: Test

Run Collect Env: Stage

Run Collect Env: Prod

Test results

Tugbot—in-cluster testing framework for Docker ContainersDevelopers IT Operations

Page 15: In cluster open source testing framework - Microservices Meetup

Use cases—make continuous testing real (24x7x365)

– Simplify & standardize testing in any environment – Any test, Any tool (integration, functional, performance, security, chaos, etc.)

– E.G test backing services or based on operational activities

– Event driven testing - trigger tests on events – Docker events:image update, new container, etc. – Timer events: CRON – once in time interval – Host events: kernel update, host restart, package update, config

update, etc. – External event: someone asked to run tests, etc.

– Standardize collection of test results from all machines – Aggregate and analyze test results over time to track quality improvements – Test context: Events, Docker containers, Host configuration, user defined context

– Share “Test Containers” – ”Social-testing” (e.g. Docker security bench test)

Page 16: In cluster open source testing framework - Microservices Meetup

“Tugbot” workflow

KibanaTest

containers

1. Discover test containers

4. Publish results to ES

ALM OctaneFrom github.com

3. Collect rresults

2. Runtests (Tugbot)

5. Visualize

Micro services

Page 17: In cluster open source testing framework - Microservices Meetup

Open Sourced

Tugbot components

Page 18: In cluster open source testing framework - Microservices Meetup

“Test Container” Dockerfile

Docker

Tugbot

Example - “test container” Dockerfile.xxx

LABEL tugbot.event.docker=[list of Docker events]

Page 19: In cluster open source testing framework - Microservices Meetup

Demo flow

– Deploy app

– Deploy Tugbot services – Run, collect, result – Elasticsearch + Kibana

– Launch app – Vote

– Deploy 1st run of Tugbot

– Inject failures – Functional and integration

– View results

– Inject chaos (Pumba)

– View results

Source: DockerCon 2016

Page 20: In cluster open source testing framework - Microservices Meetup

Demo

Page 21: In cluster open source testing framework - Microservices Meetup

How to get an “Oculus VR Gear” headset?

– Open to anyone that wants to develop or contribute to the open source community

– Make sure we can reach you if you are contributing

– Deadline: December 9th, 2016 - Winner is chosen – Our S/W Engineering Team will select

– Contribute to and/or open issues for one of these repos: (contributions w/+reactions are weighted higher)

– Tugbot / Leader / Kubernetes - Standalone, Swarm, Kubernetes

– Tugbot Collect = Tugbot-result-service

– Tugbot Results Service-es

– Join and contribute to the Slack channel: https://tugbot.slack.com

– Example Voting App

21

Page 22: In cluster open source testing framework - Microservices Meetup

HPESW-ADM Open Source contributions– In-cluster testing framework for microservices in containers

– Tugbot – open sourced (github) - slides – Published in docker’s weekly newsletter – DEMO App (same one used at DockerCon16) – github

– Chaos injection tool – “Pumba” – open sourced (github) – Resiliency testing for microservices in containers

– Chaos injection with network emulation – Pumba with netem – open sourced – github – Used in the DEMO App

– Containerized Docker Bench security testing

– References

– 12factor.net

– Testing Strategies for Microservices - Martin Fowler

22

Page 23: In cluster open source testing framework - Microservices Meetup

Orchestration and Scheduling - Swarm, Kubernetes, Marathon

Application Lifecycle Management on modern platforms

Future

Web console

Agile ALM Predictive ALM Cloud-native ALMApplication Lifecycle Management (ALM Octane)

HPESW Services

Container Platform (PaaS, DC/OS, DiDC)

vSphereAWSOpenStack Docker Engine

Docker Trusted Registry

H/W

Page 24: In cluster open source testing framework - Microservices Meetup

We gladly accept pull requests https://github.com/gaia-docker/tugbot

@GehaniNeil

Join us on Slack: tugbot-public.slack.com (public) For Developers/Contributors: tugbot.slack.com

TUGBOT.IO is live!