SlideShare a Scribd company logo
1 of 20
No more Deployment Pain
PaaS with Heroku
Content
- SaaS < PaaS < IaaS
- Toolchain as a Service
- About Heroku
- The Twelve Factor App
- Heroku architecture
- Terminology
- Heroku Toolbelt
- Buildpack
- Confix vars
- Dyno
- Logplex
- Add-ons
SaaS < PaaS < IaaS
Software as a Service
Platform as a Service
Infrastructure as a Service
Toolchain as a Service
- Manage your project
- Trello, Jira, PivotalTracker, ...
- Creating your code
- Koding.com, ...
- Host your code
- GitHib, BitBucket, ...
- Build you code
Heroku
- Developed since 2007
- acquired by Salesforce.com in 2010
- One of the first PaaS providers
- Built on top of Amazon`s IaaS
- Started as Ruby platform
- currently a polyglot platform
Heroku Terminology
- Application
- Procfile
- Deployment
- Buildpack
- Slug
- Dyno
Heroku architecture
- Reverse Proxy by nginx
- terminates SSL
- forwards to cache layer
- HTTP Cache by Varnish
- returns cached pages immediately
- forwards to routing mest
- Routing Mesh written in Erlang
Set up Heroku
Set up Heroku
Heroku Toolbelt
- Heroku Client
- CLI tool for creating and managing Heroku apps
Stack, Buildpack, Slug compiler
- Stack
- Operating System image (Ubuntu)
- Buildpack
- collection of scripts, knows how to build and execute your app
- Slug compiler
- build you app with buildpack, on the given stack
- creates slug, an image / binary, ready to be executed on Dyno
Config variables
- Variable configuration between environments
- never store sensitive configuration in source repository
- Will be exposed as environment variables at runtime
- All dynos see the exact same set of variables at runtime
- Add-ons might expose config vars
- Dyno is an isolated lightweight Linux container
- Three types of dynos
- web dyno, can receive HTTP traffic
- worker dyno, used for background, queuing and timed jobs
- one-off dyno, can run a command in a temporary dyno
- Dynos are ephemeral
- shared state requires external data store
Dyno and Dyno Management
Logplex
- Collates and distributes log entries
- all application dynos
- add-ons and other components
- Routes messages from sources to drains
- source: any process that might want to emit log entries
- drain: any network service that want to consume log entries
- Limited log entry buffer
Add-ons
- Provided as services by Heroku and third parties
- add-ons available from market place
- starting from free plans to monthly subscriptions
- Add-on providers are responsible for their add-ons
- integrate via config vars
- some contain external web user interface
Preboot
Production cloud application without
zero downtime deployments...
- Changes the dyno start behavior to `blue - green`
- ensures new dynos are started and ready to receive traffic
- requires at least 2 dynos
- two versions of application dynos running at the same time
Pipelines
- Pipelines help to solve complexity of multi-environment
- dev, test , staging, production, …
- Pipeline manages application slug
- diff between current and downstream app
- promote slug to downstream target
- I. Codebase - One codebase tracked in revision control, many deploys
- II. Dependencies - Explicitly declare and isolate dependencies
- III. Config - Store config in the environment
- IV. Backing Services - Treat backing services as attached resources
- V. Build, release, run - Strictly separate build and run stages
- VI. Processes - Execute the app as one or more stateless processes
- VII. Port binding - Export services via port binding
The Twelve-Factor App - 12factor.net
Demo - Deploy BrainDev Spring Boot app
1. Create App Heroku
a. heroku apps:create braindev-demo-staging --remote staging ---buildpack https://github.com/heroku/heroku-buildpack-scala
b. git remote add staging https://git.heroku.com/braindev-demo-staging.git
2. Publish
a. git push staging master
3. See log
a. heroku logs -t
4. Set config
Thank you

More Related Content

What's hot

[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기
[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기
[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기
OpenStack Korea Community
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova Compute
Alessandro Pilotti
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stack
Nitin Mehta
 

What's hot (20)

Building an external CPI for CloudStack
Building an external CPI for CloudStackBuilding an external CPI for CloudStack
Building an external CPI for CloudStack
 
Containers and HPC
Containers and HPCContainers and HPC
Containers and HPC
 
Building stateful applications on Kubernetes with Rook
Building stateful applications on Kubernetes with RookBuilding stateful applications on Kubernetes with Rook
Building stateful applications on Kubernetes with Rook
 
[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기
[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기
[OpenStack Days 2016] Track4 - OpenNSL으로 브로드콜 기반 네트,워크 스위치 제어하기
 
DCSF 19 Online Feature Extraction and Event Generation for Computer-Animal In...
DCSF 19 Online Feature Extraction and Event Generation for Computer-Animal In...DCSF 19 Online Feature Extraction and Event Generation for Computer-Animal In...
DCSF 19 Online Feature Extraction and Event Generation for Computer-Animal In...
 
Secrets management vault cncf meetup
Secrets management vault cncf meetupSecrets management vault cncf meetup
Secrets management vault cncf meetup
 
OpenStack Contribution Workflow
OpenStack Contribution WorkflowOpenStack Contribution Workflow
OpenStack Contribution Workflow
 
Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1Deep Dive into Kubernetes - Part 1
Deep Dive into Kubernetes - Part 1
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
Open stack nova reverse engineer
Open stack nova reverse engineerOpen stack nova reverse engineer
Open stack nova reverse engineer
 
[2017년 5월 정기세미나] IBM에서 바라보는 OpenStack 이야기
[2017년 5월 정기세미나] IBM에서 바라보는 OpenStack 이야기[2017년 5월 정기세미나] IBM에서 바라보는 OpenStack 이야기
[2017년 5월 정기세미나] IBM에서 바라보는 OpenStack 이야기
 
Hyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova ComputeHyper-V OpenStack Nova Compute
Hyper-V OpenStack Nova Compute
 
Deploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on ContainersDeploying WSO2 Middleware on Containers
Deploying WSO2 Middleware on Containers
 
Container Networking Deep Dive
Container Networking Deep DiveContainer Networking Deep Dive
Container Networking Deep Dive
 
How OpenShift SDN helps to automate
How OpenShift SDN helps to automateHow OpenShift SDN helps to automate
How OpenShift SDN helps to automate
 
OpenShift In a Nutshell - Episode 01 - Introduction
OpenShift In a Nutshell - Episode 01 - IntroductionOpenShift In a Nutshell - Episode 01 - Introduction
OpenShift In a Nutshell - Episode 01 - Introduction
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stack
 
What's New in WildFly 9?
What's New in WildFly 9?What's New in WildFly 9?
What's New in WildFly 9?
 
WSO2 Container Strategy
WSO2 Container StrategyWSO2 Container Strategy
WSO2 Container Strategy
 
OpenShift Origin Internals
OpenShift Origin Internals OpenShift Origin Internals
OpenShift Origin Internals
 

Similar to Getting rid of pain with Heroku @ BrainDev Kyiv

DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
Neil Shannon
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and docker
sflynn073
 

Similar to Getting rid of pain with Heroku @ BrainDev Kyiv (20)

Introduction to PaaS and Heroku
Introduction to PaaS and HerokuIntroduction to PaaS and Heroku
Introduction to PaaS and Heroku
 
The twelve factor app
The twelve factor appThe twelve factor app
The twelve factor app
 
Micro services vs hadoop
Micro services vs hadoopMicro services vs hadoop
Micro services vs hadoop
 
Heroku
HerokuHeroku
Heroku
 
Cloud Platform as a Service: Heroku
Cloud Platform as a Service: HerokuCloud Platform as a Service: Heroku
Cloud Platform as a Service: Heroku
 
Class.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devopsClass.mobilefirstfoundation.chapter.2.devops
Class.mobilefirstfoundation.chapter.2.devops
 
What's New in Docker - February 2017
What's New in Docker - February 2017What's New in Docker - February 2017
What's New in Docker - February 2017
 
Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment Docker - Demo on PHP Application deployment
Docker - Demo on PHP Application deployment
 
Open shift and docker - october,2014
Open shift and docker - october,2014Open shift and docker - october,2014
Open shift and docker - october,2014
 
12-Factor Apps
12-Factor Apps12-Factor Apps
12-Factor Apps
 
CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018CNCF Introduction - Feb 2018
CNCF Introduction - Feb 2018
 
Building ContinuousIntegration with Virtuozzo DevOps
Building ContinuousIntegration with Virtuozzo DevOpsBuilding ContinuousIntegration with Virtuozzo DevOps
Building ContinuousIntegration with Virtuozzo DevOps
 
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
DevNexus 2017 - Building and Deploying 12 Factor Apps in Scala, Java, Ruby, a...
 
A Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using DockerA Shift from Monolith to Microservice using Docker
A Shift from Monolith to Microservice using Docker
 
Migrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMixMigrate Heroku & OpenShift Applications to IBM BlueMix
Migrate Heroku & OpenShift Applications to IBM BlueMix
 
Docker meetup talk - chicago March 2014
Docker meetup talk - chicago March 2014Docker meetup talk - chicago March 2014
Docker meetup talk - chicago March 2014
 
Was liberty profile and docker
Was liberty profile and dockerWas liberty profile and docker
Was liberty profile and docker
 
.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp.NET Cloud-Native Bootcamp
.NET Cloud-Native Bootcamp
 
Why containers
Why containersWhy containers
Why containers
 
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
MNAssociationEnterpriseArchitectsCloudFoundryJuly2017
 

More from SeniorDevOnly

More from SeniorDevOnly (6)

Viacheslav Rudenko - Case Study: How 4 university friends battled US Mobile M...
Viacheslav Rudenko - Case Study: How 4 university friends battled US Mobile M...Viacheslav Rudenko - Case Study: How 4 university friends battled US Mobile M...
Viacheslav Rudenko - Case Study: How 4 university friends battled US Mobile M...
 
Ievgenii Narovlianskyi - Ruby is not just a gem
Ievgenii Narovlianskyi - Ruby is not just a gemIevgenii Narovlianskyi - Ruby is not just a gem
Ievgenii Narovlianskyi - Ruby is not just a gem
 
Why I don’t want to develop iOS apps in Objective C
Why I don’t want to develop iOS apps in Objective CWhy I don’t want to develop iOS apps in Objective C
Why I don’t want to develop iOS apps in Objective C
 
From Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risksFrom Java to Scala - advantages and possible risks
From Java to Scala - advantages and possible risks
 
Parse com alternatives
Parse com alternativesParse com alternatives
Parse com alternatives
 
Drakon
DrakonDrakon
Drakon
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Recently uploaded (20)

Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 

Getting rid of pain with Heroku @ BrainDev Kyiv

  • 1. No more Deployment Pain PaaS with Heroku
  • 2. Content - SaaS < PaaS < IaaS - Toolchain as a Service - About Heroku - The Twelve Factor App - Heroku architecture - Terminology - Heroku Toolbelt - Buildpack - Confix vars - Dyno - Logplex - Add-ons
  • 3. SaaS < PaaS < IaaS Software as a Service Platform as a Service Infrastructure as a Service
  • 4.
  • 5. Toolchain as a Service - Manage your project - Trello, Jira, PivotalTracker, ... - Creating your code - Koding.com, ... - Host your code - GitHib, BitBucket, ... - Build you code
  • 6. Heroku - Developed since 2007 - acquired by Salesforce.com in 2010 - One of the first PaaS providers - Built on top of Amazon`s IaaS - Started as Ruby platform - currently a polyglot platform
  • 7. Heroku Terminology - Application - Procfile - Deployment - Buildpack - Slug - Dyno
  • 8. Heroku architecture - Reverse Proxy by nginx - terminates SSL - forwards to cache layer - HTTP Cache by Varnish - returns cached pages immediately - forwards to routing mest - Routing Mesh written in Erlang
  • 9. Set up Heroku Set up Heroku
  • 10. Heroku Toolbelt - Heroku Client - CLI tool for creating and managing Heroku apps
  • 11. Stack, Buildpack, Slug compiler - Stack - Operating System image (Ubuntu) - Buildpack - collection of scripts, knows how to build and execute your app - Slug compiler - build you app with buildpack, on the given stack - creates slug, an image / binary, ready to be executed on Dyno
  • 12. Config variables - Variable configuration between environments - never store sensitive configuration in source repository - Will be exposed as environment variables at runtime - All dynos see the exact same set of variables at runtime - Add-ons might expose config vars
  • 13. - Dyno is an isolated lightweight Linux container - Three types of dynos - web dyno, can receive HTTP traffic - worker dyno, used for background, queuing and timed jobs - one-off dyno, can run a command in a temporary dyno - Dynos are ephemeral - shared state requires external data store Dyno and Dyno Management
  • 14. Logplex - Collates and distributes log entries - all application dynos - add-ons and other components - Routes messages from sources to drains - source: any process that might want to emit log entries - drain: any network service that want to consume log entries - Limited log entry buffer
  • 15. Add-ons - Provided as services by Heroku and third parties - add-ons available from market place - starting from free plans to monthly subscriptions - Add-on providers are responsible for their add-ons - integrate via config vars - some contain external web user interface
  • 16. Preboot Production cloud application without zero downtime deployments... - Changes the dyno start behavior to `blue - green` - ensures new dynos are started and ready to receive traffic - requires at least 2 dynos - two versions of application dynos running at the same time
  • 17. Pipelines - Pipelines help to solve complexity of multi-environment - dev, test , staging, production, … - Pipeline manages application slug - diff between current and downstream app - promote slug to downstream target
  • 18. - I. Codebase - One codebase tracked in revision control, many deploys - II. Dependencies - Explicitly declare and isolate dependencies - III. Config - Store config in the environment - IV. Backing Services - Treat backing services as attached resources - V. Build, release, run - Strictly separate build and run stages - VI. Processes - Execute the app as one or more stateless processes - VII. Port binding - Export services via port binding The Twelve-Factor App - 12factor.net
  • 19. Demo - Deploy BrainDev Spring Boot app 1. Create App Heroku a. heroku apps:create braindev-demo-staging --remote staging ---buildpack https://github.com/heroku/heroku-buildpack-scala b. git remote add staging https://git.heroku.com/braindev-demo-staging.git 2. Publish a. git push staging master 3. See log a. heroku logs -t 4. Set config

