devops mashup: special champion edition - madrid devops 2016
TRANSCRIPT
![Page 1: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/1.jpg)
![Page 2: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/2.jpg)
Ignacio Sánchez Ginés@drhelius
Ramón Román Nissen@rromannissen
![Page 3: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/3.jpg)
GRACIAS
![Page 4: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/4.jpg)
![Page 5: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/5.jpg)
![Page 6: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/6.jpg)
![Page 7: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/7.jpg)
m4.2xlarge
m4.large (x2)
m4.large
t2.micro
![Page 8: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/8.jpg)
![Page 9: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/9.jpg)
Nodo 1
Registry
···
Nodo 4
Master
![Page 10: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/10.jpg)
![Page 11: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/11.jpg)
¿Qué es DevOps?, dices mientras clavasen mi pupila tu pupila azul.
¿Qué es DevOps? ¿Y tú me lo preguntas?
DevOps... eres tú.
Gustavo Adolfo Bécquer - Sysadmin
![Page 12: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/12.jpg)
![Page 13: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/13.jpg)
@petecheslock
![Page 14: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/14.jpg)
![Page 15: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/15.jpg)
![Page 16: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/16.jpg)
VAYAMOS
POR PARTES
![Page 17: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/17.jpg)
![Page 18: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/18.jpg)
![Page 19: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/19.jpg)
Herbert Von Karajan
![Page 20: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/20.jpg)
![Page 21: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/21.jpg)
![Page 22: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/22.jpg)
![Page 23: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/23.jpg)
Teletraan
https://github.com/pinterest/
![Page 24: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/24.jpg)
https://github.com/pinterest/
![Page 25: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/25.jpg)
![Page 26: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/26.jpg)
![Page 27: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/27.jpg)
EntryPoint
IndexerServiceBuilder
ImageBuilder
Deployer Notifier
Indexer Deployer
![Page 28: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/28.jpg)
![Page 29: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/29.jpg)
EntryPoint
IndexerServiceBuilder
ImageBuilder
Deployer Notifier
Indexer Deployer
![Page 30: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/30.jpg)
DEVELOPMENT KIT
ID servicio
Hostname
Path .CSV
Tokenización
![Page 31: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/31.jpg)
![Page 32: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/32.jpg)
![Page 33: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/33.jpg)
SERVER
bootstrap
ssh / scp
DEVELOPMENT KIT
![Page 34: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/34.jpg)
SERVER
bootstrap
ssh / scp
Registro
nodo
DEVELOPMENT KIT
![Page 35: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/35.jpg)
DEVELOPMENT KIT
runlist
SERVER
![Page 36: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/36.jpg)
![Page 37: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/37.jpg)
input {
file {
type => "catalogue"
path => '<%= node['codemotion-
logstash-loader']['input_path'] %>'
start_position => 'beginning'
sincedb_path => "/dev/null"
}
}
![Page 38: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/38.jpg)
filter {
csv {
columns => ["data"]
separator => ";"
}
}
![Page 39: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/39.jpg)
output {
elasticsearch {
host => "<%= node['codemotion-logstash-
loader']['es_host'] %>"
protocol => "http"
port => "<%= node['codemotion-logstash-
loader']['es_port'] %>"
index => "<%= node['codemotion-logstash-
loader']['es_index'] %>"
template => "/tmp/logstashloader/csv-
logstash.json"
template_name => "csv-logstash"
template_overwrite => true
flush_size => 100
}
}
![Page 40: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/40.jpg)
{
"template" : "csv-logstash",
"settings" : { "index.refresh_interval" : "15s" },
"mappings" : {
"catalogue" : {
"_all" : { "enabled" : false },
"dynamic_templates" : [{
"string_fields" : {
"match" : "*",
"match_mapping_type" : "string",
"mapping" : { "type" : "string", "index" :
"not_analyzed" }
}
}],
"properties" : {
"data":{
"type" : "string",
"analyzer": "<%= node['codemotion-logstash-
loader']['analyzer'] %>"
}
}
}
}
}
![Page 41: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/41.jpg)
![Page 42: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/42.jpg)
EntryPoint
IndexerServiceBuilder
ImageBuilder
Deployer Notifier
Indexer Deployer
![Page 43: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/43.jpg)
![Page 44: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/44.jpg)
![Page 45: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/45.jpg)
FeignJava API
![Page 46: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/46.jpg)
![Page 47: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/47.jpg)
![Page 48: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/48.jpg)
Service Builder
Aplicar Arquetipo
Construir Proyecto
Desplegar Artefacto
![Page 49: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/49.jpg)
![Page 50: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/50.jpg)
EntryPoint
IndexerServiceBuilder
ImageBuilder
Deployer Notifier
Indexer Deployer
![Page 51: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/51.jpg)
Image Builder
Parametrizar Dockerfile
Build Dockerfile
Push Docker Image
Jenkins Slave
![Page 52: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/52.jpg)
![Page 53: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/53.jpg)
FROM java:8
ARG SERVICE_ID
VOLUME /tmp
EXPOSE 8080
ADD
http://a1.codemotion.atsistemas.com/repository/mave
n-releases/com/atsistemas/codemotion/indexed-
service-generated-${SERVICE_ID}/1.0/indexed-
service-generated-${SERVICE_ID}-1.0.jar /indexed-
service.jar
ENV SERVICE_ID=${SERVICE_ID}
RUN bash -c 'touch /indexed-service.jar'
CMD java –Xmx32m –Xss256k -
Djava.security.egd=file:/dev/./urandom
-jar /indexed-service.jar
![Page 54: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/54.jpg)
![Page 55: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/55.jpg)
EntryPoint
IndexerServiceBuilder
ImageBuilder
Deployer Notifier
Indexer Deployer
![Page 56: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/56.jpg)
Deployer
Pull Docker Image
Run Docker Image
Reconfiguración NGINX
![Page 57: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/57.jpg)
upstream indexed-service-xxxxxx {
least_conn;
{{range service "indexed-service-xxxxxx"}}server
{{.Address}}:{{.Port}} max_fails=3 fail_timeout=60 weight=1;
{{else}}server 127.0.0.1:65535; # force a 502{{end}}
}
server {
listen 80 default_server;
location /xxxxxx/ {
proxy_pass http://indexed-service-xxxxxx/;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
![Page 58: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/58.jpg)
docker -H :2375 pull 10.0.0.223:9022/ indexed-service-
xxxxxx
docker -H :2375 run -d -P –e reschedule:on-node-failure
10.0.0.223:9022/indexed-service-xxxxxx
![Page 59: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/59.jpg)
Now witness the
firepower of this fully
ARMED and
OPERATIONAL Battle
Station!
The Emperor – Project Manager
![Page 60: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/60.jpg)
![Page 61: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/61.jpg)
Servicio:
Consulta:
![Page 62: DevOps Mashup: Special Champion Edition - Madrid DevOps 2016](https://reader030.vdocuments.site/reader030/viewer/2022021422/58a3cfb41a28ab98588b6207/html5/thumbnails/62.jpg)
¡GRACIAS!¿ALGUNA PREGUNTA?
Ignacio Sánchez Giné[email protected]@atsistemas.com
Ramón Román Nissen@[email protected]