SlideShare une entreprise Scribd logo
1  sur  31
Télécharger pour lire hors ligne
DOKKU
Agenda
● Dokku;
● Deploy Rails App to Linode with Dokku;
How to deploy Rails App?
Call DevOps ?
Jenkins ?
MAGIC+
NO?
DO + capistrano
Instruction
Heroku?
heroku create
git push heroku master
DOKKU
Dokku is a mini-Heroku powered by Docker written in less than 100 (180) lines of
Bash.
Once it's set up on a host, you can push Heroku-compatible applications to it via
Git. They'll build using Heroku buildpacks and then run in isolated containers.
The end result is your own, single-host version of Heroku.
Compatible application
DOKKU
• Docker - solves containers;
• Buildpacks - solves runtime;
• Gitreceive - solves code push;
• Nginx - solves http;
Docker *
Docker containers wrap a piece of software in a complete filesystem that contains
everything needed to run: code, runtime, system tools, system libraries – anything that
can be installed on a server. This guarantees that the software will always run the
same, regardless of its environment.
* Docker: basic usage by Oleksiy Dovzhanytsya
Buildpacks/Buildestep
Buildstep uses Heroku's open source buildpacks and is responsible for building the
base images that applications are built on. You can think of it as producing the "stack"
for Dokku, to borrow a concept from Heroku.
Buildpacks are responsible for transforming deployed code into a slug, which can then
be executed on a dyno. Buildpacks are composed of a set of scripts, and depending
on the programming language, the scripts will retrieve dependencies, output
generated assets or compiled code, and more. This output is assembled into a slug by
the slug compiler.
Gitreceive
Gitreceive is a project that provides you with a git user that you can push repositories
to. It also triggers a script to handle that push. This provides the push mechanism that
you might be familiar with from Heroku.
Creates an ssh+git user that accepts on the fly repository pushes and triggers a hook
script. Push code anywhere. Extend your Git workflow.
Nginx
nginx [engine x] — это HTTP-сервер и обратный прокси-сервер, почтовый прокси-сервер, а
также TCP/UDP прокси-сервер общего назначения, изначально написанный Игорем Сысоевым.
Уже длительное время он обслуживает серверы многих высоконагруженных российских сайтов,
таких как Яндекс, Mail.Ru, ВКонтакте и Рамблер. Согласно статистике Netcraft nginx обслуживал
или проксировал 27.83% самых нагруженных сайтов в ноябре 2016 года. Вот некоторые
примеры успешного внедрения nginx (тексты на английском языке): Netflix, Wordpress.com,
FastMail.FM.
Исходные тексты и документация распространяются под BSD-подобной лицензией из 2 пунктов.
Коммерческая поддержка осуществляется компанией Nginx, Inc.
Dokku plugins*
Dokku itself is built out of plugins
and uses plugn for its plugin system.
In essence a plugin is a collection of
scripts that will be run based on
naming convention.
* http://dokku.viewdocs.io/dokku/community/plugins/
Demo time?
Demo
Demo: Linode
Check: http://dokku.viewdocs.io/dokku/getting-started/install/linode/
Demo: Linode
ssh root@ip_address
wget https://raw.githubusercontent.com/dokku/dokku/v0.7.2/bootstrap.sh
DOKKU_TAG=v0.7.2 bash bootstrap.sh
Demo: Linode
Demo: Linode
Procfile: A file called "Procfile" is required to be in the root application directory. The
purpose of this file is to specify how the application should be run once deployed.
Same as on Heroku: https://devcenter.heroku.com/articles/getting-started-with-rails4
git remote add dokku dokku@ip_addres:app_name
git push dokku master
Demo: Linode
Problem #1
Custom buildpacks *
* http://dokku.viewdocs.io/dokku/deployment/methods/buildpacks/#specifying-a-custom-buildpack
dokku config:set app_name BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v148
Problem #1
Problem #1
Problem #1
dokku config:set --global CURL_TIMEOUT=600
dokku config:set --global CURL_CONNECT_TIMEOUT=30
http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/
Database
dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres
dokku postgres:create db_name
dokku postgres:link db_name app_name
https://github.com/dokku/dokku-postgres
Problem #2
https://github.com/dokku/dokku-postgres/issues/79
cd /home/dokku/app_name
chown dokku: DOCKER_OPTIONS_DEPLOY
Migration and Config Vars
dokku run app_name rake db:migrate
dokku config:set finance PASSWORD='password'
It works!
Results
● Same as heroku;
● Easy and fast deploy;
● Community;
● Excellent documentation;
● Flexibility;
● How it works with huge project?
Links
● https://github.com/dokku/dokku
● http://dokku.viewdocs.io/dokku/
● https://github.com/dokku/dokku-postgres
● https://rominirani.com/docker-tutorial-series-part-8-linking-containers-69a4e5bf50fb
#.9bvn2fbx8
● https://www.linode.com
● http://blog.flatironschool.com/using-digital-ocean-and-dokku-for-easier-rails-app-de
ploys/
● https://devcenter.heroku.com/articles/config-vars

