SlideShare a Scribd company logo
1 of 26
Download to read offline
Shelly Cloud



Painless Ruby deployment
                      Giedrius Rimkus
                            2012 July
Cloud Computing?

Pay-per-use
On-demand
Computing resources
Alternatives?
EngineYard http://www.engineyard.com
Heroku http://www.heroku.com
Scalarium http://www.scalarium.com
others..
What Shelly Cloud is?
Delivering platform as a service

Deployments are done by pushing with git
Example of git push
  giedrius@rubylt:~/Projects/store (master) $ git push
  gstore master
  Counting objects: 81, done.
  Delta compression using up to 4 threads.
  Compressing objects: 100% (72/72), done.
  Writing objects: 100% (81/81), 27.62 KiB, done.
  Total 81 (delta 6), reused 0 (delta 0)
  remote:
  remote: ---> Received push to cloud 'gstore'
  remote: ---> Checking Gemfile
  remote: ---> Push accepted
  remote: ---> Start your cloud using: `shelly start --
  cloud gstore`
  remote:
  To git@git.shellycloud.com:gstore.git
  * [new branch]      master -> master
Aim
Helping developers
Developers focus on building application and
not on deployment nor infrastructure
Requirements
- Ruby versions
     ●   MRI Ruby (1.9.3)
     ●   MRI Ruby (1.9.2)
     ●   Ruby Enterprise Edition (1.8.7)

-   Bundler
-   "shelly-dependencies" gem (optional)
-   Rails 3.x support
-   Rails 2.3.x support
-   Rack-based apps
-   Gems with native extensions
Shelly Cloud
○ Running Ruby applications
○ It doesn't have to be Rails application
  ○ Sinatra
  ○ or any other which is compatible with Rack
    interface




                                       full list of supported frameworks
              https://github.com/rack/rack#supported-web-frameworks
Shelly Gem
A tool for managing clouds on Shelly Cloud
from command line.
Cloudfile
Your cloud management place

You can edit settings of your Cloud by making
changes to the Cloudfile, committing them to
the git repository and pushing those changes
to the shelly git remote.
Features
○   Running periodic tasks
○   Background processing
○   Storing Files
○   Caching (frontend, backend)
○   Sending emails
○   SSL support
○   Websockets support
Running periodic tasks
Cron job is a periodic task
Whenever

Modify Clouldfile
1. Add whenever to Gemfile
   gem "whenever"
2. Run bundle
3. $ bundle exec wheneverize .
4. define cronjobs in config/schedule.rb

                          env :MAILTO, "email@example.com"
Background processing
Delayed_jobs gem is used for this task.
Set up one of your apps for delayed_jobs
Add it to your Gemfile
Add jobs*
Commit and push (deploy)



                   * https://github.com/collectiveidea/delayed_job/blob/master
Storing files
Kind of sharing files between instances and
deployments

For example
uploads/
Caching
Frontend caching using Varnish
Backend caching using Memcache.
  ● cache is cleared after every deploy.
Sending emails
Sending emails works out of the box
SPF record (trusted mails)
1 mail server IP
SSL Support
When using domain code-name.shellyapp.com
you get free SSL.

If you want own SSL, you will have to purchase
SSL certificate from any CA as well as private
IP from Shelly Cloud.
Websockets
You can run a separate thin server on any of
your servers that will handle websockets
traffic.

Create a websockets.ru file in the root
directory of your project. Use this file to
configure the application handling websockets
traffic.
Architecture
Supported Databases

PostgreSQL

MongoDB

Redis



        https://shellycloud.com/documentation/supported_databases
Shelly Console
You can use the shelly gem to run rails console
or IRB for rack applications.

Console is ran on random application server
with user privileges.

To run console, use shelly console
Price comparison / Small app
3 thin workers, 1 delayed_job, 1GB database

Heroku
$107(workers) + $15 (shared database) = $122 ~ €100

EngineYard
$90 (small instance, 1 CPU, 1.7GB of RAM) ~ €73
(no backups included)

Shelly Cloud
€40(1 large instance, 2 CPUs, 2GB of RAM) + €0.60 (1 GB DB storage) = €40.6
Price comparison / Medium app
10 workers, 3 delayed_job, 10GB database (dedicated)

Heroku
$431 (workers) + $250 dedicated database = $681 ~ €558

Shelly Cloud
€160 (4 large instances for workers, 2 GB RAM, 2 CPUs) + €40 (1 large instance
dedicated db) + €6 = €206
In total 10 GB of RAM, 10 virtual CPUs

