Redmine in Openshift

 In PaaS


What is OpenShift?

It is a cloud, it is from Red Hat. More precisely: A PaaS (Platform As A Service).

The following steps are needed: [Via GUI-Graphical User Interface]

  • Create an account in openshift
  • Installing the CLI and setting up environment
  • Create an application
  • Initialize a git repository

Create an account

Simply head to Openshift and fill in the form.


Setting up your environment

Access openshift account through CLI needs some basic authentication. To do that, install rhc in OS.Installation may differs from Operating System to Operatiing System.

Below link provides more details on this.


Create an application

Using Openshift GUI to create an application

Following steps will create Redmine for usage

1.Choose a type of application


Enter redmine in search bar. click Redmine Package shown.

2.Configure the application


Give Public URL to access Redmine.Others like git repository, and corresponding Cartridges mysql,ruby are automatically selected by openshift itself.


Click create Application button to launch.


Mysql database will be created and credentials provide by openshift.


Connect with Openshift and Openshift Application’s [via CLI]

Command Line Interface has multiple options to compare with Openshift GUI.If need to add or remove Cartridges from particular Application we can easily do it via CLI commands.

If openshift environment is already configured [if not please a have on follow below steps.

~$ > rhc setup

Enter user name and password of Openshift Account.

The wizard will ask token for communication.Generate a token now? (yes|no) type as yes

Generate a token now? (yes|no) yes

Token will be generated and kept in a separeate file inside .openshift folder in /home/your-admin-name/.openshift/express.conf

[Note : If we need to connect with another Openshift account delete the .openshift folder

~$ > rm -R /home/your-admin-name/.openshift


Your public SSH key must be uploaded to the OpenShift server to access code. Upload now? (yes|no) yes

it creates a default SSH file, followed by which it will ask for a separete key file.

Provide a name for this key: |your admin| ss

it automatically create a file and upload SSH file in openshift account.


Adding or Removing cartridges using rhc environment

Adding a phpmyadmin from redmine application

[email protected]:~$ rhc cartridge add phpmyadmin -a redmine

Using phpmyadmin-4 (phpMyAdmin 4.0) for ‘phpmyadmin’ Adding phpmyadmin-4 to application ‘sdsd’ … done

phpmyadmin-4 (phpMyAdmin 4.0)


Gears:          Located with mysql-5.1, ruby-1.9
Connection URL: <your connection-name>

Please make note of these MySQL credentials again:

Root User: your username
Root Password: your password

URL: <your connection-name>

Removing a phpmyadmin from redmine application

[email protected]:~$ rhc cartridge remove -a redmine -c phpMyAdmin

Once added everything get into openshift account via GUI and click Application name displays the list of cartridges installed and URL to access Redmine Application.


If you have any available domain, it can be configured instead of the URL. For configuring those details click change option which is located near to URL.


Use admin as Username and Password to login.It is default once logged in we can change or modify the password.


Hands on Redmine Configuration.Now Redmine is ready to use but only thing is to configure email setup.

Once Logged in by using admin as username and password select Administration tab which is located at top left.


It gives number of services supported by redmine from that select settings.


Select Email notificatios tab


Initially configuration.yml has not been configured exactly with our email configuration shows the below error


Use ssh to conncet Applicataion from CLI. To achive that, get into openshift account and select application. In Right corner ssh link will be given for that application.This ssh key will differ from application to application.

Use that key to connect with application.


From CLI enter ssh key to connect particular application.


\> ls [command will show the available folders and cartridges installed for that application]

app-deployments app-root git mysql ruby

Above folders app-deployments and app-root for deploying applications.Other folders git for git files, mysql for mysql configuration and data files,ruby for ruby configuration.

So we need configuration.yml to fix email notification error.

File is located at


change directory into

cd /app-root/runtime/repo/config

rename the configuration.yml.example into configuration.yml

[<your connection-name> config]\> mv configuration.yml.example configuration.yml

comment [ Use # – to comment ] :production and :development at bottom lines in configuration.yml


After getting Email notification page without any issue.

Need to send a test mail to check whether email is configured properly.

click a Send a test email link to send a test mail.


An error occurred while sending mail (getaddrinfo: Name or service not known)


Edit configuration.yml file

comment below lines and change delivery_method into sendmail in configuration.yml file

# default configuration options for all environments default:

# Outgoing emails configuration (see examples above)
delivery_method: :sendmail

# smtp_settings: # address: # port: 25 # domain: # authentication: :login # user_name:

[email protected]” # password: “redmine”

save configuration.yml file

restart the application

[<your connection-name> config]\> ctl_all restart Restarting services Stopping MySQL 5.1 cartridge Starting MySQL 5.1 cartridge restarting Ruby cart

try to send test mail.

Some Other Issues:


An error occurred while sending mail (hostname does not match the server certificate)


Add below lines in environment.rb which is located in same config folder.

# Turn off auto TLS for e-mail ActionMailer::Base.smtp_settings[:openssl_verify_mode] = false ActionMailer::Base.smtp_settings[:enable_starttls_auto] = false

save environment.rb file

restart the application

[<your connection-name> config]\> ctl_all restart Restarting services Stopping MySQL 5.1 cartridge Starting MySQL 5.1 cartridge restarting Ruby cart

Now again try to send test mail.


Refernce Sites:

Recommended Posts
pingbacks / trackbacks

Leave a Comment

Start typing and press Enter to search