using openshift paas
TRANSCRIPT
Using OpenShift Platform as a Service
Anuchit [email protected]
Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.
Agenda
● What is OpenShift ?● What is IaaS, PaaS, SaaS ?● Why use PasS ?● What's supported ?● How much it cost?● Getting start with OpenShift
What is OpenShift?
OpenShift is Red Hat's Cloud Computing Platform as a Service (PaaS) offering.
Code Deploy Enjoy
Kind of like Amazon, right? Nope
What is Infrastructure as a Services
● Network, Storage and Compute offered on-demand service
● Basically servers in the cloud● You are still on the hook to config and manage the
cloud & stack● Example : Amazon EC2
What is Platform as a Services
● It's an application platform● Basically, app runtime environment in the cloud● PaaS configures & manages the Cloud & stack for you● Example: OpenShift
What is Software as a Services
● It's an on-demand application● Nothing to install and configure● Example: Saleforce, Gmail
So, why should I use PaaS
● Realize the benefits of the cloud quickly● Let the PaaS configure, manage & scale the stack● Make deployment to the cloud easy● Focus on your app & users not the stack
What's supported ?
How much does it cost?
● Free 3 gears● 512 MB RAM and 1GB Storage instance● Need more resource just ask
Pricing*
What is gears?
A gear is a resource constrained container that runs one or more user-specified software stacks, also known as cartridges. Each gear has a limited amount of RAM and disk space.
Scale easy
Estimate the needs and costs
Getting start with OpenShift
Getting start with OpenShift
● Get an account at openshift.com● Create application● Code● Deploy
Using OpenShift to manage your applications in the cloud
Create an account
● Goto http://www.openshift.com● Sign up an account
Install client tools
● Ruby 1.8.7+● Git
$ gem install rhc
Client installation guide
Setup your keys and domain
$ rhc setup
Show your domain info
$ rhc domain show
List available cartridges
$ rhc cartridge list
Create your application
$ rhc app create <app_name> <cartridge>
eg: create app with PHP 5.3
$ rhc app create myapp php-5.3
Add cartridge to your app
$ rhc cartridge add -a <app_name> -c <cartridge>
eg: add MySQL cartridge
$ rhc cartridge add -a myapp -c mysql-5.1
Create scalable app
$ rhc app create -s myapp php-5.3
the "-s" is for scale, some cartridge may not scale you should check in the web console.
Scale configure
OpenShift provide automatic scaling but you can use a manual scale to fit for need.
$ rhc cartridge scale <cartridge> -a <app_name> \ --min <min_gears> --max <max_gears>
Deploying your application
Each app has it own git repository. You can clone, merge, push or pull your code from the repository. If you're new to Git try this.
Making change to your app
If you create an application from the web console, you'll need to tell Git to clone the repository.
$ git clone <git_url>
Making change to your app
Once you make changes, you'll need to 'add' and 'commit' those changes. Git requires that each commit have a message to describe it.
$ git add .$ git commit -m "check in an application"
Making change to your app
Finally, you're ready to send your changes to your application
$ git push
Learn more about using Git
Domain alias
You can specify meaningful DNS names for your OpenShift applications so that you can use your own DNS entries.
$ rhc alias add <app_name> <your_domain>
Working with GitHub
You can merge your project with GitHub by add the remote repository then pull, merge code to any repository.
$ git remote add github [email protected]:user/repo.git
Thank You