You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

108 lines
2.7 KiB
ReStructuredText

11 years ago
Openshift Paas
===========
The following are installation instructions for the `Openshift <http://openshift.com>` Paas.
**Step 1:** Create a new application :
.. code:: bash
rhc app create nodebb nodejs-0.10
**Step 2:** Add cartridge Redis
11 years ago
.. code:: bash
rhc add-cartridge http://cartreflect-claytondev.rhcloud.com/reflect?github=smarterclayton/openshift-redis-cart -a nodebb
11 years ago
**Step 3:** SSH to the application
11 years ago
.. code:: bash
rhc app ssh -a nodebb
**Step 4:** Find out your instances ip address NodeJS and Redis so NodeBB can bind to it correctly. This is one of Openshifts demands and seems to be the only way it will work. You cant use $IP in your config.json either (which means you cant enter $IP in the node app setup). First line : NodeJS and second line : Redis
The ouput of the echo $REDIS_CLI like this : -h ip_redis -p port_redis -a password
11 years ago
.. code:: bash
echo $OPENSHIFT_NODEJS_IP && echo $REDIS_CLI
11 years ago
**Step 5:** Exit SSH
11 years ago
**Step 6:** Add the source code of Nodebb to the repository application
11 years ago
.. code:: bash
cd nodebb && git remote add upstream -m master git://github.com/NodeBB/NodeBB.git
**Step 7:** Get the files and push
11 years ago
.. code:: bash
git pull -s recursive -X theirs upstream master && git push
**Step 8:** Stop the application
11 years ago
.. code:: bash
rhc app stop -a nodebb
**Step 9:** SSH to the application
.. code:: bash
rhc app ssh -a nodebb
11 years ago
**Step 10:** Edit the environnement NodeJS on the terminal with the SSH
11 years ago
.. code:: bash
cd ~/nodejs/configuration && nano node.env
11 years ago
**Step 11:** Replace server.js by app.js and exit the editor
11 years ago
.. code:: bash
ctrl + x
**Step 12:** In other terminal, start the application
.. code:: bash
rhc app start -a nodebb
11 years ago
**Step 13:** Start the setup of NodeBB on the terminal with the SSH
11 years ago
.. code:: bash
cd ~/app-root/repo && node app --setup
URL of this installation should be set to 'http://nodebb-username.rhcloud.com', replacing username with your username.
Port number : 8080
IP or Hostname to bind to: Enter what your $OPENSHIFT_NODEJS_IP value holds here found in step 4.
11 years ago
Host IP or address of your MongoDB instance: Enter what your $REDIS_CLI value holds here found in step 4.
11 years ago
Host port of your MongoDB instance: Enter what your $REDIS_CLI value holds here found in step 4.
11 years ago
Redis Password: Enter what your $REDIS_CLI value holds here found in step 4.
11 years ago
**Step 14:** And the last one, in other terminal, restart the application
11 years ago
.. code:: bash
rhc app restart -a nodebb
11 years ago
And then open http://nodebb-username.rhcloud.com in your browser.
Note
---------------------------------------
Restart NodeBB in the admin doesn't work. Use :
.. code:: bash
rhc app restart -a nodebb