[Guide] NodeBB 0.6.1 on OpenShift for Windows users with PuTTY



  • NodeBB 0.6.1 on OpenShift Online for Windows users with PuTTY

    STEP 1

    Get started with a Free account

    Download and save on Windows desktop putty.exe (SSH client) and puttygen.exe (PuTTY Key Generator) from PuTTY homepage

    Add a new key generated by puttygen.exe (Public key) to OpenShift (URL below) and save locally on your hard disk drive (Private key) for later use
    https://openshift.redhat.com/app/console/settings

    Sign in to OpenShift & use URL below
    https://openshift.redhat.com/app/console/application_type/cart!nodejs-0.10

    Public URL: demo
    Source Code: https://github.com/NodeBB/NodeBB.git
    Branch/tag: v0.6.x ---------- OR SKIP TO TRY v0.7.0-dev
    [Click] Create Application

    ! wait for Application creation !

    STEP 2

    Go to OpenShift Online and click on demo [OpenShift Online > Applications > demo]
    https://openshift.redhat.com/app/console/applications
    [Click] see the list of cartridges you can add

    Install your own cartridge
    http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart
    [Click] Add Cartridge

    STEP 3A

    OpenShift Online > Applications > demo
    [Click] Want to log in to your application? [near to Remote Access]
    select all (Ctrl + a) & copy to clipboard (Ctrl + c)

    Open PuTTY (putty.exe) on Windows desktop
    Host Name (or IP address): paste from clipboard (Ctrl + v) [Session]

    ! remove ssh text and space from Host Name !

    PuTTY > Connection > SSH > Auth
    Private key file for authentication
    Browse... .ppk file generated by puttygen.exe (Private key)

    Back to PuTTY Session
    Saved Sessions: demo
    [Click] Save
    [Click] Open

    PuTTY Security Alert
    [Click] Yes
    You'll see something like [demo-yourdomain.rhcloud.com]>

    ! remember about your local firewall settings and allow SSH on port 22 !

    STEP 3B

    cd nodejs [Enter] ---------- OR USE cd n* [Enter]
    cd configuration [Enter] ---------- OR USE cd confi* [Enter]
    nano node.env [Enter] ---------- OR USE vi node.env [Enter]

    find line
    export node_app=server.js

    replace with
    export node_app=app.js

    Exit from nano [Ctrl + x]
    y [Enter] ! will save changes !
    exit [Enter] ---------- OR close PuTTY window

    STEP 4

    OpenShift Online > Applications > demo
    [Click] Restart Application [near to Started & number of small gears]
    [Click] Restart

    ! wait for Application restart !

    STEP 5A

    Open PuTTY (putty.exe)
    [Click] demo & [Click] Load
    [Click] Open

    echo $OPENSHIFT_NODEJS_IP && echo $REDIS_CLI
    [Copy & Paste 2 returned lines (IPs/port/password) to a local Windows text file for a later use]

    STEP 5B

    cd $OPENSHIFT_REPO_DIR ---------- OR USE cd app-root && cd runtime && cd repo
    node app --setup ---------- OR USE ./nodebb setup

    URL used to access this NodeBB (http://localhost:4567😞 http://demo-yourdomain.rhcloud.com:8080 [Enter] ! replace yourdomain !
    Please enter a NodeBB secret (your secret): [Enter] ! do not change !
    Which database to use (redis) [Enter] ! do not change !
    Host IP or address of your Redis instance (127.0.0.1): [Enter] ! Copy & Paste from a local file (STEP 5A)
    Host port of your Redis instance (6379): [Enter] ! Copy & Paste from a local file / second line (STEP 5A)
    Password of your Redis database: [Enter] ! Copy & Paste from a local file / second line (STEP 5A)
    Which database to use (0..n): [Enter] ! do not change !

    NodeBB will ask for admin user details:
    Administrator username
    Administrator email address
    Password
    Confirm Password

    ! wait for populating instance with default data !

    STEP 5C

    nano config.json ---------- OR USE nano c* ---------- OR USE vi config.json

    add line between "url" and "secret" lines [IP address can be found in a local file saved in STEP 5A | IP from first line should replace 0.0.0.0 in example below)
    "bind_address": "0.0.0.0",

    Exit from nano [Ctrl + x]
    y [Enter] ! will save changes !
    exit [Enter] ---------- OR close PuTTY window

    FINAL STEP

    NodeBB is ready to use.

    URL can be found here:
    OpenShift Online > Applications > demo
    (WebSockets will work after using port number :8000 in the URL)

    Additional Notes

    can be used as a free of charge demo (inluding Admin)
    you can have up to 3 NodeBB instances in minutes
    MongoDB cartridge works as good as redis and can be configured to work with NodeBB
    can be used for forum migrations with nodebb-plugin-import and mysql+phpmyadmin in the same gear
    no need to install rhc, git and ruby on Windows & no need to run git clone or wget or npm install on the Cloud

    Up-to-date guide for advanced users

    https://github.com/ahwayakchih/openshift-nodebb


  • Translator

    Thanks for your guide. Will try it, since i got running a demo on openshift following the doc guide, and i get a crash after 10-15 minutes of running nodebb.


  • Admin

    @nhl.pl Thanks for the guide! How does it differ from the guide we have on our documentation portal?



  • There are two main reasons why this guide has been published. I have had to limit mobile bandwidth consumption on 3G connection and to get rid of Git and Ruby issues. Mixing them up with Windows command line is a bit quirky.

    Linux and other *nix users should skip it and go with your official guide. I have tested it on a local computer with Fedora 21 Server and it is really easy to reproduce. But on Windows it is not.

    And you do not need to change so many firewall settings for cmd.exe, ssh.exe and similar processes. Using web-based OpenShift tools is also much easier for beginners.

    We have prepared a new guide for users with rhc and git tools.
    https://github.com/ahwayakchih/openshift-nodebb

    I hope it can be used by those who only installed PHP forum scripts.


 

| |