openshift online 2.0 user guide en us 7

Upload: mandar-shastrakar

Post on 03-Jun-2018

225 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    1/89

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    2/89

    OpenShift Online 1 User Guide

    Managing Applications in the Cloud with OpenShift OnlineEdition 1.0

    Red Hat OpenShift Documentation Team

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    3/89

    Legal Notice

    Copyright © 2014 Red Hat.

    This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 UnportedLicense . If you distribute this document, or a modified version of it, you must provide attribution to RedHat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be

    removed.Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section4d of CC-BY-SA to the fullest extent permitted by applicable law.

    Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, OpenShift, theInfinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and othercountries.

    Linux ® is the registered trademark of Linus Torvalds in the United States and other countries.

    Java ® is a registered trademark of Oracle and/or its affiliates.

    XFS ® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United Statesand/or other countries.

    MySQL ® is a registered trademark of MySQL AB in the United States, the European Union and othercountries.

    Node.js ® is an official trademark of Joyent. Red Hat Software Collections is not formally related to orendorsed by the official Joyent Node.js open source or commercial project.

    All other trademarks are the property of their respective owners.

    Abstract

    The User Guide helps developers and administrators set up and configure a workstation to develop anddeploy applications in an OpenShift Online cloud environment with a Command Line Interface (CLI),more commonly known as the Client Tools. This guide provides detailed instructions, and examples

    where applicable, to help developers and administrators: Create and manage domains and SSLcertificates Develop, build, and deploy applications Manage applications and cartridges Monitor andmanage application storage and resources

    http://creativecommons.org/licenses/by-sa/3.0/

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    4/89

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Table of Contents

    Preface1. D ocument Conve ntions

    1.1. Typographic Conventions1.2. P ull-quote Convention s1.3. Notes and Warning s

    2. Getting Help2.1. Do You Need Help ?2.2. We Need Feedback!

    Chapter 1. Introduction to OpenShift Online1.1. Ba sic Architecture1.2. Su bscription Plans1.3. User Interfaces

    1.3.1. Management Console

    1.3.2 . Client Tools1.4. Wh at's New in Current Rele ase

    Chapter 2. Getting Started2.1. Op enShift Account2.2. Cli ent Tools2.3. B asic Administration

    2. 3.1. Viewing Account In formation2.3.2. Ending Current Session

    Chapte r 3. Authenticatio n3.1. A uthorization Tokens

    3.1. 1. Introduction to Authorization Tokens3.1.2. Creating Authorization Tokens3.1. 3. Viewing Authorization To kens3.1.4. Deleting Authorization Tokens

    3.2. S SH Keys3.2. 1. Introduction to SSH Keys3.2. 2. Generating Ke ys Manually3.2.3. Adding a Key

    3.2 .3.1. Adding a Spec ific SSH Key Type3.2. 4. Viewing All Public Keys3.2.5 . Viewing a Specific Public Key3.2.6 . Deleting a Key3.2.7. Resolving Authentication Issues

    3.2.7.1. Resolving Issues with Interactive Setup Wizard

    Chapter 4. Domains4.1. Introduction to Domains4.2. Domain Management

    4.2.1. Creating a Domain4.2.2. Listing Available Domains4.2.3. Viewing a Domain4.2.4. Renaming a Domain4.2.5. Deleting a Domain

    Chapter 5. Teams5.1. Introduction to Teams

    66678889

    1010101111

    1213

    141414141414

    1616

    1616171718181819191920202020

    2222222222232424

    2626

    Table of Contents

    1

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    5/89

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Chapter 6. Domain Membership6.1. Introduction to Domain Membership6.2. Managing Domain Membership

    6.2.1. Adding a Member6.2.2. Changing Member Role6.2.3. Listing Members of a Domain6.2.4. Listing Members of an Application6.2.5. Removing a Member

    Chapter 7. Custom Domains and SSL Certificates7.1. Introduction to Custom Domains and SSL Certificates7.2. Managing Custom Domain Names7.3. Managing Custom SSL Certificates

    Chapter 8. Cartridges8.1. Introduction to Cartridges

    8.1.1. Web Framework Cartridges8.1.2. Add-on Cartridges

    8.1.3. Downloadable CartridgesChapter 9. Applications

    9.1. Introduction to Applications9.1.1. Application Life Cycle9.1.2. Scalable and Non-Scalable Applications

    Chapter 10. Application Management10.1. General Information10.2. Creating an Application10.3. Cloning an Existing Application10.4. Cloning the Remote Application Repository

    10.5. Viewing Applications for a User10.6. Scaling an Application Manually10.7. Application Management Commands10.8. Managing Applications in a Secure Shell Environment

    10.8.1. Introduction to Secure Shell Environment10.8.2. Accessing an Application10.8.3. Accessing a Specific Gear10.8.4. Accessing a Database Cartridge

    10.9. Monitoring Gear and Cartridge Status with Watchman10.10. Embedding 10gen MMS Agent10.11. Scheduling Cron Jobs10.12. Binding Applications to Ports

    10.12.1. Configuring WebSocket Ports10.12.2. Configuring Email Ports

    10.13. Port Forwarding10.13.1. Introduction to Port Forwarding10.13.2. Application Port Forwarding10.13.3. Gear Port Forwarding10.13.4. Port Forwarding on Mac OS X

    10.14. Deleting an Application

    Chapter 11. Cartridge Management11.1. Viewing Available Cartridges

    11.2. Adding a Cartridge to an Application11.3. Viewing Cartridges for an Application11.4. Cartridge Management Commands

    2727272727282929

    30303031

    32323232

    3335353536

    3838384243

    4344454646474849505151525454545455565657

    5959

    596060

    OpenShift Online 1 User Guide

    2

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    6/89

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

    Chapter 12. Build and Deployment12.1. Introduction to Deployment12.2. Preparing an Application for Deployment12.3. Deployment Mechanisms

    12.3.1. Automatic Deployment12.3.1.1. Configuring Automatic Deployment

    12.3.2. Manual Deployment12.3.2.1. Configuring Manual Deployment12.3.2.2. Preserving Deployments12.3.2.3. Deploying from a Git Branch12.3.2.4. Deploying from a Snapshot12.3.2.5. Viewing Previous Deployments12.3.2.6. Activating a Previous Deployment

    12.4. Action Hooks12.4.1. Introduction to Action Hooks12.4.2. Cartridge Action Hooks12.4.3. Build and Deployment Action Hooks12.4.4. Scaling Action Hooks

    12.5. Environment Variables12.5.1. Introduction to Environment Variables12.5.2. Informational Environment Variables12.5.3. Directory Environment Variables12.5.4. Logging Environment Variables12.5.5. Database Environment Variables12.5.6. Library Environment Variables12.5.7. Jenkins Environment Variables12.5.8. Gear Environment Variables12.5.9. JBoss Environment Variables12.5.10. Ruby Environment Variables

    12.5.11. Python Environment Variables12.5.12. Custom Environment Variables12.6. Hot Deployment

    12.6.1. Introduction to Hot Deployment12.6.2. Hot Deployment Build Details12.6.3. Enabling and Disabling Hot Deployment

    12.7. Jenkins Continuous Integration12.7.1. Introduction to Jenkins12.7.2. Configuring Jenkins

    12.7.2.1. Configuring Jenkins with New Applications12.7.2.2. Configuring Jenkins with Existing Applications

    12.7.3. Building Applications with Jenkins12.7.3.1. Building Custom Applications

    Chapter 13. Gear Storage and Disk Space Management13.1. Introduction to Gear Storage and Disk Space13.2. Viewing Gear Storage13.3. Adding Gear Storage13.4. Setting Gear Storage13.5. Removing Gear Storage13.6. Tidying an Application

    Chapter 14. Application Backup and Restoration with Snapshots14.1. Introduction to Snapshots14.2. Creating an Application Snapshot14.3. Restoring from an Application Snapshot14.4. Migrating an Application to Another Gear

    626262636363636363646464656565656666

    6767676768686969707071

    72727272737474747575757677

    78787879798080

    8282828283

    Table of Contents

    3

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    7/89

    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Revision History 85

    OpenShift Online 1 User Guide

    4

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    8/89

    Table of Contents

    5

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    9/89

    Preface

    1. Document ConventionsThis manual uses several conventions to highlight certain words and phrases and draw attention to

    specific pieces of information.

    In PDF and paper editions, this manual uses typefaces drawn from the Liberation Fonts set. TheLiberation Fonts set is also used in HTML editions if the set is installed on your system. If not, alternativebut equivalent typefaces are displayed. Note: Red Hat Enterprise Linux 5 and later include the LiberationFonts set by default.

    1.1. Typographic ConventionsFour typographic conventions are used to call attention to specific words and phrases. Theseconventions, and the circumstances they apply to, are as follows.

    Mono-spaced Bold

    Used to highlight system input, including shell commands, file names and paths. Also used to highlightkeys and key combinations. For example:

    To see the contents of the file my_next_bestselling_novel in your current workingdirectory, enter the cat my_next_bestselling_novel command at the shell promptand press Enter to execute the command.

    The above includes a file name, a shell command and a key, all presented in mono-spaced bold and alldistinguishable thanks to context.

    Key combinations can be distinguished from an individual key by the plus sign that connects each part ofa key combination. For example:

    Press Enter to execute the command.

    Press Ctrl +Alt +F2 to switch to a virtual terminal.

    The first example highlights a particular key to press. The second example highlights a key combination:a set of three keys pressed simultaneously.

    If source code is discussed, class names, methods, functions, variable names and returned valuesmentioned within a paragraph will be presented as above, in mono-spaced bold . For example:

    File-related classes include filesystem for file systems, file for files, and dir fordirectories. Each class has its own associated set of permissions.

    Proportional Bold

    This denotes words or phrases encountered on a system, including application names; dialog-box text;labeled buttons; check-box and radio-button labels; menu titles and submenu titles. For example:

    Choose System → Preferences → Mouse from the main menu bar to launch MousePreferences . In the Buttons tab, select the Left-handed mouse check box and click

    Close to switch the primary mouse button from the left to the right (making the mousesuitable for use in the left hand).

    To insert a special character into a gedit file, choose Applications → Accessories →

    OpenShift Online 1 User Guide

    6

    https://fedorahosted.org/liberation-fonts/

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    10/89

    Character Map from the main menu bar. Next, choose Search → Find… from theCharacter Map menu bar, type the name of the character in the Search field and clickNext . The character you sought will be highlighted in the Character Table . Double-clickthis highlighted character to place it in the Text to copy field and then click the Copybutton. Now switch back to your document and choose Edit → Paste from the gedit menubar.

    The above text includes application names; system-wide menu names and items; application-specificmenu names; and buttons and text found within a GUI interface, all presented in proportional bold and alldistinguishable by context.

    Mono-spaced Bold Italic or Proportional Bold Italic

    Whether mono-spaced bold or proportional bold, the addition of italics indicates replaceable or variabletext. Italics denotes text you do not input literally or displayed text that changes depending oncircumstance. For example:

    To connect to a remote machine using ssh, type ssh username @domain.name at a shellprompt. If the remote machine is example.com and your username on that machine is

    john, type ssh john@ example.com .

    The mount -o remount file-system command remounts the named file system. Forexample, to remount the /home file system, the command is mount -o remount /home .

    To see the version of a currently installed package, use the rpm -q package command. It will return a result as follows: package-version-release .

    Note the words in bold italics above: username, domain.name, file-system, package, version andrelease. Each word is a placeholder, either for text you enter when issuing a command or for text

    displayed by the system.

    Aside from standard usage for presenting the title of a work, italics denotes the first use of a new andimportant term. For example:

    Publican is a DocBook publishing system.

    1.2. Pull-quote ConventionsTerminal output and source code listings are set off visually from the surrounding text.

    Output sent to a terminal is set in mono-spaced roman and presented thus:

    books Desktop documentation drafts mss photos stuff svnbooks_tests Desktop1 downloads im ages notes scripts svgs

    Source-code listings are also set in mono-spaced roman but add syntax highlighting as follows:

    Preface

    7

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    11/89

    package org. jboss . book . jca . ex1 ;

    import javax.naming.InitialContext;

    public class ExClient{ public static void main (String args[])

    throws Exception { InitialContext iniCtx = new InitialContext(); Object ref = iniCtx. lookup ( "EchoBean" ); EchoHome home = (EchoHome) ref; Echo echo = home. create ();

    System. out . println ( "Created Echo" );

    System. out . println ( "Echo.echo('Hello') = " + echo. echo ( "Hello" )); }}

    1.3. Notes and WarningsFinally, we use three visual styles to draw attention to information that might otherwise be overlooked.

    Note

    Notes are tips, shortcuts or alternative approaches to the task at hand. Ignoring a note shouldhave no negative consequences, but you might miss out on a trick that makes your life easier.

    Important

    Important boxes detail things that are easily missed: configuration changes that only apply to thecurrent session, or services that need restarting before an update will apply. Ignoring a boxlabeled “Important” will not cause data loss but may cause irritation and frustration.

    Warning

    Warnings should not be ignored. Ignoring warnings will most likely cause data loss.

    2. Getting Help

    2.1. Do You Need Help?If you experience difficulty with a procedure or other information described in this documentation, visit theRed Hat Customer Portal at http://access.redhat.com where you can:

    search or browse through a knowledgebase of technical support articles about Red Hat productssubmit a support case to Red Hat Global Support Services (GSS)

    access other product documentation

    OpenShift Online 1 User Guide

    8

    http://access.redhat.com/

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    12/89

    You can also access the OpenShift web site at https://openshift.redhat.com/ to find blogs, FAQs, forums,and other sources of information.

    Red Hat also hosts a large number of electronic mailing lists for discussion of Red Hat software andtechnology. You can find a list of publicly available mailing lists athttps://www.redhat.com/mailman/listinfo . Click the name of any mailing list to subscribe to that list or to

    access the list archives.

    2.2. We Need Feedback!If you find a typographical or any other error in this manual, or if you have thought of a way to make thismanual better, we would love to hear from you! Please submit a report in Bugzilla:http://bugzilla.redhat.com/ against the product OpenShift Online .

    When submitting a bug report, be sure to mention the manual's identifier: Docs User Guide

    If you have a suggestion for improving the documentation, try to be as specific as possible whendescribing it. If you have found an error, please include the section number and some of the surrounding

    text so we can find it easily.

    Preface

    9

    https://bugzilla.redhat.com/enter_bug.cgi?product=OpenShift+Onlinehttp://bugzilla.redhat.com/https://www.redhat.com/mailman/listinfohttps://openshift.redhat.com/

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    13/89

    Chapter 1. Introduction to OpenShift OnlineOpenShift Online by Red Hat is a Platform as a Service (PaaS) provides developers and IT organizationsan auto scaling cloud application platform for deploying new applications on secure scalable resources

    with minimal configuration and management overhead. OpenShift Online supports a wide selection ofprogramming languages and frameworks, such as Java, Ruby, and PHP. Integrated developer tools,such as Eclipse integration, JBoss Developer Studio, and Jenkins support the application life cycle.

    Built on Red Hat Enterprise Linux, OpenShift Online provides a secure and scalable multi-tenantoperating system for todays enterprise-class applications while providing integrated application runtimesand libraries.

    Report a bug

    1.1. Basic ArchitectureOpenShift Online provides disk space, CPU resources, memory, network connectivity, and an Apache orJBoss server to create, deploy, and manage applications in the cloud. For most types of applications,OpenShift Online creates a file system layout that you can use as a template for building an application.It also generates a limited Domain Name System (DNS) so your application is accessible online.

    The following table describes the basic system components of OpenShift Online.

    Table 1.1. Basic Components

    System Component Description

    Gears Resource-constrained containers for application code where cartridgesrun. Gears determine the amount of RAM and disk space available to acartridge.

    Cartridges Cartridges provide the functionality to run applications. Numerouscartridges are currently available to support languages such as Perl,PHP, and Ruby, as well as many database cartridges, such asPostgreSQL and MySQL.

    The following gear sizes are available with OpenShift Online:

    Small gears provide 512MB of RAM, 100MB of swap space, and 1GB of disk space

    Medium gears provide 1GB of RAM, 100MB of swap space, and 1GB of disk space

    Large gears provide 2GB of RAM, 100MB of swap space, and 1GB of disk space

    By default, there are three small gears available with a total of 1.5GB of RAM and 3GB of disk space.OpenShift Online can assign these three gears to a single application and its cartridges (Cron, MySQL,etc.), use each gear for a separate application, or use the gears for scaling an application.

    Report a bug

    1.2. Subscription PlansCurrently there are three subscription plans available for OpenShift Online: Free, Bronze, and Silver. Thefollowing table describes the features of each plan.

    OpenShift Online 1 User Guide

    10

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+24563-592563+%5BLatest%5D&comment=Title%3A+Basic+Architecture%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=24563-592563+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+IDs%3A%0A24579-629315+%5BLatest%5D&comment=Title%3A+Introduction+to+OpenShift+Online%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    14/89

    Table 1.2. Subscription Plans

    Feature Free Plan Bronze Plan Silver Plan

    Free Gears 3 small gears 3 small gears 3 small gears

    Maximum Gears 3 small gears 16 small, medium, orlarge gears

    16 small, medium, orlarge gears

    Available Gear Sizes Small Small, medium, andlarge

    Small, medium, andlarge

    Storage 1GB per gear 1GB per gear Up to 6GB per gear - noextra cost

    SSL Shared Shared and customdomains

    For custom domains

    Auto Scaling Limited to 3 gears Up to 16 gears Up to 16 gears

    JBoss EAP with Java EE6Full Profile

    Only on small gears On small, medium, andlarge gears

    On small, medium, andlarge gears

    Support Community Community Red Hat Professional

    Visit https://www.openshift.com/ for more information on each subscription plan.

    Report a bug

    1.3. User InterfacesThere are two mechanisms available for interacting with OpenShift Online: the Management Consoleand the command line interface (CLI), referred to as the Client Tools.

    Report a bug

    1.3.1. Management ConsoleThe OpenShift Online Management Console is a graphical interface accessed with a web browser athttps://www.openshift.com/ .

    The Management Console is best suited for:

    Setting up, administering and managing accounts

    Launching new applications

    Managing and monitoring applications

    The following screenshot shows the home page of the Management Console when you first log into youraccount. Each tab across the top navigation bar provides further functionality to help you manage youraccount, applications, and more.

    Chapter 1. Introduction to OpenShift Online

    11

    https://www.openshift.com/https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+IDs%3A%0A24597-592563+%5BLatest%5D&comment=Title%3A+User+Interfaces%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+24580-607997+%5BLatest%5D&comment=Title%3A+Subscription+Plans%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=24580-607997+03+Mar+2014+10%3A44+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://www.openshift.com/https://access.redhat.com/site/support/offerings/openshift/

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    15/89

    Figure 1.1. Management Console

    The following table provides a brief description of the different pages and settings available in theManagement Console.

    Page Description

    Applications View and manage applications and cartridges. If there are no applications,you can create new applications from this page.

    Settings View and manage SSH keys, domains, and account authorizations.

    Help Access to KBase articles, community forums, tutorials, and other communityresources. A wide variety of resources are available for diagnosing andresolving issues with your account or your applications.

    My Account View and manage account information, including account upgrades. Thispage shows account details, subscription plan, and account usage. Red Hattechnical support is available from here depending on the plan subscription.

    Note that the Management Console currently provides limited functionality. Therefore, most of theinstructions in this guide are for the client tools. However, tasks that can be performed in theManagement Console are highlighted accordingly in their respective sections.

    An OpenShift Online user account is required for creating and managing applications within a uniquenamespace. This guide assumes a user account is already set up and configured.

    Report a bug

    1.3.2. Client ToolsThe client tools are used to manage an OpenShift Online environment using a command line interface,and provide features that are not currently available in the Management Console.

    The client tools are best suited for:

    Coding

    Debugging

    OpenShift Online 1 User Guide

    12

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26241-592644+%5BLatest%5D&comment=Title%3A+Management+Console%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26241-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    16/89

    Advanced application management

    For example, although you can create an application using the Management Console, the applicationmust be cloned to your workstation to make any code changes, and then redeployed to the remoteserver using the client tools.

    Note

    The rhc package found in the OpenShift Online client tools channel is based on the Red HatEnterprise Linux 6 RPM version of the client tools, and not the Ruby gem version, which isupdated more frequently. Therefore, some updated features may be temporarily only available forthe Ruby gem version. See the OpenShift Online Client Tools Installation Guide athttps://access.redhat.com/site/documentation to install the latest Ruby gem version of the clienttools and get all available features.

    Report a bug

    1.4. What's New in Current ReleaseFor a complete list of all the new features available in the current release of OpenShift Online, see thecurrent edition of OpenShift Online Release Notes at https://access.redhat.com/site/documentation .

    Report a bug

    Chapter 1. Introduction to OpenShift Online

    13

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26299-592645+%5BLatest%5D&comment=Title%3A+What%27s+New+in+Current+Release%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26299-592645+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentationhttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26265-592648+%5BLatest%5D&comment=Title%3A+Client+Tools%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26265-592648+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentation

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    17/89

    Chapter 2. Getting Started

    2.1. OpenShift AccountBefore you can develop OpenShift Online applications, you must register for an OpenShift Online

    account at https://www.openshift.com/ . During registration you are provided an opportunity to select asubscription plan that suits your requirements. This guide assumes you already have an active OpenShiftOnline account.

    Note

    Some features described in this guide are only available with a paid subscription plan.

    Report a bug

    2.2. Client ToolsAs mentioned previously, the client tools provide access to advanced management features currently notavailable in the Management Console. Therefore, most of the instructions provided in this guide assumethat the client tools are already installed and configured on your workstation.

    See the Client Tools Installation Guide at https://access.redhat.com/site/documentation for moreinformation on how to install the client tools.

    Report a bug

    2.3. Basic Administration

    2.3.1. Viewing Account InformationView basic information for an account with the following command:

    $ rhc account

    Example 2.1. Viewing Account Information

    $ rhc accountLogin User@example.com----------------------------------------------------- ID: 52424geb2587c836b106001b Gears Used: 10 Gears Allowed: 16 Dom ains Allowed: 3 Allowed Gear Sizes: small SSL Certificates: yes

    Report a bug

    2.3.2. Ending Current Session

    OpenShift Online 1 User Guide

    14

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26268-592648+%5BLatest%5D&comment=Title%3A+Viewing+Account+Information%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26268-592648+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+24548-592561+%5BLatest%5D&comment=Title%3A+Client+Tools%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=24548-592561+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentationhttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+24564-592563+%5BLatest%5D&comment=Title%3A+OpenShift+Account%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=24564-592563+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://www.openshift.com/

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    18/89

    End the current session with the remote server and remove all local session files with the followingcommand:

    $ rhc logout

    Report a bug

    Chapter 2. Getting Started

    15

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26307-592649+%5BLatest%5D&comment=Title%3A+Ending+Current+Session%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26307-592649+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    19/89

    Chapter 3. Authentication

    3.1. Authorization Tokens

    3.1.1. Introduction to Authorization TokensAn authorization token is a secret value that is used to automatically log in to an OpenShift Onlineaccount without entering login information each time. A token is also used to grant another user full orpartial access to an account, determined by the scope of the token. The following table describes thedifferent types of scopes available with authorization tokens.

    Table 3.1. Authorization Token Scopes

    Scope Description Validity

    session Access to all API functions against an account. 1 day

    read Read-only access to account resources, but cannot viewauthorization tokens.

    1 month

    userinfo Access to login name, unique id, and user capabilities. 1 month

    When the client tools are installed and the rhc setup command is initially run to configure the clienttools, the setup wizard prompts you to create an authorization token. If you answer YES, the wizardcreates a session token in the ~/.openshift directory. With this token, all client tool commands can berun without entering your login credentials each time. When the token expires you are automaticallyprompted to reenter login information to renew the existing token. See the Client Tools Installation Guideat https://access.redhat.com/site/documentation for more information on installing and configuring theclient tools.

    If an authorization token was not created when the client tools were installed, run the setup wizard again with the rhc setup command to create one.

    If an existing authorization token is no longer required and you do not wish to be prompted for tokenrenewal, run the rhc logout command to delete the token.

    Report a bug

    3.1.2. Creating Authorization TokensCreate a new authorization token with the following command:

    $ rhc authori zation add --scopes Scope --note Name

    Specify the scope for the token with the --scopes option, and a name for the token with the --noteoption.

    OpenShift Online 1 User Guide

    16

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26222-592644+%5BLatest%5D&comment=Title%3A+Introduction+to+Authorization+Tokens%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26222-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentation

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    20/89

    Example 3.1. Creating an Authorization Token

    rhc authorizatio n add --scopes session --note My_To kenAdding authorization ... done

    My_token

    -------- Token: 787a57211d42f251204136b05d490038830d9b7057f54f816c2a9fcd0c8333b8 Scopes: session Created: 4:40 PM Expires In: about 1 day

    After creating a new authorization token, use the --token token_string global option to run rhccommands as the user associated with the authorization token that was provided.

    Report a bug

    3.1.3. Viewing Authorization TokensView the tokens associated with your account with the following command:

    $ rhc authorization list

    Example 3.2. Viewing Authorization Tokens

    $ rhc authorization listMy_token--------

    Token: 787a57211d42f251204136b05d490038830d9b7057f54f816c2a9fcd0c8333b8 Scopes: session Created: 4:40 PM Expires In: about 23 hours

    RHC/1.8.0 (from laptop.example.com on x86_64-linux)--------------------------------------------------- Token: 28f6e375dc7ea57b0dcabb3850d08ee9bc023f7df5dbfa4958afe7ad71d33e37 Scopes: session Created: 12:58 PM Expires In: about 19 hours

    Report a bug

    3.1.4. Deleting Authorization TokensDelete authorization tokens when they are no longer required, or to end access to your account by otherusers:

    Delete Specific Authorization Tokens

    Delete one or more tokens with the following command, separating multiple tokens with commas:

    $ rhc authorizatio n delete token_1, token_2

    Delete All Authorization Tokens

    Chapter 3. Authentication

    17

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26255-592646+%5BLatest%5D&comment=Title%3A+Viewing+Authorization+Tokens%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26255-592646+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26267-592648+%5BLatest%5D&comment=Title%3A+Creating+Authorization+Tokens%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26267-592648+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    21/89

    Delete all tokens associated with your account with the following command:

    $ rhc authorizatio n delete-all

    Report a bug

    3.2. SSH Keys

    3.2.1. Introduction to SSH KeysOpenShift Online uses the Secure Shell (SSH) network protocol to authenticate account credentials tothe OpenShift Online servers for secure communication, and supports both RSA and DSA keys for SSHauthentication. This section describes how authentication with OpenShift Online works, and providesinformation on how to manage SSH keys for user accounts.

    Successful authentication occurs when the public SSH key on your computer matches the public key that

    has been uploaded to the OpenShift Online server. When the client tools are initially configured, theinteractive setup wizard generates a new pair of SSH keys in the default .ssh folder of your homedirectory. The SSH key pair consists of the public key, id_rsa.pub , and the private key, id_rsa . Aspart of the initial configuration, you have the option of automatically uploading the public key,id_rsa.pub , to the OpenShift Online server. See the OpenShift Online Client Tools Installation Guide athttps://access.redhat.com/site/documentation for more information on how to configure the client tools.

    The following table shows the types of SSH keys supported with OpenShift Online.

    Table 3.2. Supported SSH Keys

    ssh-rsa

    [email protected]

    [email protected]

    [email protected]

    [email protected]

    [email protected]

    [email protected]

    [email protected]

    ecdsa-sha2-nistp256

    ecdsa-sha2-nistp384ecdsa-sha2-nistp521

    Report a bug

    3.2.2. Generating Keys ManuallyThe following instructions describe how to generate a new pair of RSA or DSA keys.

    Procedure 3.1. To Generate SSH Keys Manually:

    1. Run the following command to generate a pair of keys, replacing KeyType with the type of key togenerate:

    OpenShift Online 1 User Guide

    18

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26164-592642+%5BLatest%5D&comment=Title%3A+Introduction+to+SSH+Keys%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26164-592642+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentationhttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26278-592648+%5BLatest%5D&comment=Title%3A+Deleting+Authorization+Tokens%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26278-592648+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    22/89

    $ ssh-keygen -t KeyType

    2. Press Enter when prompted to save the key file in the default location:

    ...Generating public/private rsa key pair.

    Enter file in which to save the key (/home/username/.ssh/id_rsa):/home/ username /.ssh/id_rsa

    Note

    Red Hat recommends to save all SSH keys in the default location. If an id_rsa file alreadyexists, rename the new SSH key file to avoid overwriting the existing one.

    3. Enter a passphrase or leave blank when prompted, then press Enter :

    Enter passphrase (empty for no passphrase):Enter same passphrase again:Your identification has been saved in /home/ username /.ssh/id_rsaYour public key has been saved in /home/ username /.ssh/id_rsa.pub....

    Report a bug

    3.2.3. Adding a KeyOnce an SSH key has been generated, add the key by uploading it to the remote server with the

    following command, replacing KeyName and KeyPath with the name and path of the key to upload:

    $ rhc sshkey add KeyName KeyPath

    Report a bug

    3.2.3.1. Adding a Specific SSH Key Type

    After an SSH key is generated, rather than uploading the key file, add the contents of the key file directlyto the remote server with the following command:

    $ rhc sshkey add KeyName --type KeyType --content KeyContent

    An SSH key is a long string of alphanumeric characters.

    Report a bug

    3.2.4. Viewing All Public KeysView a list of all public keys associated with an account with the following command:

    $ rhc sshkey li st

    Chapter 3. Authentication

    19

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26203-592643+%5BLatest%5D&comment=Title%3A+Adding+a+Specific+SSH+Key+Type%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26203-592643+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+IDs%3A%0A26170-592642+%5BLatest%5D&comment=Title%3A+Adding+a+Key%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26133-592639+%5BLatest%5D&comment=Title%3A+Generating+Keys+Manually%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26133-592639+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    23/89

    Example 3.3. Viewing All Public Keys

    $ rhc sshkey li stlibra (type: ssh-rsa)--------------------- Fingerprint: 43:f5:29:ad:9f:b8:b3:a6:e7:88:c9:7f:4c:a9:0c:ad

    winKey (type: ssh-rsa)---------------------- Fingerprint: 0c:16:81:e3:51:eb:12:90:f6:03:80:g2:a2:10:78:14

    default (type: ssh-rsa)----------------------- Fingerprint: 43:f8:93:re:9f:a3:a8:f4:f3:34:g8:3d:1g:d8:3c:as Available: true

    You have 3 SSH keys associated with your account.

    Report a bug

    3.2.5. Viewing a Specific Public KeyView details of a specific key with the following command, specifying the name of the key:

    $ rhc sshkey show KeyName

    Report a bug

    3.2.6. Deleting a KeyDelete an existing public key from the remote server with the following command:

    $ rhc sshkey remove KeyName

    Report a bug

    3.2.7. Resolving Authentication IssuesOccasionally, a local public key might not match the public key stored on the OpenShift Online remoteserver, or the matching key might not be found on the local file system. This can cause connectionissues, or the SSH key authentication process can fail, in which case a new pair of SSH keys must begenerated. If you are having problems authenticating, generate a new pair of SSH keys in one of two

    ways:

    Use the interactive setup wizard (recommended)

    Manually generate and add SSH keys

    Report a bug

    3.2.7.1. Resolving Issues with Interactive Setup Wizard

    Red Hat recommends resolving authentication issues with the interactive setup wizard to generate a new

    pair of SSH keys. The interactive setup wizard also provides the option to automatically upload a newpublic key to the OpenShift Online server. Launch the interactive setup wizard with the rhc setupcommand and follow the onscreen instructions.

    OpenShift Online 1 User Guide

    20

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+IDs%3A%0A26196-592641+%5BLatest%5D&comment=Title%3A+Resolving+Authentication+Issues%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26148-592640+%5BLatest%5D&comment=Title%3A+Deleting+a+Key%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26148-592640+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26189-592641+%5BLatest%5D&comment=Title%3A+Viewing+a+Specific+Public+Key%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26189-592641+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26184-592641+%5BLatest%5D&comment=Title%3A+Viewing+All+Public+Keys%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26184-592641+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    24/89

    See the OpenShift Online Client Tools Installation Guide at https://access.redhat.com/site/documentationfor more information about the client tools and the interactive setup wizard.

    Report a bug

    Chapter 3. Authentication

    21

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26186-592641+%5BLatest%5D&comment=Title%3A+Resolving+Issues+with+Interactive+Setup+Wizard%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26186-592641+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentation

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    25/89

    Chapter 4. Domains

    4.1. Introduction to DomainsAn OpenShift Online domain forms part of an application's URL and is unique to an account. The syntax

    for an application URL is application -domain .example.com. Each user name supports a singledomain, but you can create multiple applications within the domain. Note that a domain must be createdbefore you can create an application.

    An OpenShift Online blacklist restricts the domain names that are available. A warning message informsyou if a blacklisted domain name has been selected when you attempt to create a domain.

    Domain names consist of a maximum of 16 alphanumeric characters and cannot contain spaces orsymbols.

    Report a bug

    4.2. Domain Management

    4.2.1. Creating a DomainA domain is required to create applications on OpenShift Online. Create a new domain with the followingcommand, specifying the name of the domain:

    $ rhc domain create Domain_Name

    The following example creates a domain named automobile .

    Example 4.1. Creating a Domain

    $ rhc domain create automo bil e Creating domain 'automobile'

    You may now create an application using the 'rhc app create' command

    Note

    The number of domains you can create depends on the type of account and its limitations. A warning message alerts you when the account limitations are exceeded.

    See Also:

    Section 7.1, “Introduction to Custom Domains and SSL Certificates”

    Section 10.2, “Creating an Application”

    Report a bug

    4.2.2. Listing Available Domains

    OpenShift Online 1 User Guide

    22

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26226-592644+%5BLatest%5D&comment=Title%3A+Creating+a+Domain%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26226-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26237-592644+%5BLatest%5D&comment=Title%3A+Introduction+to+Domains%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26237-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    26/89

    List all available domains for an account with the following command:

    $ rhc domain l ist

    Example 4.2. Listing Available Domains

    $ rhc domain l istDomain automobile--------------- Created: Oct 01 7:28 PM Allowed Gear Sizes: small, medium

    Domain automobile2----------------- Created: Oct 01 7:46 PM Allowed Gear Sizes: small, medium

    Alternatively, run the rhc domains command to list all available domains.

    Report a bug

    4.2.3. Viewing a DomainView information about the default domain with the following command:

    $ rhc domain show

    Example 4.3. Viewing a Domain

    $ rhc domain showDomain automobile--------------- Created: Oct 01 7:28 PM Allowed Gear Sizes: small, medium

    racer @ http://racer-automobile.example.com/ (uuid:926056f8845b4e388b37f6735c89d0eb) ----------------------------------------------------------------------------- Dom ain: automobile Created: Oct 01 7:28 PM Gears: 2 (defaults to small) Git URL: ssh://926056f8845b4e388b37f6735c89d0eb@ racer-automobile.example.com/~/git/racer.git/ SSH: [email protected]

    php-5.4 (PHP 5.4) ----------------- Scaling: x2 (minimum: 2, maximum: 2) on small gears

    You have 1 application in your dom ain.

    If multiple domains exist, specify the name of the domain with the -n option:

    Chapter 4. Domains

    23

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26225-592644+%5BLatest%5D&comment=Title%3A+Listing+Available+Domains%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26225-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    27/89

    $ rhc domain show -n Domain_Name

    Report a bug

    4.2.4. Renaming a DomainWhen a domain is renamed, the old domain is deleted and a new one is created. Therefore, in order toprevent data loss, a domain cannot be renamed if it contains any applications.

    Procedure 4.1. To Rename a Domain:

    1. Ensure the domain does not contain any applications with the following command:

    $ rhc apps

    Delete any applications that exist in that domain with the following command:

    $ rhc app delete App_Name

    Warning

    Deleting an application deletes all remote data associated with that application, whichcannot be recovered.

    2. Rename a domain with the following command, specifying the current domain name and the newdomain name:

    $ rhc domain rename Old_Domain_Name New_Domain_Name

    Example 4.4. Renaming a Domain

    $ rhc domain rename olddomain newdomainRenaming domain 'olddomain' to 'newdomain'... doneApplications in this domain will use the new name in their URL.

    Report a bug

    4.2.5. Deleting a DomainThe following instructions describe how to delete a domain if it is no longer required. However, note thata domain cannot be deleted if it contains any applications.

    Procedure 4.2. To Delete a Domain:

    1. Ensure the domain does not contain any applications with the following command:

    $ rhc domain show Domain_Name

    Delete any applications that exist in that domain with the following command:

    $ rhc app delete App_Name

    OpenShift Online 1 User Guide

    24

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26250-592646+%5BLatest%5D&comment=Title%3A+Renaming+a+Domain%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26250-592646+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26224-592644+%5BLatest%5D&comment=Title%3A+Viewing+a+Domain%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26224-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    28/89

    Warning

    Deleting an application deletes all remote data associated with that application, whichcannot be recovered.

    2. Delete the domain with the following command:

    $ rhc domain delete Domain_Name

    Note

    You must have at least one domain to create an application.

    See Also:

    Section 4.2.1, “Creating a Domain”

    Report a bug

    Chapter 4. Domains

    25

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26279-592648+%5BLatest%5D&comment=Title%3A+Deleting+a+Domain%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26279-592648+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    29/89

    Chapter 5. Teams

    5.1. Introduction to TeamsMultiple users can be part of a conjoined role within a domain called a team. A team counts as one

    member of a domain and has the same permissions and restrictions as any domain member. Teams arecontrolled by users, whereas global teams are controlled by the system administrator.

    Domain members with an administrator role can change the role of a team that is a member of thatdomain.

    Teams and Roles

    You can have explicit roles within a domain, and belong to a team which has a role within the domain.The following team roles are available: view , edit , and admin . If you have a specific role, and you areon a team that has a different role, the effective role is the higher of the two roles. Therefore, thefollowing guidelines apply:

    If you have the view role in a domain, and you are not on a team, you can view the domain.

    If you are on a team that has the view role in a domain, you can view applications within thatdomain.

    If you have the edit role within a domain, and you are on a team that has the view role, you canedit applications within the domain.

    If you have the view role in a domain, and you are on a team that has the edit role, you can editapplications within the domain.

    If you do not have an explicit role in a domain, and you are on a team that has the edit role, you arenot listed in the domain membership, except within the team.

    Creating and Configuring Teams

    Currently, you can only create, populate, and configure teams with the REST API. See the OpenShift Online REST API Guide at https://access.redhat.com/site/documentation for more information. Thecapability to create and manage teams with the client tools will be available in the next release ofOpenShift Online.

    Report a bug

    OpenShift Online 1 User Guide

    26

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+30465-633710+%5BLatest%5D&comment=Title%3A+Introduction+to+Teams%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=30465-633710+25+Apr+2014+09%3A55+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://access.redhat.com/site/documentation

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    30/89

    Chapter 6. Domain Membership

    6.1. Introduction to Domain MembershipDevelopers can collaborate on application development with domain membership. The following table

    describes the three roles that are available in domain membership.Table 6.1. Domain Membership Roles

    Role Description

    View Member has read-only access to view information about the domain and itsapplications and cannot make any changes.

    Edit Member can create, update, and delete all applications in the domain, and hasGit and SSH access.

    Administer Member has access to all features, but cannot change allowed gear sizes or editthe domain name.

    The default role for each member is the edit role, but it can be changed.

    Report a bug

    6.2. Managing Domain Membership

    6.2.1. Adding a MemberAdd a user to a domain with the following command, specifying the user login and domain name. Theuser login must be a registered OpenShift Online user.

    $ rhc member add [email protected] -n Domain_Name

    When adding a team to a domain, add the --type option with team specified:

    $ rhc member add Team_Name -n Domain_Name --type team

    A global team can be added with the --global option:

    $ rhc member add Global_Team_Name -n Domain_Name --type team --global

    A team can also be added by specifying the team ID:

    $ rhc member add Team_ID -n Domain_Name --type team --ids

    When adding a member or a team to a domain, they receive the default role of edit if not otherwisespecified. Use the --role option when adding a member or a team to specify a different role:

    $ rhc member add [email protected] -n Domain_Name --role Member_Role

    Report a bug

    6.2.2. Changing Member Role

    Chapter 6. Domain Membership

    27

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26227-633412+%5BLatest%5D&comment=Title%3A+Adding+a+Member%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26227-633412+24+Apr+2014+12%3A48+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26223-592644+%5BLatest%5D&comment=Title%3A+Introduction+to+Domain+Membership%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26223-592644+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    31/89

    Change an existing member's role with the following command. Member_Role can be specified as view ,edit , or admin :

    $ rhc member update [email protected] -n Domain_Name --role Member_Role

    Change an existing team's role by using the --type option:

    $ rhc member update Team_Name -n Domain_Name --role Member_Role --type team

    Or perform the same function using team IDs:

    $ rhc member update Team_ID -n Domain_Name --role Member_Role --type team --ids

    Report a bug

    6.2.3. Listing Members of a Domain

    View the existing members of a domain with the following command, specifying the name of the domain:

    $ rhc member li st Domain_Name

    Example 6.1. Listing Domain Members

    $ rhc member li st automobil eLogin Login Role Type--------------------- ----------------- ------------ ----mem [email protected] member@ example.com admin (owner) usermyteam edit team

    mem [email protected] mem [email protected] view usermem [email protected] mem [email protected] edit usermem [email protected] mem [email protected] admin user

    Use the --all option to display all members, including team-members:

    $ rhc member li st Domain_Name --all

    Example 6.2. Listing Domain Members

    $ rhc member li st automobil e --allLogin Login Role Type--------------------- ----------------- ------------ ----mem [email protected] mem [email protected] admin (owner) usermyteam edit teammem [email protected] mem [email protected] view usermem [email protected] mem [email protected] edit usermem [email protected] member4@ example.com admin [email protected] [email protected] edit (via myteam) [email protected] [email protected] edit (via myteam) userteam_member3@ example.com [email protected] edit (via myteam) user

    Report a bug

    OpenShift Online 1 User Guide

    28

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26229-632603+%5BLatest%5D&comment=Title%3A+Listing+Members+of+a+Domain%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26229-632603+22+Apr+2014+12%3A00+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26285-631880+%5BLatest%5D&comment=Title%3A+Changing+Member+Role%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26285-631880+16+Apr+2014+13%3A29+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    32/89

    6.2.4. Listing Members of an ApplicationView the existing members of an application with the following command, specifying the application name

    with the -a option:

    $ rhc member list -a App_Name

    Example 6.3. Listing Application Members

    $ rhc member list -a myapp Login Role----------------------- [email protected] admin (owner)[email protected] view

    Report a bug

    6.2.5. Removing a MemberRemove an existing member from a domain with the following command, specifying the domain name

    with the -n option and the user name to be removed:

    $ rhc member remove -n Domain_Name [email protected]

    Alternatively, remove all existing members from a domain by including the --all option:

    $ rhc member remove -n Domain_Name --all

    Remove a team from a domain by specifying the team name and adding the --type option:

    $ rhc member remove Team_Name -n Domain_Name --type team

    Report a bug

    Chapter 6. Domain Membership

    29

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26228-628949+%5BLatest%5D&comment=Title%3A+Removing+a+Member%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26228-628949+10+Apr+2014+15%3A24+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+28296-592747+%5BLatest%5D&comment=Title%3A+Listing+Members+of+an+Application%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=28296-592747+24+Feb+2014+08%3A00+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    33/89

    Chapter 7. Custom Domains and SSL Certificates

    7.1. Introduction to Custom Domains and SSL CertificatesCustom domain aliases are designated so that applications can use custom DNS entries rather than the

    domain generated by the system. Note that a CNAME record with your DNS provider is required forcustom aliases to work correctly.

    Custom SSL certificates with domain aliases are available for added security to users with upgradedOpenShift Online accounts.

    Management Console

    Click on an application name in the My Applications tab in the Management Console to view customdomain name and SSL certificate management options for the selected application.

    Report a bug

    7.2. Managing Custom Domain Names

    Adding a Custom Domain Name

    Add a custom domain name to an application with the following command, specifying the applicationname and custom domain name:

    $ rhc alias add App_Name Custom_Domain_Name

    Example 7.1. Adding a Custom Domain Name

    $ rhc alias add racer fast.cars.comRESULT:Alias 'fast.cars.com' has been added.

    Viewing Custom Domain Names

    View domain name aliases and SSL certificate status with the following command, specifying the

    application name:

    $ rhc ali as li st App_Name

    Example 7.2. Viewing Custom Domain Names

    $ rhc alias l ist racer

    Alias Has Certificate? Certificate Added------------- ---------------- -----------------fast.cars.com yes 2013-08-05quick.cars.com no

    OpenShift Online 1 User Guide

    30

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26211-592643+%5BLatest%5D&comment=Title%3A+Introduction+to+Custom+Domains+and+SSL+Certificates%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26211-592643+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    34/89

    Removing a Custom Domain Name

    Remove a domain name alias from an application with the following command, specifying the applicationname and the custom domain name to be removed:

    $ rhc alias remove App_Name Custom_Domain_Name

    Report a bug

    7.3. Managing Custom SSL Certificates

    Adding a Custom SSL Certificate

    Add a custom SSL certificate to an alias with the following command.

    $ rhc alias update-cert App_Name Domain_Name --certificate Cert_File --private-key Key_File

    If the private key is encrypted, specify the passphrase with the --passphrase option.

    Viewing Custom SSL Certificate Status

    View domain name aliases and SSL Certificate status with the following command, specifying theapplication name:

    $ rhc ali as li st App_Name

    Example 7.3. Checking SSL Certificate Status

    $ rhc alias li st racer

    Alias Has Certificate? Certificate Added------------- ---------------- -----------------fast.cars.com yes 2013-08-05quick.cars.com no -

    Removing a Custom SSL Certificate

    Remove a custom SSL certificate from an alias with the following command, specifying the applicationname and alias name:

    $ rhc ali as delete-cert App_Name Alias

    Report a bug

    Chapter 7. Custom Domains and SSL Certificates

    31

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26215-592643+%5BLatest%5D&comment=Title%3A+Managing+Custom+SSL+Certificates%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26215-592643+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26217-592643+%5BLatest%5D&comment=Title%3A+Managing+Custom+Domain+Names%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26217-592643+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    35/89

    Chapter 8. Cartridges

    8.1. Introduction to CartridgesCartridges are the components of an OpenShift Online application, and contain the application code to

    provide the actual functionality required to run applications. Cartridges are available to support variousprogramming languages, databases, monitoring services, and management. Adding a cartridge to anapplication provides the desired capability without having to administer or update the included feature.When added to an application, a cartridge is deployed to one or more gears based on its requirements.Cartridges that listen to incoming traffic are placed on one or more gears, while other cartridges can beplaced across multiple gears of an application.

    Report a bug

    8.1.1. Web Framework CartridgesWeb cartridges are available for a variety of programming languages and frameworks, and an

    application requires at least one web cartridge to listen to HTTP requests. The type of web frameworkcartridge must be specified when an application is created. Cartridges that listen to incoming traffic areplaced on one or more gears, while other cartridges can be placed across multiple gears of anapplication.

    The following web framework cartridges are currently available with OpenShift Online:

    Table 8.1. Available Web Framework Cartridges

    Scalable Non-Scalable

    JBoss AS Zend Server

    JBoss EAP Jenkins ServerNode.js Do-It-Yourself (DIY)

    Perl

    PHP

    Python

    Ruby

    Tomcat (JBoss EWS)

    Report a bug

    8.1.2. Add-on CartridgesAfter an application is created with the required web framework cartridge, a number of add-on cartridgescan provide extra functionality and capabilities to applications, such as databases, scheduled jobs, orcontinuous integration. The following table describes the functionality of the different types of add-oncartridges available with OpenShift Online.

    OpenShift Online 1 User Guide

    32

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26216-606530+%5BLatest%5D&comment=Title%3A+Web+Framework+Cartridges%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26216-606530+27+Feb+2014+10%3A55+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+IDs%3A%0A26248-592646+%5BLatest%5D&comment=Title%3A+Introduction+to+Cartridges%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    36/89

    Table 8.2. Add-on Cartridge Functions

    Function Description

    Database Provide the application with one of several database back ends. Examplesinclude MySQL and PostgreSQL.

    Database management Provide functionality for managing the application's database using third-party software. Examples include HAProxy.

    Monitoring andManagement

    Provide a range of options for managing and monitoring the application.Examples include the Cron task scheduler, and the Jenkins Client.

    The following add-on cartridges are currently available for OpenShift Online.

    Database Cartridges

    The following table describes all available database cartridges, and shows whether they are scalable ornot.

    Table 8.3. Database Cartridges

    Cartridge Scalable Description

    MySQL Yes Multi-user, multi-threaded SQL database server.

    MongoDB NoSQL Yes High-performance, open source NoSQL database.

    PostgreSQL 8 Yes Advanced object-relational database managementsystem.

    Management Cartridges

    The following table describes all available management cartridges, and shows whether they are scalableor not.

    Table 8.4. Management Cartridges

    Cartridge Scalable Description

    phpMyAdmin 3 No Web-based MySQL administration tool.

    HAProxy 1 Yes High performance TCP/HTTP load balancer.

    Cron 1 Yes A daemon that runs specified programs at scheduledtimes.

    SwitchYard 0 No Lightweight service delivery framework providing full lifecycle support for developing, deploying, and managingservice-oriented applications.

    RockMongo 1 No Web-based MongoDB administration tool.

    Jenkins Client 1 No A client for managing Jenkins-enabled applications.

    OpenShift Metrics 0 No An experimental cartridge for monitoring applications.

    Report a bug

    8.1.3. Downloadable CartridgesDownloadable cartridges are available for new and existing applications along with the supportedstandard OpenShift Online cartridges. These are custom cartridges created by users, or available from

    Chapter 8. Cartridges

    33

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26213-624258+%5BLatest%5D&comment=Title%3A+Add-on+Cartridges%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26213-624258+26+Mar+2014+14%3A42+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    37/89

    the OpenShift community. These cartridges are downloaded and installed using the URL to the manifestof the hosted downloadable cartridge.

    Visit https://www.openshift.com/developers/download-cartridges for more community tips and informationon downloadable cartridges.

    See Also:

    Section 10.2, “Creating an Application”

    Report a bug

    OpenShift Online 1 User Guide

    34

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+26256-592646+%5BLatest%5D&comment=Title%3A+Downloadable+Cartridges%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=26256-592646+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guidehttps://www.openshift.com/developers/download-cartridges

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    38/89

    Chapter 9. Applications

    9.1. Introduction to ApplicationsWhen a new application is created, a URL with name of the application and the name of the domain is

    registered in DNS. A copy of the application code is checked out locally into a folder with the same nameas the application. Note that different types of applications may require different folder structures.Application components are run on gears.

    With each new application that is created with the client tools, a remote Git repository is populated withthe selected cartridge, which is then cloned to the current directory on the local machine. The host nameand IP address of the application are also added to the list of known hosts in the ~/.ssh/known_hostsdirectory.

    The following table describes each component that makes up an OpenShift Online application.

    Table 9.1. Application Components

    Component Description

    Domain The domain provides a unique group identifier for all the applications of aspecific user. The domain is not directly related to DNS; instead, it isappended to the application name to form a final application URL of theform http:// App_Name-domain.example.com

    Application Name The name of the application is selected by a user. The final URL to accessthe application is of the form http:// App_Name-domain.example.com

    Alias DNS names can be provided for the application by registering an alias withOpenShift Online and pointing the DNS entry to the OpenShift Online

    servers.Git repository A Git repository is used to modify application code locally. After the code is

    applied, the git push command is required to deploy the revised code.

    OpenShift Online provides dedicated /var/tmp and /tmp directories for each user application. The/var/tmp directory is a symbolic link to /tmp . Each /tmp directory is completely isolated from the/tmp directories of all other applications. Files that are untouched for any period of ten days areautomatically deleted from these directories.

    Report a bug

    9.1.1. Application Life CycleThe following table describes the general life cycle of most OpenShift Online applications.

    Chapter 9. Applications

    35

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+IDs%3A%0A26160-592640+%5BLatest%5D&comment=Title%3A+Introduction+to+Applications%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    39/89

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    40/89

    Figure 9.1. Cartridges on Gears in a Scaling Application

    Report a bug

    Chapter 9. Applications

    37

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+24574-622381+%5BLatest%5D&comment=Title%3A+Scalable+and+Non-Scalable+Applications%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=24574-622381+19+Mar+2014+15%3A34+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    41/89

    Chapter 10. Application Management

    10.1. General InformationA reliable network connection is required because only a single attempt is made to create an application.

    OpenShift Online makes seven attempts to see if the DNS entry for the new application exists. If it is notfound an error message is returned.

    The --timeout option on the command line is used to override the default values when there areconstant timeout issues. OpenShift Online uses two timeout parameters: a connection timeout, whichdetermines how long the client tries to connect to the server before timing out; and a read timeout, whichdetermines how long the client waits for a response from the server. The default connection timeoutvalue is 20 seconds. The default read timeout value is 120 seconds.

    The --timeout option affects both timeout parameters, but it can only be used to increase the defaultvalues. The timeout value cannot be set to be less than the default. For example, if --timeout 50 isused, it sets the connection timeout value to 50 seconds, but does not affect the read timeout value.Similarly, if --timeout 150 is used, it sets both the connection and read timeout values to 150seconds.

    Report a bug

    10.2. Creating an ApplicationPrerequisites:

    Section 4.2.1, “Creating a Domain”

    There are some factors that must be considered before you create an application. There are certainaspects of the application that cannot be changed after it is created. For example, whether an applicationis scalable or not must be specified when it is created. An application that is not scalable cannot bechanged to scalable after it is created, and vice versa. The web framework of a cartridge also cannot bechanged after an application is created. An application can be created with either the ManagementConsole or the client tools.

    New applications are created with the rhc app c reate command and using the command options tosupply the required information, such as the type of web framework to be used with the new application.Note that if multiple versions are available for the specified web framework cartridge, you are promptedto specify the version number to use for the new application.

    The following table describes some of the common options available when creating a new application with the client tools.

    OpenShift Online 1 User Guide

    38

    https://bugzilla.redhat.com/enter_bug.cgi?cf_environment=Build+Name%3A+22503%2C+User+Guide-null-1.0%0ABuild+Date%3A+27-04-2014+10%3A04%3A21%0ATopic+ID%3A+24581-592563+%5BLatest%5D&comment=Title%3A+General+Information%0A%0ADescribe+the+issue%3A%0A%0A%0ASuggestions+for+improvement%3A%0A%0A%0AAdditional+information%3A&cf_build_id=24581-592563+24+Feb+2014+07%3A59+en-US+%5BLatest%5D&product=OpenShift+Online&component=Docs+User+Guide

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    42/89

    Table 10.1. Options When Creating New Applications

    Option Description

    -n, --namespace [NAME] Domain where you wish to create the application.

    -g, --gear-size [SIZE] Gear size determines how much memory and CPU a cartridgeconsumes.

    -s, --scaling Creates a scalable application.

    -a, --app [NAME] Name for the application to be created.

    --enable-jenkins [NAME] Enables Jenkins continuous integration, and creates a Jenkinsapplication if one does not already exist. The default name is'jenkins' if a name is not specified.

    Creating a Non-Scalable Application

    Create a non-scaleable application in the default domain with the following command:

    $ rhc app create App_Name Cart_Name

    Example 10.1. Creating a Non-Scalable Application

    $ rhc app create racer php-5.4Application Options-------------------Domain: mydomainCartridges: php-5.4Gear Size: defaultScaling: no

    Creating application 'racer' ... done

    Waiting for your DNS name to be available ... done

    Cloning into 'racer'...The authenticity of host 'racer-mydomain.rhcloud.com (50.19.129.28)' can't beestablished.RSA key fingerprint is cf:ee:77:cb:0e:fc:02:d7:72:7e:ae:80:c0:90:88:a7.Are you sure you want to continue connecting (yes/no)? yesWarning: Perm anently added 'racer-m ydom ain.rhcloud.com,50.19.129.28' (RSA) to

    the list of known hosts.

    Your application 'racer' is now available.

    URL: http://racer-mydom ain.rhcloud.com/ SSH to: [email protected] Git remote: ssh://[email protected]/~/git/racer.git/ Cloned to: /home/blank/racer

    Run 'rhc show-app racer' for more details about your app.

    Chapter 10. Application Management

    39

  • 8/11/2019 OpenShift Online 2.0 User Guide en US 7

    43/89

    Creating a Scalable Application

    Create a scalable application by adding the -s parameter to the command:

    $ rhc app create App_Name Cart_Name -s

    Example 10.2. Creating a Scalable Application

    $ rhc app create racer php-5.4 -s

    With a scalable application the automatic scaling feature is enabled by default. However, an applicationcan be scaled manually to control the number of gears that are used.

    Note

    At the time of this writing, if a scalable application is created, the scaling function of thatapplication cannot be disabled. However, it is possible to clone a non-scaling application and all itsassociated data and create a new scaling application using the application clone command. SeeSection 10.3, “Cloning an Existing Application” for more information.

    Creating an Application from a Downloadable Cartridge

    Replace the web framework type with the URL of the manifest for the hosted cartridge to create anapplication from a downloadable cartridge:

    $ rhc app create App_Name https://www.example.com/manifest.yml

    Creating an Application in a Specific Domain

    As described in Section 4.2.1, “Creating a Domain” , each domain supports multiple applications.Therefore, if there are multiple domains associated with an account, you must specify in which domain tocreate the new application with the -n option:

    $ rhc app create App_Name Cart_Name -n Domain_Name

    When multiple applications are created in a domain, the application URLs are as follows:

    http://app1-domain.example.com

    http://app2-domain.example.com

    Creating an Appliation With Jenkins Continuous Integration

    Create an application and enable Jenkins continuous int