Contenu connexe

Tendances

kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
Munish Mehta
 

Tendances (20)

Docker for mere mortals
Docker for mere mortalsDocker for mere mortals
Docker for mere mortals
 
Developer workflow with docker
Developer workflow with dockerDeveloper workflow with docker
Developer workflow with docker
 
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TXLinuxKit and Moby, news from DockerCon 2017 - Austin,TX
LinuxKit and Moby, news from DockerCon 2017 - Austin,TX
 
Docker compose
Docker composeDocker compose
Docker compose
 
RKT
RKTRKT
RKT
 
Running Docker on ARM
Running Docker on ARMRunning Docker on ARM
Running Docker on ARM
 
kubernetes - minikube - getting started
kubernetes - minikube - getting startedkubernetes - minikube - getting started
kubernetes - minikube - getting started
 
Docker session IV: Docker Compose and Docker Swarm
Docker session IV: Docker Compose and Docker SwarmDocker session IV: Docker Compose and Docker Swarm
Docker session IV: Docker Compose and Docker Swarm
 
手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇手把手帶你學 Docker 入門篇
手把手帶你學 Docker 入門篇
 
Docker & GitLab
Docker & GitLabDocker & GitLab
Docker & GitLab
 
dkr_django_slides
dkr_django_slidesdkr_django_slides
dkr_django_slides
 
Introduction to Project atomic (CentOS Dojo Bangalore)
Introduction to Project atomic (CentOS Dojo Bangalore)Introduction to Project atomic (CentOS Dojo Bangalore)
Introduction to Project atomic (CentOS Dojo Bangalore)
 
Docker 進階實務班
Docker 進階實務班Docker 進階實務班
Docker 進階實務班
 
HP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and AnsibleHP Advanced Technology Group: Docker and Ansible
HP Advanced Technology Group: Docker and Ansible
 
Fedora Atomic Host
Fedora Atomic HostFedora Atomic Host
Fedora Atomic Host
 
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
當專案漸趕,當遷移也不再那麼難 (Ship Your Projects with Docker EcoSystem)
 
CI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOWCI-CD WITH GITLAB WORKFLOW
CI-CD WITH GITLAB WORKFLOW
 
Docker linuxday 2015
Docker linuxday 2015Docker linuxday 2015
Docker linuxday 2015
 
Using Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous DeliveryUsing Containers for Continuous Integration and Continuous Delivery
Using Containers for Continuous Integration and Continuous Delivery
 
Building Infrastructure with Containers (SJSU Talk)
Building Infrastructure with Containers (SJSU Talk)Building Infrastructure with Containers (SJSU Talk)
Building Infrastructure with Containers (SJSU Talk)
 

Similaire à Dokku

Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
Suresh Balla
 

Similaire à Dokku (20)

Accelerate your development with Docker
Accelerate your development with DockerAccelerate your development with Docker
Accelerate your development with Docker
 
Accelerate your software development with Docker
Accelerate your software development with DockerAccelerate your software development with Docker
Accelerate your software development with Docker
 
Настройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'aНастройка окружения для кросскомпиляции проектов на основе docker'a
Настройка окружения для кросскомпиляции проектов на основе docker'a
 
Powercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptxPowercoders · Docker · Fall 2021.pptx
Powercoders · Docker · Fall 2021.pptx
 
Docker module 1
Docker module 1Docker module 1
Docker module 1
 
Docker Ecosystem on Azure
Docker Ecosystem on AzureDocker Ecosystem on Azure
Docker Ecosystem on Azure
 
Tribal Nova Docker feedback
Tribal Nova Docker feedbackTribal Nova Docker feedback
Tribal Nova Docker feedback
 
Docker intro
Docker introDocker intro
Docker intro
 
Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015Import golang; struct microservice - Codemotion Rome 2015
Import golang; struct microservice - Codemotion Rome 2015
 
Docker
DockerDocker
Docker
 
Rexdockercon2017
Rexdockercon2017Rexdockercon2017
Rexdockercon2017
 
DevAssistant, Docker and You
DevAssistant, Docker and YouDevAssistant, Docker and You
DevAssistant, Docker and You
 
Docker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualizationDocker, a new LINUX container technology based light weight virtualization
Docker, a new LINUX container technology based light weight virtualization
 
Oracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with DockerOracle WebLogic Server 12c with Docker
Oracle WebLogic Server 12c with Docker
 
Docker for .NET Developers
Docker for .NET DevelopersDocker for .NET Developers
Docker for .NET Developers
 
Docker Internet Money Gateway
Docker Internet Money GatewayDocker Internet Money Gateway
Docker Internet Money Gateway
 
Docker img-no-disclosure
Docker img-no-disclosureDocker img-no-disclosure
Docker img-no-disclosure
 
Docker navjot kaur
Docker navjot kaurDocker navjot kaur
Docker navjot kaur
 
Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017Moby Open Source Summit North America 2017
Moby Open Source Summit North America 2017
 
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
GDG-ANDROID-ATHENS Meetup: Build in Docker with Jenkins
 

