Skip to content

OpenShift Tutorial (Windows)

Albert Pham edited this page Nov 22, 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

At this point, you should have:

  • A private key file
  • A public key (copy and pasted)

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.

At this point, you should have:

  • A private key file
  • A public key (copy and pasted)
  • Your hostname (SOMETHING_HERE.rhcloud.com)
  • Your username (a bunch of numbers and letters like 6d6354ece40846bf7fca65dfabd5d9d4)

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. At this point, you should be connected to your website's files. Only files in a certain folder can be accessed by a web browser though, so browse to the app-root/runtime/repo folder on the right.

  5. Drag files into the (lower) right pane to upload your files. If you haven't created a modpack, just CAN upload some test image file for now. If you already generated a modpack with the tools, then you need to upload the contents of your _upload folder (but don't upload the _upload folder itself!).

Visit Your Website

Use the hostname that you recorded earlier and visit it. For example, if your hostname was http://SOMETHING_HERE.rhcloud.com, you would try http://SOMETHING_HERE.rhcloud.com/SOME_FILE.

If you uploaded a generated modpack, then you probably want http://SOMETHING_HERE.rhcloud.com/packages.php.

Clone this wiki locally