SlideShare a Scribd company logo
1 of 54
Download to read offline
Хокку про Heroku
Сергей Селецкий
@sseletskyy
Европейское Агентство Высоких Технологий

http://www.foss-sea.org.ua/

2013
Что такое Paas
(Product as a Service)

Cloud сервер + Agile + масштабирование
Что такое Paas
(Product as a Service)
с финансовой точки зрения
● нет затрат на покупку серверов
● на покупку серверного ПО
● на зарплату администратора
● ежемесячная оплата услуг PaaS
GIT
SOURCE
CODE

HEROKU

$ git push heroku your_branch:master
$ heroku ps:scale web=1 worker=1

LOAD
BALANCER

HEROKU

STATELESS
INSTANCE
WEB
DYNO

PostgreSQL

STATELESS
INSTANCE
WORKER
DYNO
$ heroku ps:scale web=2 worker=2

LOAD
BALANCER

HEROKU

STATELESS
STATELESS
INSTANCE
INSTANCE
WEB
DYNO
DYNO

PostgreSQL

STATELESS
STATELESS
INSTANCE
INSTANCE
WORKER
DYNO
DYNO
$ heroku ps:scale web=3 worker=3

LOAD
BALANCER

HEROKU

STATELESS
STATELESS
INSTANCE
STATELESS
INSTANCE
INSTANCE
DYNO
WEB
DYNO
DYNO

PostgreSQL

STATELESS
STATELESS
INSTANCE
STATELESS
INSTANCE
INSTANCE
DYNO
WORKER
DYNO
DYNO
$ heroku ps:scale web=5 worker=5

LOAD
BALANCER

HEROKU

STATELESS
STATELESS
INSTANCE
STATELESS
INSTANCE
STATELESS
INSTANCE
STATELESS
INSTANCE
DYNO
INSTANCE
DYNO
DYNO
WEB
DYNO
DYNO

PostgreSQL

