Skip to content
Brian Riley edited this page Sep 30, 2021 · 17 revisions

Requirements

Roadmap is a Ruby on Rails application that requires the following:

  • Ruby >= 2.6.3
  • Rails >= 5.2
  • PostgreSQL >= 9.2 or MySQL >= 5.5
  • Yarn 1.22.4
  • Node.js 10.x for management of assets (DMPRoadmap is using the Rails asset pipeline with Webpacker)
  • ImageMagick used by the Dragonfly gem to manage logos

Further details on how to install Ruby on Rails applications are available from the Ruby on Rails site:

Further details on how to install the database server and create your first user and database. Be sure to follow the instructions for your particular environment.

You may also find the following resources useful:

Installation

Create your database

  • For MySQL: Select UTF-8 Unicode (utf8mb4) encoding.

Fork the repository and then clone it onto your server

We advise that you create a fork of this repository to store your local customization and branding. Then clone that fork.

Navigate to the cloned repository and run the following from the project root to install all of the dependencies (assuming you have Ruby and Node installed):

  1. gem install bundler
  2. bundle install
  3. yarn install

Setup your Rails credentials file.

  1. Run EDITOR=vim bin/rails credentials:edit (use you favorite editor here if you don't like vim - see the Rails docs for more info)
  2. Copy / paste the contents of config/credentials.yml.example into the editor
  3. Modify the values (the DB credentials, secret_key_base and devise secret/pepper are the most important at this point). You can always run the above command again to make additional modifications
  4. This will generate a config/master.key and config/credentials.yml.enc file

Setup the application:

  1. Manually edit the new .env and config/dmproadmap.yml files created by the setup process
  2. Run cp ./dotenv.sample ./.env unless you already have your own version of this file in place
  3. Run cp ./config/dmproadmap.yml.example ./config/dmproadmap.yml unless your own version of this file in place
  4. Review the contents of these two files and update as needed
  5. Run bin/rails db:setup RAILS_ENV=development. Note that this will create a development DB and a corresponding test DB. It will fail if the DB already exists. If you want to start with a clean DB the run bin/rails db:drop RAILS_ENV=development to drop the DB before running db:setup. If you do not want to keep your existing DB then run bin/rails db:migrate RAILS_ENV=development to apply changes made to the DB since you created it.
  6. Run rails s to start the application
  7. Visit http://localhost:3000 in a browser to verify that the site is working
  8. Log in as the default super admin account: using the email+password option (default is: 'super_admin@example.com'+'password123')
  9. Go to the 'Edit Profile' page and change your email and password to something more secure

If you will be enabling any of the maDMP / Networked DMP features in the config/dmproadmap.yml file, you may also want to run the following Rake tasks depending on which features you enable:

  • To allow users to specify their research domain run bin/rails external_api:add_field_of_science_to_research_domains. Which will populate the research_domains table with the Field of Science categories defined by DataCite.
  • To allow users to specify their license for a research output run bin/rails external_api:load_spdx_licenses. Which will populate the licenses table with data from SPDX Database.
  • To allow users to specify their metadata standards for a research output run bin/rails external_api:load_rdamsc_standards. Which will populate the metadata_standards table with data from RDA Metadata Standards Catalog.
  • To allow users to specify their intended repositories for a research output run bin/rails external_api:load_re3data_repos. Which will populate the repositories table with data from Re3data.

Post Installation

You should perform the following tasks prior to deploying the system on a server that is accessible to the web:

  • Delete any other default users included in the seeds.rb file or at least change their passwords.

  • Update the site's Branding.

  • Please replace the app/views/branded files with your own copies. The DMPTool, UC3, CDL, DCC and DMPRoadmap logos and the DMPTool, DMPRoadmap names are for use by those organizations / applications.
  • Designate/create a default template. If a user creates a plan and specifies no research organization and no funder (or a combination that results in no published templates) then their plan is created using a default template. You must define your default template in the DB by setting templates.is_default equal to true.
Clone this wiki locally