EngineYard (Similar in case of RAM to shelly setup)
$444 (2 medium inst 3.75GB of RAM (each), 2 CPUs, 1 small 1 CPU, 1.7GB of
RAM),
$24 (storage and bandwidth) = $468 ~ €384
Let's do it in
practice


LIVE deployment on   Shelly Cloud
Questions?
Thank You



        Giedrius Rimkus
             Software Engineer
                    @giedriusr

More Related Content

What's hot

OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra SummitDon Marti
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraFormWesley Charles Blake
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionRemotty
 
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented applicationCloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented applicationCorley S.r.l.
 
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnCouch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnTrevor Roberts Jr.
 
Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)lestrrat
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker, Inc.
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from DockerJohn Griffith
 
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerRunning High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerSematext Group, Inc.
 
How to operate containerized OpenStack
How to operate containerized OpenStackHow to operate containerized OpenStack
How to operate containerized OpenStackNalee Jang
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Joshua Harlow
 
Docker Machine & Docker Swarm
Docker Machine & Docker SwarmDocker Machine & Docker Swarm
Docker Machine & Docker SwarmGuillermo Lucero
 
OpenStack Development Using devstack
OpenStack Development Using devstackOpenStack Development Using devstack
OpenStack Development Using devstackmestery
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackke4qqq
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupStefan Schimanski
 
CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015Brandon Philips
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyPuppet
 
CoreOS in a Nutshell
CoreOS in a NutshellCoreOS in a Nutshell
CoreOS in a NutshellCoreOS
 

What's hot (20)

OSv at Cassandra Summit
OSv at Cassandra SummitOSv at Cassandra Summit
OSv at Cassandra Summit
 
Automation with Packer and TerraForm
Automation with Packer and TerraFormAutomation with Packer and TerraForm
Automation with Packer and TerraForm
 
Amazon EC2 Container Service in Action
Amazon EC2 Container Service in ActionAmazon EC2 Container Service in Action
Amazon EC2 Container Service in Action
 
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented applicationCloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
CloudConf2017 - Deploy, Scale & Coordinate a microservice oriented application
 
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean WinnCouch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
Couch to OpenStack: Neutron (Quantum) - August 13, 2013 Featuring Sean Winn
 
Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)Kubernetes in 30 minutes (2017/03/10)
Kubernetes in 30 minutes (2017/03/10)
 
Docker Swarm 0.2.0
Docker Swarm 0.2.0Docker Swarm 0.2.0
Docker Swarm 0.2.0
 
Cloudinit
CloudinitCloudinit
Cloudinit
 
Consuming Cinder from Docker
Consuming Cinder from DockerConsuming Cinder from Docker
Consuming Cinder from Docker
 
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on DockerRunning High Performance & Fault-tolerant Elasticsearch Clusters on Docker
Running High Performance & Fault-tolerant Elasticsearch Clusters on Docker
 
How to operate containerized OpenStack
How to operate containerized OpenStackHow to operate containerized OpenStack
How to operate containerized OpenStack
 
Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]Cloud init and cloud provisioning [openstack summit vancouver]
Cloud init and cloud provisioning [openstack summit vancouver]
 
Docker Machine & Docker Swarm
Docker Machine & Docker SwarmDocker Machine & Docker Swarm
Docker Machine & Docker Swarm
 
OpenStack Development Using devstack
OpenStack Development Using devstackOpenStack Development Using devstack
OpenStack Development Using devstack
 
Infrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStackInfrastructure as code with Puppet and Apache CloudStack
Infrastructure as code with Puppet and Apache CloudStack
 
Docker up and running
Docker up and runningDocker up and running
Docker up and running
 
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes MeetupKubernetes Architecture and Introduction – Paris Kubernetes Meetup
Kubernetes Architecture and Introduction – Paris Kubernetes Meetup
 
CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015CoreOS + Kubernetes @ All Things Open 2015
CoreOS + Kubernetes @ All Things Open 2015
 
Automating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David NalleyAutomating CloudStack with Puppet - David Nalley
Automating CloudStack with Puppet - David Nalley
 
CoreOS in a Nutshell
CoreOS in a NutshellCoreOS in a Nutshell
CoreOS in a Nutshell
 

Similar to Painless ruby deployment on shelly cloud

Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureHabeeb Rahman
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardwayDave Pitts
 
