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.
Heroku Docker
@kon_yu






Docker
Docker
Docker
Docker
( )
Heroku Docker
Docker
• Docker
• Docker 2013
• ) http://www.atmarkit.co.jp/ait/articles/
1701/30/news037.html
Heroku Docker
Docker Heroku
Container Registry and Runtime
(https://devcenter.heroku.com/articles/container-
registry-and-...
Docker Hub
• Dockerhub
• Docker
• /
•
• Dockerhub
• DockerImage DockerHub http://qiita.com/
kon_yu/items/7c40f4dfbd1cce006...
Buildpack
• Heroku
• (Ruby Node
• Buildpack Heroku
• Buildpack
• Buildpack API https://devcenter.heroku.com/articles/build...
Docker Buildpack
Docker
• Ruby on Rails
• Production Staging
• Production Heroku Postgres Staging
• DB
• AWS S3 Puroduction Staging
• Elast...
Docker
HerokuCLI PostgreSQL
• HerokuCLI Ruby
• HerokuCLI
AWS CLI S3
• AWS CLI Python
• AWS CLI
Docker
Github
https://github.com/konyu/heroku-aws-backup
Docker hub
https://hub.docker.com/r/konyu/heroku-aws-
backup/
AWS Heroku API
AWS Heroku API
URL
AWS access key and secret key
http://docs.aws.amazon.com/AWSSimpleQueueService/latest/
S...
git@github.com:konyu/heroku-aws-backup.git
cd heroku-aws-backup
docker build --rm -t heroku-aws-backup .
--env AWS Heroku
docker run -it --rm --env AWS_ACCESS_KEY_ID=xxxxxxx 
--env AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxx 
--...
echo "== worker =="
heroku ps:scale worker=0 -a APP_NAME
echo "== DB =="
heroku pg:copy ProductionAPP::HEROKU_POSTGRESQL_C...
Heroku
Heroku cli
Heroku CLI URL OS
https://devcenter.heroku.com/articles/heroku-command-line
Heroku container registry
he...
Heroku
Heroku
heroku login
> enter your id and password
Create application( )
> heroku create APP_NAME_YOU_WANT
Modify app...
Heroku
heroku config:set AWS_ACCESS_KEY_ID=xxxxxxx
AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxx AWS_DEFAULT_REGION=ap-
northeast-1...
• Docker Heroku
•
•
• Heroku
• Heroku Buildpack
Heroku
• Docker
Heroku
Heroku Dockerの使い所
Upcoming SlideShare
Loading in …5
×

Heroku Dockerの使い所

1,846 views

Published on

Docker

Published in: Software
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE FORMAT ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

Heroku Dockerの使い所

  1. 1. Heroku Docker @kon_yu
  2. 2. 
 
 

  3. 3. Docker
  4. 4. Docker
  5. 5. Docker
  6. 6. Docker ( )
  7. 7. Heroku Docker
  8. 8. Docker • Docker • Docker 2013 • ) http://www.atmarkit.co.jp/ait/articles/ 1701/30/news037.html
  9. 9. Heroku Docker Docker Heroku Container Registry and Runtime (https://devcenter.heroku.com/articles/container- registry-and-runtime)
  10. 10. Docker Hub • Dockerhub • Docker • / • • Dockerhub • DockerImage DockerHub http://qiita.com/ kon_yu/items/7c40f4dfbd1cce006ce7
  11. 11. Buildpack • Heroku • (Ruby Node • Buildpack Heroku • Buildpack • Buildpack API https://devcenter.heroku.com/articles/buildpack- api • Buildpack • Using Multiple Buildpacks for an apphttps:// devcenter.heroku.com/articles/using-multiple-buildpacks-for- an-app
  12. 12. Docker Buildpack
  13. 13. Docker • Ruby on Rails • Production Staging • Production Heroku Postgres Staging • DB • AWS S3 Puroduction Staging • Elasticsearch
  14. 14. Docker HerokuCLI PostgreSQL • HerokuCLI Ruby • HerokuCLI AWS CLI S3 • AWS CLI Python • AWS CLI
  15. 15. Docker Github https://github.com/konyu/heroku-aws-backup Docker hub https://hub.docker.com/r/konyu/heroku-aws- backup/
  16. 16. AWS Heroku API AWS Heroku API URL AWS access key and secret key http://docs.aws.amazon.com/AWSSimpleQueueService/latest/ SQSGettingStartedGuide/AWSCredentials.html Heroku api token https://devcenter.heroku.com/articles/authentication#api-token- storage
  17. 17. git@github.com:konyu/heroku-aws-backup.git cd heroku-aws-backup docker build --rm -t heroku-aws-backup .
  18. 18. --env AWS Heroku docker run -it --rm --env AWS_ACCESS_KEY_ID=xxxxxxx --env AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxxxxxxxx --env AWS_DEFAULT_REGION=ap-northeast-1 --env HEROKU_API_KEY=xxxxxxxxxxxxx heroku-aws-backup bash
  19. 19. echo "== worker ==" heroku ps:scale worker=0 -a APP_NAME echo "== DB ==" heroku pg:copy ProductionAPP::HEROKU_POSTGRESQL_COLOR_URL HEROKU_POSTGRESQL_COLOR_URL --confirm APP_NAME -a APP_NAME echo "== Rails job ==" heroku run rake jobs:clear -a APP_NAME echo "== ==" heroku run rake sync:mask_user_info -a APP_NAME echo "== elasticsearch ==" heroku run rake sync:backup_elasticsearch -a APP_NAME echo "== s3 ==" aws s3 sync --delete --acl public-read s3:/FROM_BUCKET s3://TO_BUCKET echo "== Worker ==" heroku ps:scale worker=1 -a APP_NAME
  20. 20. Heroku Heroku cli Heroku CLI URL OS https://devcenter.heroku.com/articles/heroku-command-line Heroku container registry heroku plugins:install heroku-container-registry
  21. 21. Heroku Heroku heroku login > enter your id and password Create application( ) > heroku create APP_NAME_YOU_WANT Modify application( ) > git remote heroku heroku git:remote -a APP_NAME_YOU_WANT Heroku > heroku container:push web
  22. 22. Heroku heroku config:set AWS_ACCESS_KEY_ID=xxxxxxx AWS_SECRET_ACCESS_KEY=xxxxxxxxxxxxxx AWS_DEFAULT_REGION=ap- northeast-1 HEROKU_API_KEY=xxxxx -app APP_NAME_YOU_WANT Scheduler heroku addons:create scheduler:standard -app APP_NAME_YOU_WANT Scheduler heroku run bash -a APP_NAME
  23. 23. • Docker Heroku • • • Heroku • Heroku Buildpack Heroku • Docker Heroku

×