Editor's Notes

  1. Welcome Deploying application, own server, VPS install OS, dependencies, deploy script, document properterian solution server maintained, installing OS security patches, update JVM, logging rolling, tmp files filling disk Simpler solution? Yes. Welcome to Platform as a Service! Welcome to this presentation about Heroku. If you have ever had the responbility of deploying and managing an application in production, using your own server, or a VPS, you know how much pain it is setup the server, install dependencies (maven/gradle/application server), creating/maintaining deployment scripts, documenting your often propertiarian solution. And after its out in production, the server has to be maintained, by installing OS security patches, update the Java Virtual Machine, making sure logs are rolling correctly, that temporary files arent filling up the disk, etc etc etc. And so the pain goes on. Isnt there a simpler way to solve these issues? Yes, there are. Welcome to Platform as a Service!
  2. Here`s today content. Im gonna describe the different types of services and define some terminology, Lets jump straight into it.
  3. Lets first define some termonology. Software as a Service Applications for end-users delivered on-demand Platform as a Service Operating system, runtime environment and middleware Infrastructure as a Service servers, virtualization, storage and networking
  4. Here`s a diagram showing the layers on a server. The first diagram shows what you needed to set up in the old days with an own dedicated server. The second is what a IaaS include, Then a provider, like Amazon AWS, are setting up the infrastructure for you, and give you access to the machine (typically a VPS) with SSH / OS. So we see that if you have IaaS, the provider will give the first four layers, and then you set up the OS and everything you self. This is a typical VPS setup, like AWS EC2 and similar. Usually they also provide OS for you, but I see they havent mentioned that here. With Plaform as a Service, which Heroku is, also the middleware and runtime environment is provided for you, and the only thing you need to do is to provide your application and configuration settings for it. Software as a Service, thats how it look if someone else has set it up for you. Like Google Drive and similar.
  5. Now adays all of the tools you need to do development and deploy you application, can be found in the cloud. You use Trello, Jira, PivotalTracker in the cloud. You can set up the developer environment with services like koding.com You host your code in GitHub or Bitbucket, which enables you to do many exiting integrations with a click (will show on Heroku) You build and executes tests with Continues Integration services in the cloud, like Travis CI, GreenHouse You can test your code on on services like BrowserStack, Source Labs, etc And you can distribute your code on Maven Central, Docker Hub, npm (node package manager), etc
  6. Short about Heroku. Started in 2007, aquired by salesforce in 2014. One of the first PaaS provides Is built in top of Amazon`s IssS
  7. Lets define some termonology: Application - source code and description of any dependencies Procfile - list of process types - named commands to be executed Deployment - sending application to Heroku using Git or Dropbox Buildpack - set of scripts, that knows how to compile and build you code from your source / GIT repo, output is a slug Slug - bundle of application, language runtime and compilation output Dyno - isolated, virtualized Linux container which executes your application, which is the slug Config var - configuration data hosted independently of source code. Its basically environment variables. Release - append-only ledger of slugs, config vars and add-ons Add-on - easily attachable third party cloud services, like database, sms, email, monitoring, etc Logplex - collates logs from all running dynos and other components. Look at it as an event stream.
  8. Not gonna talk to much about this, just showing a diagram on how the Heroku architecture looks like.
  9. So, to get started with Heroku, the first thing you do, after having created an account, is to install the Heroku Toolbelt. Its a command line tool which enables you to create, deploy and administrate you app on Heroku/
  10. A stack is an operating system image curated by Heroku. There are two stacks, based both on Ubuntu, just different versions of Ubuntu. This will be the OS layer in the diagram earlier. A buildpack is a collection of scripts which knows how to build and execute your application. Are seperate buildpacks for different environments, like Java, Scala, Ruby, PHP, etc. This will be the middleware and runtime layer in the diagram earlier. The slug compiler compiles and build you code with the given buildpack, and the output will be a Slug, an image if you`d like, which can be executed on a Dyno
  11. So now we have a slug, an image with our application. That image/slug can now be deployed to an envirnonment. But different enviornments have different properties, like staging / production, etc. To set configurations and environment variables, we use the heroku config.
  12. A dyno is a lightweight Linux container that runs a single user-specified command. The slug just created contains you pre-packaged application. The config modules enablaes you to set specific environment configurations for your server. The dyno is the linux process which execute your code. There are three types of dynos: Web dyno - which binds to a port so it can accept inbound requests Worker dyno: which executes background jobs, typically batch jobs. One-off dyno. Not gonna go in to that here The dyno manager is the component which starts / stops / scales dynoes. You can tell the dyno manager, from command line, to start up new dynos (horizontal scaling)
  13. Heroku uses ephemeral filesystem, which means the file system shouldnt be “trusted”. The file system will disapare if the dyno is shut down, or undergoes maintenance. Therefore, things like logs, should be thought about like streams. Heroku Logplex has a concept of a source - any process that might want to emit log entries -, and drain: any network service that want to cosume log entries. I think its the buildpack which determines what are your logs, and streams them to Heroku Logplex so it becomes available to you through the heroku log command.
  14. Add-ons are services which you can add to you application, like Database, Reddis, logging, proxy, monitoring, sms, email, etc.
  15. A pipeline is a group of Heroku apps that share the same codebase. Apps in a pipeline are grouped into “review”, “development”, “staging”, and “production” stages representing different deployment steps in a continuous delivery workflow. A code change will typically be deployed first to a pull request, which automatically creates a review app, then merged into master which isautomatically deployed to staging for further testing before promotion to production where the new feature will be available to end users of the app. The pipelines overview page helps you visualize this flow, as well as meta information about the status of each stage. For example, you can see if your production app is running different code than staging.
  16. I. Codebase - One codebase tracked in revision control, many deploys II. Dependencies - Explicitly declare and isolate dependencies III. Config - Store config in the environment IV. Backing Services - Treat backing services as attached resources V. Build, release, run - Strictly separate build and run stages VI. Processes - Execute the app as one or more stateless processes VII. Port binding - Export services via port binding VIII. Concurrency - Scale out via the process model IX. Disposability - Maximize robustness with fast startup and graceful shutdown X. Dev/prod parity - Keep development, staging, and production as similar as possible XI. Logs - Treat logs as event streams XII. Admin processes - Run admin/management tasks as one-off processes
  17. Prerequist. Play Application, source code GitHub: https://github.com/tha022/braindevkiev heroku apps:create braindev-demo-staging --remote staging heroku buildpacks heroku buildpacks:set https://github.com/heroku/heroku-buildpack-scala heroku open git push staging master