oci

Bitnami How-To Guides for Oracle Cloud Infrastructure

Manage projects with Redmine and Git on Oracle Cloud Infrastructure

Introduction

Redmine is a flexible project management web application. It is a Ruby on Rails-based application and supports several features that facilitate project management tasks: multiple project support, flexible role-based access control, issue tracking, Gantt chart and calendar, wiki, forums, and document management among others.

This guide will walk you through the complete process of creating users and groups, creating projects and adding new members to it, creating and working on project issues, managing workflows, and finally, integrating a Git repository on Redmine.

Assumptions and prerequisites

Step 1: Set up credentials, authentication, and notification emails

The first step is to log in to Redmine and then, to set up the basics: admin user credentials, registration mechanism, and email settings.

You can easily perform all of these actions from the “Administration” panel. Follow these instructions to prepare Redmine to start working with your projects.

Change the admin credentials

At the deployment time, an administration username and password has been randomly assigned to your instance. For security reasons, we strongly recommend changing them. To change the admin password:

  • On the top menu, click “Administration” to see the administration menu. Then, select the “Users” option.

    Select users option

  • In the “Users” panel, you should only see the default admin user. Click the administrator account (user) to edit it.

    Admin user

On the resulting screen you can edit all the information related to the selected user, such as:

  • Login username and password.
  • Notifications email.
  • Application language and other application preferences such as the font used for text areas.

  • Once you have edited the information, click “Save” to make the changes take effect.

    Edit Admin user

Configure the registration mechanism

By default, the application is configured to allow new users to register but requires an administrator to manually enable their accounts. To configure this setting:

  • On the “Administration” menu, click “Settings”.
  • Navigate to the “Authentication” tab.

These are the main options you should select from that section depending on the registration mechanism you want to establish for your Redmine:

  • Option 1: To force users to be logged in to use the application, enable the “Authentication required” option.
  • Option 2: To specify how new users should be registered in the system, select one of the options available in “Self-registration”.

    Select the registration mechanism

From this tab, you can also set the session expiration time or the maximum number of additional email addresses that users acn set.

  • Once you have configured these options, click “Save”.

Set up email settings

IMPORTANT: This section requires SSH access to the server. Our Redmine Demo Lab does not allow users to connect to the machine via SSH, so and you will not be able to follow the instructions below. To perform the actions below, you can deploy a server using your Oracle OCI account. Follow these instructions to deploy a Bitnami image on an Oracle Cloud Infrastructure server.

Redmine does not configure email settings by default, so another important step is to configure the application email settings to send notifications or invitations to your users.

TIP: For small or testing deployments, you can use a free email service like Gmail. If you have a larger installation that will send higher amount of emails, you should use another service such as SendGrid, Mailgun, or others.

The instructions below show how to configure Redmine with Gmail for sending emails through SMTP (Simple Mail Transfer Protocol).

  • Connect through SSH to the Redmine instance.
  • Open the /opt/bitnami/apps/redmine/htdocs/config/configuration.yml file with your preferred editor to find sample configuration settings for the most common scenarios, including Gmail.
  • Uncomment the Gmail settings so that you end up with the result below. Remember to update the USERNAME and PASSWORD variables with the correct credentials for the Gmail account you plan to use.

    # ==== SMTP server at using TLS (GMail)
    # This might require some additional configuration. See the guides at:
    # http://www.redmine.org/projects/redmine/wiki/EmailConfiguration
    #
    email_delivery:
     delivery_method: :smtp
     smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: 587
      domain: "smtp.gmail.com" # 'your.domain.com' for Google Apps
      authentication: :plain
      user_name: "USERNAME@gmail.com"
      password: "PASSWORD"
    
  • Restart Apache to make the changes take effect:

       $ sudo /opt/bitnami/ctlscript.sh restart apache
    

Step 2: Create a project in Redmine

Redmine allows you to manage multiple projects with a single installation. It also allows you to specify configuration settings for each project, such as the project visibility or to configure different sets or roles for users for different projects.

