docker build, test and deploy saa s applications

10
Docker: Build, test and deploy SaaS applications William Greenly, Technology and Platform Manager Jio XLabs Jio

Upload: williamgreenly

Post on 12-Feb-2017

32 views

Category:

Technology


0 download

TRANSCRIPT

Docker: Build, test and deploy SaaS applicationsWilliam Greenly, Technology and Platform Manager Jio XLabsJio

Jio

● It is the largest 4G network in the world, and by 2019 it will be available for over 1 billion Indians across the entire country, urban and remote rural. Most users experience between 18-70 Mbs download speeds.

● It is entirely IP based. No separate analogue/hybrid network for voice.● It is launching with 1 tariff and 1 tariff only - data.● Which it will charge at a maximum of 50 rupees per GB making it the cheapest in

the world.● It is completely free for anyone and everyone who signs up, until December 31st

2016.● After thursday's announcement it wiped 9% off the competitions market value.

Meetup Groups

● Extreme Engineering● Web of Things

Introduction to Linux Containers

● LXC has been around for nearly 10 years● Namespaced virtual machines than run in the kernel● Isolation, container grouping, networking, process mgts, security, storage● Ephemerality● Standardisation still lacking

What is Docker (and it’s ecosystems)

● A system for managing Linux Containers○ Docker Engine

● A system for creating Linux Images○ Dockerfile

● An ecosystem for sharing and reusing Linux Images○ Docker Registry, Docker Hub

● An ecosystem for orchestrating and linking containers○ Docker Compose

● An ecosystem for running distributed containers○ Docker Swarm + Docker Compose (Kubernetes, Rancher, ECS, Bluemix)

Some key use cases

● Localised end to end testing ● End to end testing during continuous integration● Emulators for tricky 3rd party services● Technology agnostic substitute for the test harnesses● Building and deploying software distributions● Building and deploying end to end, HA, SaaS products

Testing

● Integrates with existing build tools● Use docker for difficult to test or remote 3rd party services

○ E.g Amazon S3, Tibco, Oracle etc

● Reduces the amount of time building test harnesses● End to end testing locally, against real services● Agnostic images means better reuse across technology stacks (e.g Ruby, Java,

Python)● Still versionable

As a software distribution

● Applications can be distributed as images with OS level dependencies included● Enabling more portable software● 12 Factor App - Configuration can be part of the environment● Again Versionable● Pushed and pulled to a repository e.g Docker Registry, Docker Hub, Bintray etc. etc

Docker in production

● Docker compose○ Orchestration, hostnames and dns, scaling on Swarm○ Gradle, Grunt, Rake, docker-compose.yml, Bash, Docker Swarm

● Kubernetes○ Orchestration, service discovery (pretty poor), replication controllers and load balancing (not DNS),

health checks and monitoring, deployments○ Gradle, Kubernetes.yml, Bash/Ansible GCE

● Ansible○ Playbooks, ECS

● Chef, Puppet ● Deployment and delivery pipelines, blue/green, red/black, canary, immutable

Gotchas

● Docker is still a rapidly evolving ecosystem. Lots of version compatibility issues.● Versioning is very relaxed. Can lead to Snapshot abuse and untested dependencies

ending up in production.● Better resource utilisation than Hypervisors, but still needs to be managed● Volumes and persistence● Large images - look to optimised distributions