Dernier

CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 

Dernier (20)

%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verifiedSector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
Sector 18, Noida Call girls :8448380779 Model Escorts | 100% verified
 
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) SolutionIntroducing Microsoft’s new Enterprise Work Management (EWM) Solution
Introducing Microsoft’s new Enterprise Work Management (EWM) Solution
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456LEVEL 5   - SESSION 1 2023 (1).pptx - PDF 123456
LEVEL 5 - SESSION 1 2023 (1).pptx - PDF 123456
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 

Dokku

  • 2. Agenda ● Dokku; ● Deploy Rails App to Linode with Dokku;
  • 3. How to deploy Rails App?
  • 6. NO?
  • 7. DO + capistrano Instruction Heroku? heroku create git push heroku master
  • 8. DOKKU Dokku is a mini-Heroku powered by Docker written in less than 100 (180) lines of Bash. Once it's set up on a host, you can push Heroku-compatible applications to it via Git. They'll build using Heroku buildpacks and then run in isolated containers. The end result is your own, single-host version of Heroku.
  • 10. DOKKU • Docker - solves containers; • Buildpacks - solves runtime; • Gitreceive - solves code push; • Nginx - solves http;
  • 11. Docker * Docker containers wrap a piece of software in a complete filesystem that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment. * Docker: basic usage by Oleksiy Dovzhanytsya
  • 12. Buildpacks/Buildestep Buildstep uses Heroku's open source buildpacks and is responsible for building the base images that applications are built on. You can think of it as producing the "stack" for Dokku, to borrow a concept from Heroku. Buildpacks are responsible for transforming deployed code into a slug, which can then be executed on a dyno. Buildpacks are composed of a set of scripts, and depending on the programming language, the scripts will retrieve dependencies, output generated assets or compiled code, and more. This output is assembled into a slug by the slug compiler.
  • 13. Gitreceive Gitreceive is a project that provides you with a git user that you can push repositories to. It also triggers a script to handle that push. This provides the push mechanism that you might be familiar with from Heroku. Creates an ssh+git user that accepts on the fly repository pushes and triggers a hook script. Push code anywhere. Extend your Git workflow.
  • 14. Nginx nginx [engine x] — это HTTP-сервер и обратный прокси-сервер, почтовый прокси-сервер, а также TCP/UDP прокси-сервер общего назначения, изначально написанный Игорем Сысоевым. Уже длительное время он обслуживает серверы многих высоконагруженных российских сайтов, таких как Яндекс, Mail.Ru, ВКонтакте и Рамблер. Согласно статистике Netcraft nginx обслуживал или проксировал 27.83% самых нагруженных сайтов в ноябре 2016 года. Вот некоторые примеры успешного внедрения nginx (тексты на английском языке): Netflix, Wordpress.com, FastMail.FM. Исходные тексты и документация распространяются под BSD-подобной лицензией из 2 пунктов. Коммерческая поддержка осуществляется компанией Nginx, Inc.
  • 15. Dokku plugins* Dokku itself is built out of plugins and uses plugn for its plugin system. In essence a plugin is a collection of scripts that will be run based on naming convention. * http://dokku.viewdocs.io/dokku/community/plugins/
  • 17. Demo
  • 22. Procfile: A file called "Procfile" is required to be in the root application directory. The purpose of this file is to specify how the application should be run once deployed. Same as on Heroku: https://devcenter.heroku.com/articles/getting-started-with-rails4 git remote add dokku dokku@ip_addres:app_name git push dokku master Demo: Linode
  • 24. Custom buildpacks * * http://dokku.viewdocs.io/dokku/deployment/methods/buildpacks/#specifying-a-custom-buildpack dokku config:set app_name BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-ruby.git#v148 Problem #1
  • 26. Problem #1 dokku config:set --global CURL_TIMEOUT=600 dokku config:set --global CURL_CONNECT_TIMEOUT=30 http://dokku.viewdocs.io/dokku/getting-started/troubleshooting/
  • 27. Database dokku plugin:install https://github.com/dokku/dokku-postgres.git postgres dokku postgres:create db_name dokku postgres:link db_name app_name https://github.com/dokku/dokku-postgres
  • 29. Migration and Config Vars dokku run app_name rake db:migrate dokku config:set finance PASSWORD='password' It works!
  • 30. Results ● Same as heroku; ● Easy and fast deploy; ● Community; ● Excellent documentation; ● Flexibility; ● How it works with huge project?
  • 31. Links ● https://github.com/dokku/dokku ● http://dokku.viewdocs.io/dokku/ ● https://github.com/dokku/dokku-postgres ● https://rominirani.com/docker-tutorial-series-part-8-linking-containers-69a4e5bf50fb #.9bvn2fbx8 ● https://www.linode.com ● http://blog.flatironschool.com/using-digital-ocean-and-dokku-for-easier-rails-app-de ploys/ ● https://devcenter.heroku.com/articles/config-vars