Install DevZone


This document elaborates the steps to install the development environment to develop infotainment application and services in the automotive industry domain.

Schematic of the service running on the VPS


The script below is how the firewall is setup

ufw allow ssh
ufw allow http
ufw allow https
ufw enable
ufw status verbose
ufw status numbered (if you want to delete rules)


Following steps were taken to setup Git repository on the VPS: # Copy initial admin public key to the server under

cp /tmp/

Install Gitolite

aptitude install gitolite

Reconfigure Gitolite

dpkg-reconfigure gitolite
Use the following arguments when asked:

Clone Gitolite

git clone git@

Web Server Nginx

aptitude install nginx
mkdir /etc/nginx/certificate
cd /etc/nginx/certificate (and create self signed certificate as described in
/srv/nginx/www is the web content folder edits are made to /etc/nginx/sites-available/*

Configuration file used: /etc/nginx/sites-available/default


add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java7-installer
update-java-alternatives -s java-7-oracle
apt-get install oracle-java7-set-default


wget -q -O - | sudo apt-key add -
sudo sh -c 'echo deb binary/ > /etc/apt/sources.list.d/jenkins.list'
sudo apt-get update
sudo apt-get install jenkins
sudo apt-get update
sudo apt-get install jenkins

Create Jenkins Certificate for Gitolite

ssh-keygen -t rsa -b 2048 -C "Jenkins"

Add the Jenkins new public key to Gitlolite and change the Gitolite configuration and push the modified configuration to Gitolite admin repo.

Redmine Installation

Install Requirements

Add the PostgreSQL repository to aptitude and fetch the public key:
$ sudo sh -c "touch /etc/apt/sources.list.d/postgresql.list & echo 'deb trusty-pgdg main' >> /etc/apt/sources.list.d/postgresql.list"
$ wget --quiet -O - | sudo apt-key add -
$ sudo apt-get update

apt-get install build-essential openssl libcurl4-openssl-dev libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion pkg-config imagemagick postgresql-9.1 postgresql-server-dev-9.1 libmagickwand-dev postgresql-client-9.1

Install Database
For PostgreSQL:

CREATE DATABASE myredminedb owner redmine;

NOTE for PostgreSQL Users: You will have to set the postgres user password before you can connect remotely. MySQL will force you to set this during the installation but Postgres does not. To do so:

su - postgres

This will take you to the postgres database prompt.

ALTER USER postgres with password 'my-secure-password';

Install rvm (Ruby Version Manager)

curl -L | bash -s stable --ruby

Installing Redmine

mkdir -d /srv/redmine
cd /srv/redmine
git clone

Setup redmine folder permissions

cd /srv/redmine
mkdir public/plugin_assets
chown -R www-data:www-data files log tmp public/plugin_assets
chmod -R 755 files log tmp public/plugin_assets

DB settings

vi config/database.yml

    adapter: postgresql
    database: redminedb
    host: localhost
    username: redmine
    password: "HelloWorld!"
    encoding: utf8

Dependencies installation

apt-get install ruby ruby1.9.1-dev
gem install bundler
gem install holidays --version 1.0.3
gem install holidays
cd /srv/redmine/plugins
git clone git://
cd redmine_backlogs
export RAILS_ENV
bundle config build.nokogiri --use-system-libraries
bundle install --without sqlite development test --path bundle

Create DB

in /srv/redmine, do:
bundle exec rake db:migrate

If this fails, and you are doing the installation using 'sudo', make sure the environment variables get passed to sudo, i.e. sudo -E <command>

Default data

bundle exec rake redmine:load_default_data

Session store secret generation 

bundle exec rake generate_secret_token
bundle exec rake tmp:cache:clear
bundle exec rake tmp:sessions:clear
cd /srv/redmine
bundle exec rake redmine:backlogs:install

Test Installation

ruby script/rails server webrick -e production
gem install thin
mkdir /var/log/thin
mkdir /etc/thin
rvmsudo thin config -C /etc/thin/redmine -c /srv/redmine -e production --prefix=/redmine -a -p 8000 -s 1 -l /var/log/thin
rvmsudo thin install
/usr/sbin/update-rc.d -f thin defaults

To createa a wrapper,

rvm wrapper <your_rvm_ruby_version>@<your_rvm_gemset_in_use> bootup thin

you can find the names by using rvm list and rvm gemset list  respectively. The wrapper will have name bootup_thin which you can confirm it is using the right rvm by which bootup_thin. You can give it whatever name you want while creating it. Then you need to edit thin script by

​vi /etc/init.d/thin

Change the original DAEMON to
Which should be the result of which bootup_thin. Then you can start the service.
thin start

vi /etc/nginx/sites-enabled/default

upstream redmine_server {

under port 80

 location ^~ /redmine {
   return 301 https://$host$request_uri;

 client_max_body_size 100M;
        location /redmine {
               proxy_set_header  Host $http_host;
               proxy_set_header  X-Real-IP  $remote_addr;
               proxy_set_header X_FORWARDED_PROTO https;
               proxy_redirect off;
               proxy_read_timeout 300;
               proxy_pass http://redmine_server/redmine;


chdir: "/srv/redmine"
environment: production
port: 8000
timeout: 30
log: "/srv/redmine/log/thin.log"
pid: tmp/pids/
max_conns: 1024
max_persistent_conns: 100
require: []
wait: 30
threadpool_size: 20
servers: 3
prefix: "/redmine"
daemonize: true

Next, we need to tell Redmine that it will be serving its assets (CSS and JS, images, etc) from /redmine, and not /.  To fix this, open up the file config/environment.rb and all this line to the bottom of it:
Redmine::Utils::relative_url_root = "/redmine"