User Guide > Tasks > Managing PHP Servers > Adding PHP Servers > Adding a RedHat OpenShift Server

Adding an OpenShift PHP Server

Creating an OpenShift server in Zend Studio allows you to deploy your application on OpenShift.

Prerequisites

Adding an OpenShift PHP Server

This procedure describes how to add an existing OpenShift server in Zend Studio.

 

 

Instructions on how to complete a procedure

To add an OpenShift server

  1. From the Menu bar,  select Window | Show View | PHP Servers to add the PHP Servers view to your perspective.

  1. In the PHP Servers view, click on the Add icon .
    The PHP Server Creation dialog is displayed.

  1. Select RedHat OpenShift, and click Next.
    The RedHat OpenShift dialog is displayed.

  1. Enter the following information:
    • Username: Your OpenShift account username.

    • Password: Your OpenShift account password.

    • SSH Private Key: Your OpenShift SSH Keypair.

  1. Click Finish.
    Zend Studio validates the existing servers on your OpenShift account.
    If Zend Server has not been initialized for your Zend Server cartridge, the OpenShift Server Initialization dialog is displayed.
    If Zend Server has been initialized, skip to step 9.

  1. Enter a Zend Server password. The password is required to access the Zend Server user interface.

  2. Click Next.
    The Zend Server EULA is displayed.

  1. Read and accept the EULA, and click Finish.
    Zend Studio will initialize the Zend Server cartridge in your OpenShift account.
  2. Add your Zend Server credentials:
    • Host: Address of your Zend Server host (e.g., http://localhost:10081, http://192.168.0.1:10081).
    • Key Name: Enter name of Web API key.
    • Key Hash: Enter Web API key. For more information on how to get a Web API key, see Adding API Keys.
  3. Click Finish.
    The new OpenShift server is added to the PHP Servers view.

You can now deploy a project on OpenShift by dragging an existing project from the PHP Explorer onto the new server. For more information on deploying, see Deploying an Application.

Possible Problems when Testing the Connection

There are a number of issues that may arise when testing the connection to create the new OpenShift target in Zend Studio. This section describes the possible errors you may encounter after entering your OpenShift account credentials and clicking Test Connection, and the steps to take to solve them.

Wrong OpenShift Account Credentials

If you are creating a new OpenShift server and do not have an OpenShift account, or if you have entered wrong account credentials, you will not be able to establish a connection to OpenShift and create the new server in Zend Studio, and may need to create a new OpenShift account.

 

 

Instructions on how to complete a procedure

To create an OpenShift account from the Server Details dialog:

Click the Create new OpenShift account link.

To create an OpenShift account from your browser:

Go to https://openshift.redhat.com/app/account/new

 

Error Message: Domain Has Not Been Created Yet

This error is displayed if your OpenShift account does not include a defined domain. The domain is defined when you create your first application in OpenShift.

 

 

Instructions on how to complete a procedure

To define a domain:

  1. In the Server Details dialog, click Create New OpenShift Server.
    The Create New OpenShift Domain is displayed.

  1. Enter a domain name, and click Next.
    The Create New OpenShift Server dialog is displayed.

  1. Name the new server (The server name cannot be identical to the name of any existing applications in your OpenShift account).
  2. Select an available Gear profile from your OpenShift account.
  3. To automatically install the MySQL cartridge, select the 'Add MySQL Database' check-box.
  1. Enter a Zend Server password. The password is required to access the Zend Server user interface.
  2. Click Next.
    The Zend End-User License Agreement is displayed.

  1. Read and accept the license agreement, and click Finish.
    Zend Studio creates the new OpenShift server with the Zend Server 5.6 cartridge.
  1. Back in the Server Details dialog, click Test Connection again, and Finish to add the server.
    The OpenShift server is added to the PHP Servers view, and can now be used to deploy applications.

 

Error Message: No Valid Server Detected

This error is displayed if your OpenShift target includes a defined domain, but does not contain any Zend Server 5.6 applications on it (Zend Server 5.6 cartridge).

 

 

Instructions on how to complete a procedure

To add a valid server to your OpenShift account:

  1. In the Server Details dialog, click Create New OpenShift Server.
    The Create New OpenShift Server dialog is displayed.

Note:

If your OpenShift account does not have a defined domain, the Create New OpenShift Domain is displayed (see above).

  1. Name the new server (The server name cannot be identical to the name of any existing applications in your OpenShift account).
  2. Select an available Gear profile from your OpenShift account.
  3. To automatically install the MySQL cartridge,select the 'Add MySQL Database' check-box.
  1. Enter a Zend Server password. The password is required to access the Zend Server user interface.
  2. Click Next.
    The Zend Server End-User License Agreement is displayed.

  1. Read and accept the license agreement, and click Finish.
    Zend Studio creates the new OpenShift target with the Zend Server 5.6 cartridge.
  1. Back in the Add Server dialog, click Test Connection again, and Finish to add the server.
    The OpenShift server is added to the PHP Servers view, and can now be used to deploy applications.

 

 

Read Also

  Managing PHP Servers