To test the capability of managing projects in Redmine, we will follow these steps:

  • Create new users on Redmine
  • Create a group for the project
  • Create a project
  • Add users to your project

Create new users on Redmine

When you first access Redmine, you only see the Administrator user in the “Administration -> Users” section. This was created when deploying the application. To create new users, follow these steps:

  • Navigate to the “Administration -> Users” section. Click “New user”.

    Click new user link

  • On the resulting screen, enter the required information and click “Create” to add the new user on the system.

    Create new user

  • Return to the “Users” section to see the new user on the users list:

    Check new user created

Create a group for the project

In addition to creating individual users, you can also group them for more convenient management. Groups can be added as a member of projects as if they were regular users. By adding a user to a group, the user automatically inherits its privileges.

To create a group:

  • Navigate to the “Administration -> Groups” section.

    Select the groups section

  • On the “Groups” overview screen, click “New Group”.

    Click new group link

  • Enter a name for your group. In this example, we chose “Project test group”. Click “Create”.

  • Navigate to the “Users” tab. Click “New user” to add users to your group.

  • Select the users you want to add to the group and click “Add”. You will see the list of users who belong to that group:

    Select users for a group

Now you can use this group to associate users to a project which shares the same privileges to interact with it.

Create a project

Redmine allows you to manage multiple projects with a single installation. It also allows you to specify configuration settings for each of them, such as the project visibility or the configuration of different sets or roles to users for different projects.

To create a project:

  • Navigate to the “Projects” option in the top menu. Then, click “New project”.

    Click new project link

  • In the project form, fill the required information. Set it as “Public” if you want to make the project visible for all users. If you uncheck the box, the project will only be accessible by project members.

This page also includes basic modules included by default, such as:

  • Issue tracking: Enables tracking of the versions, of the categories, and of a roadmap of the project.
  • Time tracking: Allows tracking the time spent when working on the issues.
  • News: Allows publishing news that is related to the project.
  • Documents: Allows adding documents to the project.
  • Files: Allows attaching files to the project.
  • Wiki: Enables the project wiki.
  • Repository: Allows browsing the repository and view the latest commits.
  • Forums: Enables the project forum.
  • Calendar: Creates a calendar with the project issues.
  • Gantt: Creates a Gantt diagram with the project issues.

Select which trackers you want to enable: Bug, Feature, or Support.

  • Enter the information and select both modules and trackers for your project. Then, click “Create”.

    Create a project

You can add new Trackers to customize your project workflows at any moment navigating to the “Administration -> Trackers” section.

Once you have created the project, you will see new tabs associated to it, depending on which modules you have enabled. From these, you can manage your project.

Project created

Add users to your project

Now it is time to add users to your project. In the current example, we will add the group we have created. As you will see below, you can also add individuals.

To add users to your project:

  • Navigate to “Settings -> Members”. Click the “New member” link.

    Add members to a project

  • On the pop-up window, select which users or groups you want to add to your project. Select the role they will have for managing the project. You can select more than one role at the same time.

NOTE: Remember, if you select a group, each member of this group will have the same role you select for the group.

Assign roles to project members

  • Click “Add” to finish the process. You will see the members and their roles in the “Members” dashboard.

    Check project members role

Step 3: Create, track and work on issues

Issues are created to define tasks for your projects (bugs, feature requests, and improvements) and to easily track who will be responsible of them, as well as their current status. The example below walks you through the process of creating an issue, updating it, and closing it when the issue has been solved. To do so:

  • Navigate to the project you want to configure and click on the “Issues” tab.

    Click Issues tab

  • On the “Issues” dashboard, click the “New issue” link.

    Click new issue

  • On the resulting screen, you will see the following fields. Enter the corresponding values that help you track the issue during its process.

    • Tracker: The kind of issue being creating (a bug, a new feature…).
    • Subject: A concise and clear description of the issue.
    • Description: A detailed description of the issue.
    • Status: The current status of the issue. This will usually be set to “New” when creating it.
    • Priority: The priority of the issue
    • Assignee: The member of the project will take care of resolving the issue.
    • Start Date: The date when the task starts.
    • Due date: The deadline of the task.
    • Estimated time: An estimation of how much time it should take.
    • % Done: The current progress of the issue (0% when creating it).
    • Watchers: The members of the project who will be notified when the issue changes.
  • Once you enter all the required information, click “Create” to proceed working and on tracking the issue.

    Create an issue