[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
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725miguel dominguez
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725MortazaJohari
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Yevgeniy Brikman
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Cosimo Streppone
 
Build optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and DockerBuild optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and DockerDmytro Patkovskyi
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 applicationRoman Rodomansky
 
Shelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & ConsShelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & ConsGiedrius Rimkus
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker, Inc.
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdRichard Lister
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataInfluxData
 
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes][HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]Wong Hoi Sing Edison
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Jim Dowling
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to AnsibleCédric Delgehier
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevFelix Geisendörfer
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS MeetupLINAGORA
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...javier ramirez
 

Similar to Painless ruby deployment on shelly cloud (20)

Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled InfrastructureCloud meets Fog & Puppet A Story of Version Controlled Infrastructure
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
 
Postgres the hardway
Postgres the hardwayPostgres the hardway
Postgres the hardway
 
[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
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725Infrastructureascode slideshare-160331143725
Infrastructureascode slideshare-160331143725
 
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...Infrastructure as code: running microservices on AWS using Docker, Terraform,...
Infrastructure as code: running microservices on AWS using Docker, Terraform,...
 
Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013Puppet at Opera Sofware - PuppetCamp Oslo 2013
Puppet at Opera Sofware - PuppetCamp Oslo 2013
 
Build optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and DockerBuild optimization mechanisms in GitLab and Docker
Build optimization mechanisms in GitLab and Docker
 
Dockerizing a Symfony2 application
Dockerizing a Symfony2 applicationDockerizing a Symfony2 application
Dockerizing a Symfony2 application
 
Shelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & ConsShelly cloud & heroku & engineyard. Pros & Cons
Shelly cloud & heroku & engineyard. Pros & Cons
 
Docker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in ProductionDocker Online Meetup #3: Docker in Production
Docker Online Meetup #3: Docker in Production
 
CoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love SystemdCoreOS, or How I Learned to Stop Worrying and Love Systemd
CoreOS, or How I Learned to Stop Worrying and Love Systemd
 
Introduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxDataIntroduction to Docker and Monitoring with InfluxData
Introduction to Docker and Monitoring with InfluxData
 
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes][HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
[HKOSCon x COSCUP 2020][20200801][Ansible: From VM to Kubernetes]
 
Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning Building Hopsworks, a cloud-native managed feature store for machine learning
Building Hopsworks, a cloud-native managed feature store for machine learning
 
#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible#OktoCampus - Workshop : An introduction to Ansible
#OktoCampus - Workshop : An introduction to Ansible
 
Docker Overview
Docker OverviewDocker Overview
Docker Overview
 
Nodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredevNodejs a-practical-introduction-oredev
Nodejs a-practical-introduction-oredev
 
Advanced Node.JS Meetup
Advanced Node.JS MeetupAdvanced Node.JS Meetup
Advanced Node.JS Meetup
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 

More from Giedrius Rimkus

Write cross platform native apps in Ruby
Write cross platform native apps in RubyWrite cross platform native apps in Ruby
Write cross platform native apps in RubyGiedrius Rimkus
 
Single Founder. Everything is possible when you believe at what you do!
Single Founder. Everything is possible when you believe at what you do!Single Founder. Everything is possible when you believe at what you do!
Single Founder. Everything is possible when you believe at what you do!Giedrius Rimkus
 
What is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaWhat is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaGiedrius Rimkus
 

More from Giedrius Rimkus (6)

Write cross platform native apps in Ruby
Write cross platform native apps in RubyWrite cross platform native apps in Ruby
Write cross platform native apps in Ruby
 
Moving from Mandrill
Moving from MandrillMoving from Mandrill
Moving from Mandrill
 
Empowered productivity
Empowered productivityEmpowered productivity
Empowered productivity
 
DIRT RALLY
DIRT RALLYDIRT RALLY
DIRT RALLY
 
Single Founder. Everything is possible when you believe at what you do!
Single Founder. Everything is possible when you believe at what you do!Single Founder. Everything is possible when you believe at what you do!
Single Founder. Everything is possible when you believe at what you do!
 
What is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaWhat is Chef and how we use it at tripsta
What is Chef and how we use it at tripsta
 

Recently uploaded

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDGMarianaLemus7
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 

Recently uploaded (20)

costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
APIForce Zurich 5 April Automation LPDG
APIForce Zurich 5 April  Automation LPDGAPIForce Zurich 5 April  Automation LPDG
APIForce Zurich 5 April Automation LPDG
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 

Painless ruby deployment on shelly cloud

  • 1. Shelly Cloud Painless Ruby deployment Giedrius Rimkus 2012 July
  • 4. What Shelly Cloud is? Delivering platform as a service Deployments are done by pushing with git
  • 5. Example of git push giedrius@rubylt:~/Projects/store (master) $ git push gstore master Counting objects: 81, done. Delta compression using up to 4 threads. Compressing objects: 100% (72/72), done. Writing objects: 100% (81/81), 27.62 KiB, done. Total 81 (delta 6), reused 0 (delta 0) remote: remote: ---> Received push to cloud 'gstore' remote: ---> Checking Gemfile remote: ---> Push accepted remote: ---> Start your cloud using: `shelly start -- cloud gstore` remote: To git@git.shellycloud.com:gstore.git * [new branch] master -> master
  • 6. Aim Helping developers Developers focus on building application and not on deployment nor infrastructure
  • 7. Requirements - Ruby versions ● MRI Ruby (1.9.3) ● MRI Ruby (1.9.2) ● Ruby Enterprise Edition (1.8.7) - Bundler - "shelly-dependencies" gem (optional) - Rails 3.x support - Rails 2.3.x support - Rack-based apps - Gems with native extensions
  • 8. Shelly Cloud ○ Running Ruby applications ○ It doesn't have to be Rails application ○ Sinatra ○ or any other which is compatible with Rack interface full list of supported frameworks https://github.com/rack/rack#supported-web-frameworks
  • 9. Shelly Gem A tool for managing clouds on Shelly Cloud from command line.
  • 10. Cloudfile Your cloud management place You can edit settings of your Cloud by making changes to the Cloudfile, committing them to the git repository and pushing those changes to the shelly git remote.
  • 11. Features ○ Running periodic tasks ○ Background processing ○ Storing Files ○ Caching (frontend, backend) ○ Sending emails ○ SSL support ○ Websockets support
  • 12. Running periodic tasks Cron job is a periodic task Whenever Modify Clouldfile 1. Add whenever to Gemfile gem "whenever" 2. Run bundle 3. $ bundle exec wheneverize . 4. define cronjobs in config/schedule.rb env :MAILTO, "email@example.com"
  • 13. Background processing Delayed_jobs gem is used for this task. Set up one of your apps for delayed_jobs Add it to your Gemfile Add jobs* Commit and push (deploy) * https://github.com/collectiveidea/delayed_job/blob/master
  • 14. Storing files Kind of sharing files between instances and deployments For example uploads/
  • 15. Caching Frontend caching using Varnish Backend caching using Memcache. ● cache is cleared after every deploy.
  • 16. Sending emails Sending emails works out of the box SPF record (trusted mails) 1 mail server IP
  • 17. SSL Support When using domain code-name.shellyapp.com you get free SSL. If you want own SSL, you will have to purchase SSL certificate from any CA as well as private IP from Shelly Cloud.
  • 18. Websockets You can run a separate thin server on any of your servers that will handle websockets traffic. Create a websockets.ru file in the root directory of your project. Use this file to configure the application handling websockets traffic.
  • 20. Supported Databases PostgreSQL MongoDB Redis https://shellycloud.com/documentation/supported_databases
  • 21. Shelly Console You can use the shelly gem to run rails console or IRB for rack applications. Console is ran on random application server with user privileges. To run console, use shelly console
  • 22. Price comparison / Small app 3 thin workers, 1 delayed_job, 1GB database Heroku $107(workers) + $15 (shared database) = $122 ~ €100 EngineYard $90 (small instance, 1 CPU, 1.7GB of RAM) ~ €73 (no backups included) Shelly Cloud €40(1 large instance, 2 CPUs, 2GB of RAM) + €0.60 (1 GB DB storage) = €40.6
  • 23. Price comparison / Medium app 10 workers, 3 delayed_job, 10GB database (dedicated) Heroku $431 (workers) + $250 dedicated database = $681 ~ €558 Shelly Cloud €160 (4 large instances for workers, 2 GB RAM, 2 CPUs) + €40 (1 large instance dedicated db) + €6 = €206 In total 10 GB of RAM, 10 virtual CPUs EngineYard (Similar in case of RAM to shelly setup) $444 (2 medium inst 3.75GB of RAM (each), 2 CPUs, 1 small 1 CPU, 1.7GB of RAM), $24 (storage and bandwidth) = $468 ~ €384
  • 24. Let's do it in practice LIVE deployment on Shelly Cloud
  • 26. Thank You Giedrius Rimkus Software Engineer @giedriusr