Skip to content

OpenShift Tutorial (Windows)

Albert Pham edited this page Nov 17, 2015 · 9 revisions

This tutorial let you setup a free website at OpenShift using Windows. The tutorial consists of three major parts:

  1. Generating of your private and public keys, which is like your password for OpenShift.
  2. Creating an OpenShift account and registering an app.
  3. Connecting to your website so you can upload files.

First, download and/or install:

SSH Key Generation

In the following steps, you will generate a "public/private key pair." You give websites your public key but you keep your private key secret. Your private key is like your password.

  1. Open PuTTYgen.

  2. Click Generate.

    Click Generate

  3. Move your mouse around until it finishes.

  4. Save your private key

    Save your private key

  5. Don't save the file with a password.

    Don't save with a password

  6. Save the private key file somewhere safe.

  7. In the main window is your public key. Copy and save it somewhere.

    Public key

Setting Up OpenShift

  1. Go to OpenShift and register an account.

  2. Create a new PHP 5.4 app.

  3. Choose any URL that you want for your website. Leave the source code fields blank.

  4. Wait as OpenShift creates your application/website.

  5. When it's done, you will be asked whether you will be changing the code of your application. Click "Yes" and the paste in your public key that you created earlier.

  6. You should be then given a URL that looks like ssh://USERNAME@HOSTNAME/~/git/etc. Make note of your username and the hostname because you will need them later.

Uploading with Filezilla

  1. Open FileZilla.

  2. Open the Site Manager from the File menu.

  3. Create a new site. Enter the hostname, change the protocol to SFTP, change the logon type to Key file, enter your username, select your private key file from earlier, and then click "Connect."

  4. Browse to the app-root/runtime/repo folder.

  5. Upload your files (from the _upload folder).

Visit Your Website

Use the host that you recorded earlier and visit it. For example, if your hostname was http://demo-yourname.rhcloud.com, you would try http://demo-yourname.rhcloud.com/packages.php.

Clone this wiki locally