Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Building a Docker-ized Microservice
In Node, Using Ansible
Irakli'Nadareishvili,'
Director'of'Strategy,'API'Academy
@inada...
2 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Containers
Microservices
DevOps Automation
Being a Developer Has Never Been Mo...
3 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Microservices: The Next Big Thing…
4 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
What are Microservices?
5 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Martin Fowler:
6 http://martinfowler.com/articles/microservices.html
“We#canno...
6 ©#2015#CA.#ALL#RIGHTS#RESERVED.
EVOLUTIONARY3DESIGN
Characteristicsof a Microservice Architectureper Fowler:
COMPONENTIZ...
7 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
In Essence:
Microservice)Architectural)Style)is)an)architectural)style)
where)...
8 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Key Benefits of Microservices
Technology#Heterogeneity
Partitioned#Scalability...
9 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
We Know It Is Popular:
10 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
MicroserviceArchitecture
iscomplex
Uncomfortable truth:
11 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Monolith is brittle, but has order
12 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Microservices:High Degree of Freedom
13 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
A Lot Of Things That Can Go Wrong
Gilt.com says)they)have)~450,microservices....
14 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
How do we afford somany servers?
15 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Microservices Deployment Topology
Tanker1
1
2
34
Tanker2
1
2
33
Tanker3
1
23
...
16 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
MicroservicesAre NotFreeLunch
17 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Microservices Deployment Topology
Tanker1
1
2
34
Tanker2
1
2
33
Tanker3
1
23
...
18 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
How Do We Know Where Everything Is?
1. Hashicorp Consul – multiGdataGcenter!
...
19 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
Microservice Discovery Topology
Tanker1
1
2
34
Tanker2
1
2
33
Tanker3
1
23
4
...
20 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
For#the#sake#of#this#demo#we#use#Docker NginxProxy#– lifesaver#for#
local#(de...
21 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
github.com/apiacademy/ansible-consul-demo
22 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
github.com/apiacademy/ansible-consul-demo
23 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
github.com/apiacademy/ansible-consul-demo
24 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei
github.com/apiacademy/ansible-consul-demo
DEMO TIME
Director#of#Strategy,#API#Academy
Irakli3Nadareishvili
@inadarei
@apiacademy
@cainc
Upcoming SlideShare
Loading in …5
×

AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleFest NY 2015

7,816 views

Published on

It has become next to impossible to be a web developer in 2015 and not get exposed to hearing hot buzzwords such as: Operations automation, Ansible, Microservices, Containers/Docker, Node, APIs etc. Truth be told, there's nothing to complain about: these are awesome new technologies taking productivity and fun of building distributed applications to a whole new level… Until you have to actually build one using all these moving parts. Getting oriented in the jungle of the new technologies could be seriously daunting.

Using Ansible can make things much easier, however.

Using Ansible, we built a fully functioning microservice from 0 to working http output in 30 minutes, on-stage and explained how various parts come together, what role they all play in the ecosystem.

Published in: Internet
  • Be the first to comment

AnsibleBuilding a Docker-ized Microservice In Node, Using Ansible - AnsibleFest NY 2015

  1. 1. Building a Docker-ized Microservice In Node, Using Ansible Irakli'Nadareishvili,' Director'of'Strategy,'API'Academy @inadarei
  2. 2. 2 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Containers Microservices DevOps Automation Being a Developer Has Never Been More Fun!
  3. 3. 3 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Microservices: The Next Big Thing…
  4. 4. 4 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei What are Microservices?
  5. 5. 5 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Martin Fowler: 6 http://martinfowler.com/articles/microservices.html “We#cannot#say#there#is#a#formal# definition#of#the#microservices architectural#style,#but#we#can# attempt#to#describe#what#we#see# as#common#characteristics#for# architectures#that#fit#the#label.#
  6. 6. 6 ©#2015#CA.#ALL#RIGHTS#RESERVED. EVOLUTIONARY3DESIGN Characteristicsof a Microservice Architectureper Fowler: COMPONENTIZATION3VIA3SERVICES ORGANIZED3AROUND3BUSINESS3CAPABILITIES PRODUCTS,3NOT33PROJECTS SMART3ENDPOINTS3AND3DUMB3PIPES DECENTRALIZED3GOVERNANCE3&3DATA3MANAGEMENT 1 2 3 4 5 INFRASTRUCTURE3AUTOMATION/DESIGN3FOR3FAILURE6 7
  7. 7. 7 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei In Essence: Microservice)Architectural)Style)is)an)architectural)style) where)a)complex)system)decomposed)into)a)collection) of)services)that)are: 1. Autonomous)and)independently)deployable 2. Small)and)easily)replaceable. 3. And)each)service)delivers)a)distinct)capability)of)the) system. Single ResponsibilityPrinciple meets API-First Design
  8. 8. 8 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Key Benefits of Microservices Technology#Heterogeneity Partitioned#Scalability#(per#microservice) Independent#Deployments Compose6ability Optimized#for#Replace6ability 1 2 3 4 5
  9. 9. 9 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei We Know It Is Popular:
  10. 10. 10 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei MicroserviceArchitecture iscomplex Uncomfortable truth:
  11. 11. 11 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Monolith is brittle, but has order
  12. 12. 12 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Microservices:High Degree of Freedom
  13. 13. 13 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei A Lot Of Things That Can Go Wrong Gilt.com says)they)have)~450,microservices.) Netflix is)also)in)several,hundred.)That's)a)very) high)degree)of)freedom)– many,)many)moving) parts.
  14. 14. 14 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei How do we afford somany servers?
  15. 15. 15 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Microservices Deployment Topology Tanker1 1 2 34 Tanker2 1 2 33 Tanker3 1 23 4 Tanker4 1 34
  16. 16. 16 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei MicroservicesAre NotFreeLunch
  17. 17. 17 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Microservices Deployment Topology Tanker1 1 2 34 Tanker2 1 2 33 Tanker3 1 23 4 Tanker4 1 34
  18. 18. 18 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei How Do We Know Where Everything Is? 1. Hashicorp Consul – multiGdataGcenter! (Vagrant))G https://www.consul.io/ 2. CoreOS')etcd https://github.com/coreos/etcd 3. Kubernetes by)Google http://kubernetes.io/ 4. Mesos DNS) https://github.com/mesosphere/mesosGdns 5. Apache)Zookeeper https://zookeeper.apache.org/
  19. 19. 19 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei Microservice Discovery Topology Tanker1 1 2 34 Tanker2 1 2 33 Tanker3 1 23 4 Tanker4 1 34 Consul3Server3Cluster ms1.service.consul
  20. 20. 20 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei For#the#sake#of#this#demo#we#use#Docker NginxProxy#– lifesaver#for# local#(dev)#setups.#But#in#production,#we#would#use#separate#Nginx cluster#and#Consul#Template Our Deployment Plan Consul#Server#Cluster#(3#servers) Consul#Clients#(2#servers#w/#Consul#Template) DNSMasq on#Consul#Servers Provision#Docker Hosts#(Tankers) Install#Node.js Microservice#from#docker.io 1 2 3 4 5 http://nodebootstrap.io
  21. 21. 21 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei github.com/apiacademy/ansible-consul-demo
  22. 22. 22 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei github.com/apiacademy/ansible-consul-demo
  23. 23. 23 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei github.com/apiacademy/ansible-consul-demo
  24. 24. 24 ©#2015#CA.#ALL#RIGHTS#RESERVED. @inadarei github.com/apiacademy/ansible-consul-demo DEMO TIME
  25. 25. Director#of#Strategy,#API#Academy Irakli3Nadareishvili @inadarei @apiacademy @cainc

×