Installation/OpenShift: Difference between revisions

From diaspora* project wiki
No edit summary
(This environment is unsupported.)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
{{Work in progress}}
{{UnsupportedEnvironment}}
{{Note|OpenShift lacks a sane way to manage configuration, using it for deploying Diaspora is not recommended and considered experimental by the developers}}
{{Note|OpenShift support is still work in progress and not official, see the [https://github.com/MrZYX/diaspora-openshift/issues open issues]}}


Here is a quick guide to deploy Diaspora* on OpenShift, the cloud solution powered by RedHat
Go to https://github.com/jhass/diaspora-openshift and follow the readme there.
 
Look at https://github.com/MrZYX/diaspora-openshift if you want a adapted diaspora :)
 
# Create an account on [OpenShift https://openshift.redhat.com] (it's free !)
# Choose Ruby on Rails application
# Choose a public URL and change "Source Code" to git://github.com/diaspora/diaspora.git
# Keep a copy of your MySQL settings, you will need it ;)
# Connect to your cloud with ssh : You have a example with git :
<pre>git clone ssh://a-lot-of-number-and-letters@yourappli-yournamspace.rhcloud.com/~/git/yourappli.git/</pre>
Connect by transform this command to
<pre>ssh a-lot-of-number-and-letters@yourappli-yournamspace.rhcloud.com</pre>
 
You probably need to set a public key in your account setting first. If you don't have one, generate one with ssh-keygen and put it in .ssh in your home
 
In your cloud, go to the app folder :
<pre>cd app-root/repo/</pre>
 
run bundle install :
<pre>bundle install</pre>
 
Edit your diaspora.yml and database.yml file :
<pre>cd config
mv diaspora.yml.example diaspora.yml
mv database.yml.example database.yml
nano diaspora.yml</pre>
edit the url and remove the # in front of <pre>certificate_authorities: '/etc/pki/tls/certs/ca-bundle.crt'</pre> and <pre>port: 3000</pre>
 
Enter <pre>$OPENSHIFT_MYSQL_DB_HOST</pre> in your shell to know the IP of the database, then edit the file with
 
<pre>nano database.yml</pre>
And edit host with the IP found, put the username and the password saved on step 4. Change the socket to MySQL with the value below too. (host can work by letting localhost)
<pre>host: "theIPFound"
port: 3306
username: "admin"
password: "xxx"
socket: ~/mysql-5.1/socket/mysql.sock</pre>
 
Okay, so now, connect to the mysql database with
<pre>mysql -u admin -p</pre>
then create the diaspora database with
<pre>CREATE DATABASE diaspora_production;</pre>
and <pre>exit</pre>
 
You can now create the tables with
<pre>RAILS_ENV=production bundle exec rake db:schema:load</pre>


[[Category:Installation]]
[[Category:Installation]]
[[Category:Podmin]]
[[Category:Podmin]]

Latest revision as of 14:57, 17 October 2018

WarningWarning:

The following instructions are maintained by community contributors and describe the installation inside an environment not supported by the diaspora* team.

Due to the nature of these installations, diaspora* might not work, have some limitations, or encounter unexpected issues. The diaspora* team might not be able to help you with troubleshooting your installation. Proceed at your own risk.

Please check our official installation guides for information on how to install diaspora* inside a supported environment.

NoteNote:OpenShift support is still work in progress and not official, see the open issues

Go to https://github.com/jhass/diaspora-openshift and follow the readme there.