Using OpenShift PaaS

32
Using OpenShift Platform as a Service Anuchit Chalothorn [email protected] Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License .

Transcript of Using OpenShift PaaS

Page 1: Using OpenShift PaaS

Using OpenShift Platform as a Service

Anuchit [email protected]

Licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.

Page 2: Using OpenShift PaaS

Agenda

● What is OpenShift ?● What is IaaS, PaaS, SaaS ?● Why use PasS ?● What's supported ?● How much it cost?● Getting start with OpenShift

Page 3: Using OpenShift PaaS

What is OpenShift?

OpenShift is Red Hat's Cloud Computing Platform as a Service (PaaS) offering.

Code Deploy Enjoy

Page 4: Using OpenShift PaaS

Kind of like Amazon, right? Nope

Page 5: Using OpenShift PaaS

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

Page 6: Using OpenShift PaaS

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

Page 7: Using OpenShift PaaS

What is Software as a Services

● It's an on-demand application● Nothing to install and configure● Example: Saleforce, Gmail

Page 8: Using OpenShift PaaS

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

Page 9: Using OpenShift PaaS

What's supported ?

Page 10: Using OpenShift PaaS

How much does it cost?

● Free 3 gears● 512 MB RAM and 1GB Storage instance● Need more resource just ask

Page 11: Using OpenShift PaaS

Pricing*

Page 12: Using OpenShift PaaS

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.

Page 13: Using OpenShift PaaS

Scale easy

Page 14: Using OpenShift PaaS

Estimate the needs and costs

Page 15: Using OpenShift PaaS

Getting start with OpenShift

Page 16: Using OpenShift PaaS

Getting start with OpenShift

● Get an account at openshift.com● Create application● Code● Deploy

Using OpenShift to manage your applications in the cloud

Page 17: Using OpenShift PaaS

Create an account

● Goto http://www.openshift.com● Sign up an account

Page 18: Using OpenShift PaaS

Install client tools

● Ruby 1.8.7+● Git

$ gem install rhc

Client installation guide

Page 19: Using OpenShift PaaS

Setup your keys and domain

$ rhc setup

Page 20: Using OpenShift PaaS

Show your domain info

$ rhc domain show

Page 21: Using OpenShift PaaS

List available cartridges

$ rhc cartridge list

Page 22: Using OpenShift PaaS

Create your application

$ rhc app create <app_name> <cartridge>

eg: create app with PHP 5.3

$ rhc app create myapp php-5.3

Page 23: Using OpenShift PaaS

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

Page 24: Using OpenShift PaaS

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.

Page 25: Using OpenShift PaaS

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>

Page 26: Using OpenShift PaaS

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.

Page 27: Using OpenShift PaaS

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>

Page 28: Using OpenShift PaaS

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"

Page 29: Using OpenShift PaaS

Making change to your app

Finally, you're ready to send your changes to your application

$ git push

Learn more about using Git

Page 30: Using OpenShift PaaS

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>

Page 31: Using OpenShift PaaS

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

Page 32: Using OpenShift PaaS

Thank You