Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Ruby App on Netflix Microservices Stack

Ruby App on Netflix Microservices Stack

At Tokyu RubyKaigi 09 #tqrk09

Naoto Takai

August 29, 2015
Tweet

More Decks by Naoto Takai

Other Decks in Programming

Transcript

  1. docker-machine ls NAME ACTIVE DRIVER STATE URL default * virtualbox

    Running tcp://192.168.99.100:23 docker inspect -f '{{range $p, $conf := .NetworkSettings.Ports} {{(index $conf 0).HostPort}} {{end}}' zuul_messenger 8080/tcp -> 8000 curl http://192.168.99.100:8000 {"message":"Minnano Wedding is hiring."}
  2. ϦΫΤετ ΫϥΠΞϯτ ΞϓϦέʔγϣϯ "1*(BUFXBZ αʔϏε ϨδετϦ Ϩεϙϯε ొ࿥ ϦΫΤετ Ұཡ

    Ϩεϙϯε ΞϓϦέʔγϣϯ ίϯςφαʔϏε ΞϓϦέʔγϣϯ ίϯςφαʔϏε ϩʔυόϥϯγϯάʴ ଱ϨΠςϯγɾ଱ো֐ϨΠϠʔ
  3. ;VVM 3JCCPO )ZTUSJY &VSFLB ,BSZPO 1SBOB ϦΫΤετ ΫϥΠΞϯτ ΞϓϦέʔγϣϯ "1*(BUFXBZ

    αʔϏε ϨδετϦ Ϩεϙϯε ొ࿥ ϦΫΤετ Ұཡ Ϩεϙϯε ΞϓϦέʔγϣϯ ίϯςφαʔϏε ΞϓϦέʔγϣϯ ίϯςφαʔϏε ϩʔυόϥϯγϯάʴ ଱ϨΠςϯγɾ଱ো֐ϨΠϠʔ
  4. require 'sinatra' require 'sinatra/json' get '/' do json(message: 'Minnano Wedding

    is hiring.') end get '/status' do json(status: 'OK') end
  5. cat Procfile app: rackup -E production --host 0.0.0.0 plana: prana/bin/Prana

    -c config.properties cat config.properties prana.host.healthcheck.url=http://localhost:9292/status prana.host.healthcheck.timeout=1500 prana.proxy.req.acceptencoding=gzip eureka.name=MESSENGER eureka.vipAddress=MESSENGER eureka.port=9292 eureka.serviceUrl.default=http://eureka:8080/eureka/v2/ eureka.validateInstanceId=false
  6. docker run -d --name exhibitor netflixoss/exhibitor:1.5.2 docker run -d --name

    eureka -d netflixoss/eureka:1.1.142 docker run -d --name messenger --link eureka:eureka \
 takai/messenger bundle exec foreman start docker run -e "origin.zuul.client.DeploymentContextBasedVipAddr -d --name zuul_messenger \
 --link eureka:eureka netflixoss/zuul:1.0.28