Redmine Configuration¶
The following documents how Redmine is configured.
LDAP¶
Use the following LDAP settings in order for Redmine to authenticate with Active Directory.
Name: refol.us
Host: 192.168.2.251
Port: 389
Account: ldap_bind_user@refol.us
Base DN: CN=Users,DC=refol,DC=us
On-the-fly user creation: Enabled
Login attribute: sAMAccountName
Firstname attribute: givenName
Lastname attribute: sN
Email attribute: mail
These were adapted from the following Redmine documentation, https://www.redmine.org/projects/redmine/wiki/RedmineLDAP.
Repository¶
The Repository points to a local git repository that mirrors my GitHub Ansible repository. Configuring the repository is a matter of following the Redmine documentation. The repository is located in /data/redmine/repos.
Configuring the Repository¶
The first thing is to create and configure permission of the folder where the repository will be located.
sudo mkdir -p /data/redmine/repos
sudo chown redmine:redmine /data/redmine/repos
cd /data/redmine/repos
Ensure we are using the redmine local user for the rest of the steps.
sudo -u redmine -i
Second, create the bare repository by cloning the remote repository located in GitHub.
cd /data/redmine/repos
git clone --bare https://github.com/t3knoid/ansible.git
Update the bare repository.
cd /data/redmine/redmine-6.0.5/
./bin/rails runner "Repository.fetch_changesets" -e production
Finally, in order to update the repository run the following command.
git fetch origin +refs/heads/*:refs/heads/* && git reset --soft
Add this command to a cronjob of the redmine user and have it run every 10 minutes.
sudo crontab -u redmine -e
Add the following line in the crontab editor.
*/10 * * * * cd /data/redmine/repos/ansible.git && git fetch origin +refs/heads/*:refs/heads/* && git reset --soft