This new issue will be reflected in the project “Overview” section. You can track its status from there.

To see how to work on an issue and track its status, follow these steps:

  • Navigate to the “Issue” page and click “Edit”. This opens a new area in which you can add new details such as the time spent, the percentage of the work done, and the status of the issue. Click “Submit” to update the issue.

    Update the issue

You will see the changes recorded in the tracker:

Check issue tracker

Once the issue is finished, the last step will be to close it, which will usually also involve setting its “% Done” to 100% or setting the status to “Closed”.

Issue closed

Step 4: Create a customized workflow for your projects

Workflows allow you to define transitions between states for items recorded in your trackers. The available states depend on both the role assigned to the user and the kind of tracker in use. Let’s see how to customize workflows on Redmine to have total control of your projects.

The example below walks you through the configuration of a scenario in which developers can not close cases unless they are the ones implementing them (the assignee). In addition to this, we are going to specify which fields each role can modify based on the current state of the issue. To do so:

  • Navigate to the “Administration -> Workflow” section.

    Select Workflow section

  • Select the role and the tracker you want to change. Click “Edit”. In the example below, we selected the role “Developer” and the tracker “Support”.

    Edit workflow

You will see a set of tables that allows you to configure the allowed state transitions.

NOTE: You can provide additional transitions when the user is the author or the assignee.

Workflow table

  • Disable all checkboxes under the “Closed” column except those that are in the “Additional transitions allowed when the user is the assignee” section as shown below:

    Disable close cases for developers

  • Navigate to the “Fields permission” tab to specify which fields each role can modify based on the current state of the issue, and assign the permissions to each field you want to set for that role. Click “Save” to proceed with the changes made both in the “Status Transitions” and in the “Fields Permissions” tabs.

    Select the fields permission

Step 5: Use Git with Redmine

IMPORTANT: This section requires SSH access to the server. Our Redmine Demo Lab does not allow users to connect to the machine via SSH, so and you will not be able to follow the instructions below. To perform the actions below, you can deploy a server using your Oracle OCI account. Follow these instructions to deploy a Bitnami image on an Oracle Cloud Infrastructure server.

Redmine lets users check repository changes and link to cases. Follow the steps below:

  • Connect through SSH to the Redmine instance.
  • Clone the remote Git repository, or initialize a new one. Replace the REPO_URL placeholder with the correct repository URL and the REPO placeholder with the correct directory name for the cloned repository.

    cd $HOME
    mkdir repos
    cd repos
    sudo git clone REPO_URL --bare
    

NOTE: Include the –bare option regardless of whether you’re cloning an existing repository or initializing a new one

  • Create a new Redmine project.
  • From the project dashboard, select the “Settings -> Repositories” tab and add a new repository using the settings below. Replace the ID placeholder with a short identifier for the repository and the REPO placeholder with the correct directory name for the cloned repository.

    SCM: Git
    Identifier: ID
    Path to repository: /home/bitnami/repos/REPO
    

Once it is created, you will be able to see your repository from the Redmine user interface:

New repo created

Maintain your Git repo up-to-date

Redmine doesn’t fetch new commits out of Git. This means that if you don’t update your local Git repository, you will never see new commits in Redmine. For that reason, we recommend adding a cron job. To do so:

  • Open the /etc/crontab/ file and add the following line. Remember to replace the REPO placeholder with the correct directory name for the cloned repository.

    */5 * * * * bitnami cd /home/bitnami/repos/REPO && git fetch --all
    

Congratulations! Now you can monitor all the changes made in your Git repository from the Redmine user interface.

Last modification October 11, 2018