Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Docker ApplicationをDaaSにデプロイ #dockerjp
Search
taichi nakashima
April 11, 2014
Technology
11
6.5k
Docker ApplicationをDaaSにデプロイ #dockerjp
at Docker meetup Tokyo #2
taichi nakashima
April 11, 2014
Tweet
Share
More Decks by taichi nakashima
See All by taichi nakashima
Platform Engineering at Mercari (Platform Engineering Kaigi 2024)
tcnksm
5
3.6k
Platform Engineering at Mercari
tcnksm
8
4.8k
Embedded SRE at Mercari
tcnksm
0
1.4k
How We Harden Platform Security at Mercari
tcnksm
2
1.7k
SRE Practices in Mercari Microservices
tcnksm
11
12k
開発者向けの基盤をつくる
tcnksm
38
12k
How We Structure Our Work At Mercari Microservices Platform Team
tcnksm
11
23k
Microservices Platform on Kubernetes at Mercari
tcnksm
16
16k
Introduction to Mercari Micorservices Platform Team
tcnksm
5
3.5k
Other Decks in Technology
See All in Technology
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
watsonx.ai Dojo #5 ファインチューニングとInstructLAB
oniak3ibm
PRO
0
160
Wvlet: A New Flow-Style Query Language For Functional Data Modeling and Interactive Data Analysis - Trino Summit 2024
xerial
1
120
Fanstaの1年を大解剖! 一人SREはどこまでできるのか!?
syossan27
2
170
祝!Iceberg祭開幕!re:Invent 2024データレイク関連アップデート10分総ざらい
kniino
3
280
OpenAIの蒸留機能(Model Distillation)を使用して運用中のLLMのコストを削減する取り組み
pharma_x_tech
4
560
Snowflake女子会#3 Snowpipeの良さを5分で語るよ
lana2548
0
230
WACATE2024冬セッション資料(ユーザビリティ)
scarletplover
0
200
私なりのAIのご紹介 [2024年版]
qt_luigi
1
120
サイバー攻撃を想定したセキュリティガイドライン 策定とASM及びCNAPPの活用方法
syoshie
3
1.3k
第3回Snowflake女子会_LT登壇資料(合成データ)_Taro_CCCMK
tarotaro0129
0
190
Qiita埋め込み用スライド
naoki_0531
0
5.1k
Featured
See All Featured
Dealing with People You Can't Stand - Big Design 2015
cassininazir
365
25k
Bash Introduction
62gerente
608
210k
YesSQL, Process and Tooling at Scale
rocio
169
14k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Gamification - CAS2011
davidbonilla
80
5.1k
A designer walks into a library…
pauljervisheath
204
24k
Optimising Largest Contentful Paint
csswizardry
33
3k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
132
33k
Building Applications with DynamoDB
mza
91
6.1k
A better future with KSS
kneath
238
17k
Code Review Best Practice
trishagee
65
17k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
Transcript
Deploying Docker Application to DaaS by @deeeet
Taichi Nakashima @deeeet ! • http://deeeet.com/writing (SOTA) • tcnksm/rbdock •
Docker ދͷר, Serf ދͷר
Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service (DaaS)
ʹσϓϩΠ͢Δ
DaaS Docker as a Service Docker ϗεςΟϯάαʔϏε https://orchardup.com/ https://orchardup.com/
DaaS Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service
(DaaS) ʹσϓϩΠ͢Δ https://orchardup.com/ DaaS https://orchardup.com/ https://orchardup.com/
DaaS Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service
(DaaS) ʹσϓϩΠ͢Δ https://orchardup.com/ DaaS https://stackdock.com/
DaaS Rails Application Λ Docker ίϯςφʹͷͤͯ Docker as a Service
(DaaS) ʹσϓϩΠ͢Δ https://orchardup.com/ DaaS http://www.tutum.co/
Orchard • ؆୯ͳίϚϯυϥΠϯϥούʔΛ௨ͯ͡ ϩʔΧϧ͔Βಉ͡ίϚϯυୟ͚ͩ͘Ͱ͑Δ • 1࣌ؒ1ԁ/1݄1000ԁఔͰ͑Δ (512MB RAM/20GB SSD) •
Fig (ίϯςφؒͷ࿈ܞΛࢧԉ͢Δπʔϧ)ͷ ։ൃΛ͍ͯ͠Δ
Environment • OSX • boot2docker • mkwiatkowski/todo-rails4-angularjs (Rails) worked with
ruby2.0.0p-247, postgresql (DB)
Overview Postgresql Container Rails Container :3000 5432:5432
Dockerfile (Rails) $ gem install rbdock $ rbdock 2.0.0-p247 --app
todo-rails4-angularjs https://github.com/tcnksm/rbdock
development: adapter: postgresql template: template0 encoding: unicode database: todo_rails4_angularjs_development pool:
5 username: docker password: docker host: <%= ENV.fetch('DB_PORT_5432_TCP_ADDR') %> port: <%= ENV.fetch('DB_PORT_5432_TCP_PORT') %> http://deeeet.com/writing/2014/03/20/docker-link-container/ config/database.yml
Development at local
$ docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker \
-e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Postgresql Container
$ docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker \
-e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Rails Container $ docker run -i t —p 3000:3000 \ -link pg:db \ tcnksm/rails \ 'rake db:create && rake db:migrate && rails server'
http://localhost:3000
Development at local • มߋ͕ೖͬͨΒ build && run (+Guard) •
VolumesػೳΛ͑ϦΞϧλΠϜߋ৽ (+ ONBUILD)
Docker Share (ngrok) $ orchard hosts create Orchard username: tcnksm
Password: Default host running at 162.243.106.93 $ ngrok 3000 http://36a98c94.ngrok.com -> 127.0.0.1:3000
http://36a98c94.ngrok.com
Deploy to Orchard
Login to Orchard $ orchard hosts create Orchard username: tcnksm
Password: Default host running at 162.243.106.93
$ orchard docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker
\ -e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Postgresql Container
$ docker run -d -p 5432:5432 \ -e POSTGRESQL_USER=docker \
-e POSTGRESQL_PASS=docker \ -name pg \ orchardup/postgresql Rails Container $ orchard docker run -i t —p 80:3000 \ -link pg:db \ tcnksm/rails \ 'rake db:create && rake db:migrate && rails server'
http://162.243.106.93
Conclusion • DaaSʹRails ApplicationΛDeploy • Orchard ͱͯγϯϓϧ -> ϩʔΧϧ͔Βಉ͡ίϚϯυΛୟ͚ͩ͘
Future • HerokuʹpushͱൺͯԿ͕ྑ͍ͷ? -> DockerͰΔརͷٻʢ͖উखͰ͖Δ+αʣ • ίϯςφ্ཱͪ͛ͨޙ? -> ࣮ࡍͷӡ༻
Thanks