STATELESS
STATELESS
INSTANCE
STATELESS
INSTANCE
STATELESS
INSTANCE
STATELESS
INSTANCE
DYNO
INSTANCE
DYNO
DYNO
WORKER
DYNO
DYNO
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
==> heroku login
Enter your Heroku credentials.
Email: gustotune@gmail.com
Password (typing will be hidden):
Found the following SSH public keys:
1) id_rsa.pub
2) id_rsa_cloud.pub
Which would you like to use with your Heroku account?
2
Uploading SSH public key /Users/gustotune/.
ssh/id_rsa_cloud.pub... failed
! This key is already in use by another account. Each
account must have a unique key.
/Users/gustotune
==> ssh-keygen -t rsa -C "gustotune@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/gustotune/.
ssh/id_rsa): id_rsa_gustotune
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_rsa_gustotune.
Your public key has been saved in id_rsa_gustotune.
pub.
/Users/gustotune
==> mv id_rsa_gustotune* .ssh/
/Users/gustotune
==> heroku login
Enter your Heroku credentials.
Email: gustotune@gmail.com
Password (typing will be hidden): password is here
Found the following SSH public keys:
1) id_rsa.pub
2) id_rsa_cloud.pub
3) id_rsa_gustotune.pub
Which would you like to use with your Heroku account? 3
Uploading SSH public key /Users/gustotune/.
ssh/id_rsa_gustotune.pub... done
Authentication successful.
Хокку про Heroku
Хокку про Heroku
/Users/gustotune/rails_app
==> git config -e
# комментарий: добавить три строчки в конец файла
[remote "foss-sea"]
url = git@heroku.com:foss-sea.git
fetch = +refs/heads/*:refs/remotes/heroku/*
или тоже самое одной командой
==> heroku git:remote -a foss-sea -r foss-sea
где -a - это название приложения
-r - это git remote name (‘heroku’ по умолчанию)
/Users/gustotune/rails_app
==> git push foss-sea heroku:master
foss-sea = remote git repo in git config
heroku = our local branch (локальная ветка)
master = default branch at foss-sea
еще примеры
==> git push foss-sea master:master
==> git push foss-sea release_1.0:master
==> git push foss-sea heroku:master
Counting objects: 8212, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2822/2822), done.
Writing objects: 100% (8212/8212), 9.68 MiB | 74.00 KiB/s, done.
Total 8212 (delta 5114), reused 8101 (delta 5027)
-----> Ruby app detected
-----> Compiling Ruby/Rails
-----> Using Ruby version: ruby-2.0.0
-----> Installing dependencies using Bundler version 1.3.2
New app detected loading default bundler cache
Running: bundle install --without development:test --path vendor/bundle --binstubs
vendor/bundle/bin --deployment
Fetching source index from https://rubygems.org/
Asset precompilation completed (28.32s)
Cleaning assets
-----> Discovering process types
Procfile declares types -> web
Default types for Ruby -> console, rake, worker
-----> Compiled slug size: 55.3MB
-----> Launching... done, v5
http://foss-sea.herokuapp.com deployed to Heroku
To git@heroku.com:foss-sea.git
* [new branch]
heroku -> master
Хокку про Heroku
Хокку про Heroku
Подготовка базы данных
/Users/gustotune/rails_app
==> heroku run rake db:version
Running `rake db:version` attached to terminal... up, run.9905
Current version: 0
/Users/gustotune/rails_app
==> heroku run rake db:migrate
Running `rake db:migrate` attached to terminal... up, run.7096
Migrating to DeviseCreateUsers (20130910211249)
== DeviseCreateUsers: migrating
==============================================
-- create_table(:users)
-> 0.0398s
-- add_index(:users, :email, {:unique=>true})
-> 0.0203s
-- add_index(:users, :reset_password_token, {:unique=>true})
-> 0.0260s
-- add_index(:users, :confirmation_token, {:unique=>true})
-> 0.0222s
== DeviseCreateUsers: migrated (0.1091s)
...
БИНГО ;)
Работа с дополнениями
add-ons
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
/Users/gustotune/rails_app
==> heroku addons:add logentries
Adding logentries on foss-sea... failed
! Please verify your account to install this add-on
! For more information, see http://devcenter.heroku.com/categories/billing
! Verify now at https://heroku.com/verify
==> heroku addons:add newrelic:stark
Adding newrelic:stark on foss-sea... done, v7 (free)
Use `heroku addons:docs newrelic` to view documentation.
==> heroku addons:add pgbackups:auto-month
Adding pgbackups:auto-month on foss-sea... done, v8 (free)
You can now use "pgbackups" to backup your databases or import an external
backup.
Use `heroku addons:docs pgbackups` to view documentation.
==> heroku addons:add rollbar
Adding rollbar on foss-sea... done, v9 (free)
Use `heroku addons:docs rollbar` to view documentation.
==> heroku addons:add sendgrid
Adding sendgrid on foss-sea... done, v10 (free)
Use `heroku addons:docs sendgrid` to view documentation.
Хокку про Heroku
Настройка дополнений
и переменных
окружения
> heroku config:set MAILER_URL=foss-sea.herokuapp.com
или так если используется собственный домен
> heroku config:set MAILER_URL=foss-sea.custom-domain.io
Примеры дополнений
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Играем с
масштабированием и
ценой
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Хокку про Heroku
Полезные команды
==> heroku ps # возвращает список работающих копий приложения
=== web (1X): `bundle exec passenger start -p $PORT --max-pool-size 2`
web.1: up 2013/11/29 01:02:25 (~ 46m ago)
==> heroku ps:scale web=2 worker=1
Scaling web processes... done, now running 2
Scaling worker processes... done, now running 1
==> heroku run bash # получить доступ к консоли сервера
==> heroku run rails c # получить доступ к консоли приложения
==> heroku run rake [your_rake_task] # вызвать rake задачу [your_rake_task]
==> heroku logs --tail #просмотреть логи
==> heroku labs:enable user-env-compile # решает ряд проблем при сборке
==> heroku fork -a foss-sea foss-sea-copy # делает полную копию приложения
==> heroku maintenance:on
Enabling maintenance mode for foss-sea... done
Восстановление после неудачного обновления
Спасибо
Сергей Селецкий
@sseletskyy
Хокку про Heroku

More Related Content

What's hot

Odoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenvOdoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenvacsone
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultBram Vogelaar
 
G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~Tsuyoshi Yamamoto
 
Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)akira6592
 
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQRealtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQRick Copeland
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Masahiro Nagano
 
IIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウ
IIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウIIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウ
IIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウIIJ
 
オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発
オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発
オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発IIJ
 
Automating everything with PowerShell, Terraform, and AWS
Automating everything with PowerShell, Terraform, and AWSAutomating everything with PowerShell, Terraform, and AWS
Automating everything with PowerShell, Terraform, and AWSChris Brown
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the webLarry Nung
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowJosé Paumard
 
Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul ConnectBram Vogelaar
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteBram Vogelaar
 

What's hot (18)

Odoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenvOdoo development workflow with pip and virtualenv
Odoo development workflow with pip and virtualenv
 
Securing Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp VaultSecuring Prometheus exporters using HashiCorp Vault
Securing Prometheus exporters using HashiCorp Vault
 
G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~G*なクラウド ~雲のかなたに~
G*なクラウド ~雲のかなたに~
 
Elastic stack
Elastic stackElastic stack
Elastic stack
 
Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)
Ansibleではじめるサーバー・ネットワークの自動化(2019/02版)
 
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQRealtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
Realtime Analytics Using MongoDB, Python, Gevent, and ZeroMQ
 
Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015Rhebok, High Performance Rack Handler / Rubykaigi 2015
Rhebok, High Performance Rack Handler / Rubykaigi 2015
 
IIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウ
IIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウIIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウ
IIJにおけるGlusterFS利用事例 GlusterFSの詳解と2年間の運用ノウハウ
 
CouchDB Day NYC 2017: Replication
CouchDB Day NYC 2017: ReplicationCouchDB Day NYC 2017: Replication
CouchDB Day NYC 2017: Replication
 
オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発
オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発
オブジェクトストレージの詳解とクラウドサービスを活かすスケーラブルなシステム開発
 
Automating everything with PowerShell, Terraform, and AWS
Automating everything with PowerShell, Terraform, and AWSAutomating everything with PowerShell, Terraform, and AWS
Automating everything with PowerShell, Terraform, and AWS
 
Bower - A package manager for the web
Bower - A package manager for the webBower - A package manager for the web
Bower - A package manager for the web
 
Gaelyk
GaelykGaelyk
Gaelyk
 
Asynchronous Systems with Fn Flow
Asynchronous Systems with Fn FlowAsynchronous Systems with Fn Flow
Asynchronous Systems with Fn Flow
 
Plack - LPW 2009
Plack - LPW 2009Plack - LPW 2009
Plack - LPW 2009
 
Observability with Consul Connect
Observability with Consul ConnectObservability with Consul Connect
Observability with Consul Connect
 
Integrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suiteIntegrating icinga2 and the HashiCorp suite
Integrating icinga2 and the HashiCorp suite
 
Laravel Day / Deploy
Laravel Day / DeployLaravel Day / Deploy
Laravel Day / Deploy
 

Viewers also liked

Mídias Sociais e Mobilidade Urbana
Mídias Sociais e Mobilidade UrbanaMídias Sociais e Mobilidade Urbana
Mídias Sociais e Mobilidade UrbanaCaio Oliveira
 
Modulo i día 4 introduccion rse_diplomado rse periodistas
Modulo i día 4 introduccion rse_diplomado rse periodistasModulo i día 4 introduccion rse_diplomado rse periodistas
Modulo i día 4 introduccion rse_diplomado rse periodistasUDELAS
 
Cibercultura aula 07 comunicação digital (of. 2)
Cibercultura   aula 07   comunicação digital (of. 2)Cibercultura   aula 07   comunicação digital (of. 2)
Cibercultura aula 07 comunicação digital (of. 2)Caio Oliveira
 
Planejamento e Gestão Em Mídias Digitais - Aula 08
Planejamento e Gestão Em Mídias Digitais - Aula 08Planejamento e Gestão Em Mídias Digitais - Aula 08
Planejamento e Gestão Em Mídias Digitais - Aula 08Caio Oliveira
 
La Despertà Valenciana
La Despertà ValencianaLa Despertà Valenciana
La Despertà ValencianaMARTA FIGUERAS
 
O legado da copa do mundo no brasil
O legado da copa do mundo no brasilO legado da copa do mundo no brasil
O legado da copa do mundo no brasilYury Kelerman
 
Usando efeitos, animações e transições no FireMonkey
Usando efeitos, animações e transições no FireMonkey Usando efeitos, animações e transições no FireMonkey
Usando efeitos, animações e transições no FireMonkey Fernando Rizzato
 
Mémoire AU Camille Gellin
Mémoire AU Camille GellinMémoire AU Camille Gellin
Mémoire AU Camille GellinCamille Gellin
 
Download kashmir sheet music by led zeppelin sheet music plus
Download kashmir sheet music by led zeppelin   sheet music plusDownload kashmir sheet music by led zeppelin   sheet music plus
Download kashmir sheet music by led zeppelin sheet music plusAndré Lenz
 
Trophy winning-teams Codemotion Milan 2015
Trophy winning-teams Codemotion Milan 2015Trophy winning-teams Codemotion Milan 2015
Trophy winning-teams Codemotion Milan 2015Adam Onishi
 
字字千金(二)(With animation & music)
字字千金(二)(With animation & music)字字千金(二)(With animation & music)
字字千金(二)(With animation & music)Dhamma Jata
 

Viewers also liked (20)

Mídias Sociais e Mobilidade Urbana
Mídias Sociais e Mobilidade UrbanaMídias Sociais e Mobilidade Urbana
Mídias Sociais e Mobilidade Urbana
 
Modulo i día 4 introduccion rse_diplomado rse periodistas
Modulo i día 4 introduccion rse_diplomado rse periodistasModulo i día 4 introduccion rse_diplomado rse periodistas
Modulo i día 4 introduccion rse_diplomado rse periodistas
 
Cibercultura aula 07 comunicação digital (of. 2)
Cibercultura   aula 07   comunicação digital (of. 2)Cibercultura   aula 07   comunicação digital (of. 2)
Cibercultura aula 07 comunicação digital (of. 2)
 
Planejamento e Gestão Em Mídias Digitais - Aula 08
Planejamento e Gestão Em Mídias Digitais - Aula 08Planejamento e Gestão Em Mídias Digitais - Aula 08
Planejamento e Gestão Em Mídias Digitais - Aula 08
 
CIO Survey 2014
CIO Survey 2014CIO Survey 2014
CIO Survey 2014
 
Eb 4
Eb 4Eb 4
Eb 4
 
Yo te lo dige
Yo te lo digeYo te lo dige
Yo te lo dige
 
Slaidrāde
SlaidrādeSlaidrāde
Slaidrāde
 
La Despertà Valenciana
La Despertà ValencianaLa Despertà Valenciana
La Despertà Valenciana
 
O legado da copa do mundo no brasil
O legado da copa do mundo no brasilO legado da copa do mundo no brasil
O legado da copa do mundo no brasil
 
Usando efeitos, animações e transições no FireMonkey
Usando efeitos, animações e transições no FireMonkey Usando efeitos, animações e transições no FireMonkey
Usando efeitos, animações e transições no FireMonkey
 
Mémoire AU Camille Gellin
Mémoire AU Camille GellinMémoire AU Camille Gellin
Mémoire AU Camille Gellin
 
Gurumudra
GurumudraGurumudra
Gurumudra
 
Download kashmir sheet music by led zeppelin sheet music plus
Download kashmir sheet music by led zeppelin   sheet music plusDownload kashmir sheet music by led zeppelin   sheet music plus
Download kashmir sheet music by led zeppelin sheet music plus
 
Trophy winning-teams Codemotion Milan 2015
Trophy winning-teams Codemotion Milan 2015Trophy winning-teams Codemotion Milan 2015
Trophy winning-teams Codemotion Milan 2015
 
Amazon ECSとDevOps
Amazon ECSとDevOpsAmazon ECSとDevOps
Amazon ECSとDevOps
 
字字千金(二)(With animation & music)
字字千金(二)(With animation & music)字字千金(二)(With animation & music)
字字千金(二)(With animation & music)
 
Web Politics 2.0
Web Politics 2.0Web Politics 2.0
Web Politics 2.0
 
Carlos 8ºb
Carlos 8ºbCarlos 8ºb
Carlos 8ºb
 
Guitarra xpress
Guitarra xpressGuitarra xpress
Guitarra xpress
 

Similar to Хокку про Heroku

Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK SeminarMartin Scharm
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerGraham Charters
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabSoftware Guru
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or lessrijk.stofberg
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...NETWAYS
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceQuinlan Jung
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOpsОмские ИТ-субботники
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflowRiccardo Coppola
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stackEric Ahn
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linuxtutorialsruby
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerOrtus Solutions, Corp
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Ortus Solutions, Corp
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.catPablo Godel
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis OverviewLeo Lorieri
 
Control your deployments with Capistrano
Control your deployments with CapistranoControl your deployments with Capistrano
Control your deployments with CapistranoRamazan K
 
Heroku Tips and Hacks
Heroku Tips and HacksHeroku Tips and Hacks
Heroku Tips and HacksLuan Nguyen
 

Similar to Хокку про Heroku (20)

Docker Demo @ IuK Seminar
Docker Demo @ IuK SeminarDocker Demo @ IuK Seminar
Docker Demo @ IuK Seminar
 
Optimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for DockerOptimizing Spring Boot apps for Docker
Optimizing Spring Boot apps for Docker
 
Instrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con GitlabInstrumentación de entrega continua con Gitlab
Instrumentación de entrega continua con Gitlab
 
Dexterity in 15 minutes or less
Dexterity in 15 minutes or lessDexterity in 15 minutes or less
Dexterity in 15 minutes or less
 
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
Open Source Backup Conference 2014: Workshop bareos introduction, by Philipp ...
 
Hosting Your Own OTA Update Service
Hosting Your Own OTA Update ServiceHosting Your Own OTA Update Service
Hosting Your Own OTA Update Service
 
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
2017-03-11 02 Денис Нелюбин. Docker & Ansible - лучшие друзья DevOps
 
Perl Dancer, FPW 2010
Perl Dancer, FPW 2010Perl Dancer, FPW 2010
Perl Dancer, FPW 2010
 
Bower & Grunt - A practical workflow
Bower & Grunt - A practical workflowBower & Grunt - A practical workflow
Bower & Grunt - A practical workflow
 
Keep it simple web development stack
Keep it simple web development stackKeep it simple web development stack
Keep it simple web development stack
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
mapserver_install_linux
mapserver_install_linuxmapserver_install_linux
mapserver_install_linux
 
Into The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and dockerInto The Box 2018 Going live with commandbox and docker
Into The Box 2018 Going live with commandbox and docker
 
Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018Going live with BommandBox and docker Into The Box 2018
Going live with BommandBox and docker Into The Box 2018
 
Deploying Symfony | symfony.cat
Deploying Symfony | symfony.catDeploying Symfony | symfony.cat
Deploying Symfony | symfony.cat
 
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
[EXTENDED] Ceph, Docker, Heroku Slugs, CoreOS and Deis Overview
 
Control your deployments with Capistrano
Control your deployments with CapistranoControl your deployments with Capistrano
Control your deployments with Capistrano
 
Heroku Tips and Hacks
Heroku Tips and HacksHeroku Tips and Hacks
Heroku Tips and Hacks
 
Oracle API Gateway Installation
Oracle API Gateway InstallationOracle API Gateway Installation
Oracle API Gateway Installation
 

Recently uploaded

AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsSeth Reyes
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6DianaGray10
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Websitedgelyza
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IES VE
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarPrecisely
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 

Recently uploaded (20)

AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
Computer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and HazardsComputer 10: Lesson 10 - Online Crimes and Hazards
Computer 10: Lesson 10 - Online Crimes and Hazards
 
UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6UiPath Studio Web workshop series - Day 6
UiPath Studio Web workshop series - Day 6
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
COMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a WebsiteCOMPUTER 10 Lesson 8 - Building a Website
COMPUTER 10 Lesson 8 - Building a Website
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
IESVE Software for Florida Code Compliance Using ASHRAE 90.1-2019
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
AI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity WebinarAI You Can Trust - Ensuring Success with Data Integrity Webinar
AI You Can Trust - Ensuring Success with Data Integrity Webinar
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 

Хокку про Heroku

  • 1. Хокку про Heroku Сергей Селецкий @sseletskyy Европейское Агентство Высоких Технологий http://www.foss-sea.org.ua/ 2013
  • 2. Что такое Paas (Product as a Service) Cloud сервер + Agile + масштабирование
  • 3. Что такое Paas (Product as a Service) с финансовой точки зрения ● нет затрат на покупку серверов ● на покупку серверного ПО ● на зарплату администратора ● ежемесячная оплата услуг PaaS
  • 4. GIT SOURCE CODE HEROKU $ git push heroku your_branch:master
  • 5. $ heroku ps:scale web=1 worker=1 LOAD BALANCER HEROKU STATELESS INSTANCE WEB DYNO PostgreSQL STATELESS INSTANCE WORKER DYNO
  • 6. $ heroku ps:scale web=2 worker=2 LOAD BALANCER HEROKU STATELESS STATELESS INSTANCE INSTANCE WEB DYNO DYNO PostgreSQL STATELESS STATELESS INSTANCE INSTANCE WORKER DYNO DYNO
  • 7. $ heroku ps:scale web=3 worker=3 LOAD BALANCER HEROKU STATELESS STATELESS INSTANCE STATELESS INSTANCE INSTANCE DYNO WEB DYNO DYNO PostgreSQL STATELESS STATELESS INSTANCE STATELESS INSTANCE INSTANCE DYNO WORKER DYNO DYNO
  • 8. $ heroku ps:scale web=5 worker=5 LOAD BALANCER HEROKU STATELESS STATELESS INSTANCE STATELESS INSTANCE STATELESS INSTANCE STATELESS INSTANCE DYNO INSTANCE DYNO DYNO WEB DYNO DYNO PostgreSQL STATELESS STATELESS INSTANCE STATELESS INSTANCE STATELESS INSTANCE STATELESS INSTANCE DYNO INSTANCE DYNO DYNO WORKER DYNO DYNO
  • 16. ==> heroku login Enter your Heroku credentials. Email: gustotune@gmail.com Password (typing will be hidden): Found the following SSH public keys: 1) id_rsa.pub 2) id_rsa_cloud.pub Which would you like to use with your Heroku account? 2 Uploading SSH public key /Users/gustotune/. ssh/id_rsa_cloud.pub... failed ! This key is already in use by another account. Each account must have a unique key.
  • 17. /Users/gustotune ==> ssh-keygen -t rsa -C "gustotune@gmail.com" Generating public/private rsa key pair. Enter file in which to save the key (/Users/gustotune/. ssh/id_rsa): id_rsa_gustotune Enter passphrase (empty for no passphrase): Enter same passphrase again: Your identification has been saved in id_rsa_gustotune. Your public key has been saved in id_rsa_gustotune. pub. /Users/gustotune ==> mv id_rsa_gustotune* .ssh/
  • 18. /Users/gustotune ==> heroku login Enter your Heroku credentials. Email: gustotune@gmail.com Password (typing will be hidden): password is here Found the following SSH public keys: 1) id_rsa.pub 2) id_rsa_cloud.pub 3) id_rsa_gustotune.pub Which would you like to use with your Heroku account? 3 Uploading SSH public key /Users/gustotune/. ssh/id_rsa_gustotune.pub... done Authentication successful.
  • 21. /Users/gustotune/rails_app ==> git config -e # комментарий: добавить три строчки в конец файла [remote "foss-sea"] url = git@heroku.com:foss-sea.git fetch = +refs/heads/*:refs/remotes/heroku/* или тоже самое одной командой ==> heroku git:remote -a foss-sea -r foss-sea где -a - это название приложения -r - это git remote name (‘heroku’ по умолчанию)
  • 22. /Users/gustotune/rails_app ==> git push foss-sea heroku:master foss-sea = remote git repo in git config heroku = our local branch (локальная ветка) master = default branch at foss-sea еще примеры ==> git push foss-sea master:master ==> git push foss-sea release_1.0:master
  • 23. ==> git push foss-sea heroku:master Counting objects: 8212, done. Delta compression using up to 4 threads. Compressing objects: 100% (2822/2822), done. Writing objects: 100% (8212/8212), 9.68 MiB | 74.00 KiB/s, done. Total 8212 (delta 5114), reused 8101 (delta 5027) -----> Ruby app detected -----> Compiling Ruby/Rails -----> Using Ruby version: ruby-2.0.0 -----> Installing dependencies using Bundler version 1.3.2 New app detected loading default bundler cache Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin --deployment Fetching source index from https://rubygems.org/ Asset precompilation completed (28.32s) Cleaning assets -----> Discovering process types Procfile declares types -> web Default types for Ruby -> console, rake, worker -----> Compiled slug size: 55.3MB -----> Launching... done, v5 http://foss-sea.herokuapp.com deployed to Heroku To git@heroku.com:foss-sea.git * [new branch] heroku -> master
  • 26. Подготовка базы данных /Users/gustotune/rails_app ==> heroku run rake db:version Running `rake db:version` attached to terminal... up, run.9905 Current version: 0 /Users/gustotune/rails_app ==> heroku run rake db:migrate Running `rake db:migrate` attached to terminal... up, run.7096 Migrating to DeviseCreateUsers (20130910211249) == DeviseCreateUsers: migrating ============================================== -- create_table(:users) -> 0.0398s -- add_index(:users, :email, {:unique=>true}) -> 0.0203s -- add_index(:users, :reset_password_token, {:unique=>true}) -> 0.0260s -- add_index(:users, :confirmation_token, {:unique=>true}) -> 0.0222s == DeviseCreateUsers: migrated (0.1091s) ...
  • 35. /Users/gustotune/rails_app ==> heroku addons:add logentries Adding logentries on foss-sea... failed ! Please verify your account to install this add-on ! For more information, see http://devcenter.heroku.com/categories/billing ! Verify now at https://heroku.com/verify ==> heroku addons:add newrelic:stark Adding newrelic:stark on foss-sea... done, v7 (free) Use `heroku addons:docs newrelic` to view documentation. ==> heroku addons:add pgbackups:auto-month Adding pgbackups:auto-month on foss-sea... done, v8 (free) You can now use "pgbackups" to backup your databases or import an external backup. Use `heroku addons:docs pgbackups` to view documentation. ==> heroku addons:add rollbar Adding rollbar on foss-sea... done, v9 (free) Use `heroku addons:docs rollbar` to view documentation. ==> heroku addons:add sendgrid Adding sendgrid on foss-sea... done, v10 (free) Use `heroku addons:docs sendgrid` to view documentation.
  • 38. > heroku config:set MAILER_URL=foss-sea.herokuapp.com или так если используется собственный домен > heroku config:set MAILER_URL=foss-sea.custom-domain.io
  • 51. ==> heroku ps # возвращает список работающих копий приложения === web (1X): `bundle exec passenger start -p $PORT --max-pool-size 2` web.1: up 2013/11/29 01:02:25 (~ 46m ago) ==> heroku ps:scale web=2 worker=1 Scaling web processes... done, now running 2 Scaling worker processes... done, now running 1 ==> heroku run bash # получить доступ к консоли сервера ==> heroku run rails c # получить доступ к консоли приложения ==> heroku run rake [your_rake_task] # вызвать rake задачу [your_rake_task] ==> heroku logs --tail #просмотреть логи ==> heroku labs:enable user-env-compile # решает ряд проблем при сборке ==> heroku fork -a foss-sea foss-sea-copy # делает полную копию приложения ==> heroku maintenance:on Enabling maintenance mode for foss-sea... done