Skip to content

Latest commit

Β 

History

History
377 lines (273 loc) Β· 8.63 KB

File metadata and controls

377 lines (273 loc) Β· 8.63 KB

Redmine Service

Redmine is a flexible project management and issue tracking web application.

Overview

Purpose: Project management and issue tracking Version: 6.0 Port: 3000 (application), 443 (nginx-tls) Database: External PostgreSQL Access: VPN-only via HTTPS Authentication: Redmine internal + LDAP (optional)

Features

  • Issue Tracking - Bugs, features, tasks
  • Project Management - Multiple projects, milestones
  • Wiki - Documentation and knowledge base
  • Time Tracking - Log work hours
  • Gantt Charts - Project timelines
  • Version Control Integration - Git, SVN
  • Custom Fields - Extensible data model
  • Plugins - Rich ecosystem

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚         Redmine Pod                 β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚ nginx-   │─▢│   Redmine        β”‚ β”‚
β”‚  β”‚ tls      β”‚  β”‚   (port 3000)    β”‚ β”‚
β”‚  β”‚ (443)    β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚            β”‚
β”‚                         β–Ό            β”‚
β”‚              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”‚
β”‚              β”‚   PostgreSQL   β”‚      β”‚
β”‚              β”‚   (external)   β”‚      β”‚
β”‚              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β”‚
β”‚                                      β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                        β”‚
β”‚  β”‚Tailscale β”‚ VPN connectivity       β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ (optional)             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Configuration

Terraform Variables

# terraform.tfvars
redmine_enabled           = true
redmine_image             = "redmine:6.0"
redmine_hostname          = "redmine.example.com"
redmine_tailscale_enabled = false  # Optional VPN

# Database configuration
redmine_db_host     = "postgres.external.com"
redmine_db_port     = 22110
redmine_db_name     = "redmine"
redmine_db_user     = "redmine"
redmine_db_password = "secure-password"

Environment Variables

# .env
REDMINE_DB_HOST="postgres.external.com"
REDMINE_DB_PORT="22110"
REDMINE_DB_NAME="redmine"
REDMINE_DB_USER="redmine_user"
REDMINE_DB_PASSWORD="your-secure-password"

Resource Limits

redmine_cpu_request    = "500m"
redmine_memory_request = "1Gi"
redmine_cpu_limit      = "2"
redmine_memory_limit   = "2Gi"

Database Setup

External PostgreSQL Required

Redmine requires an external PostgreSQL database:

  1. Create database:
CREATE DATABASE redmine CHARACTER SET utf8mb4;
CREATE USER redmine WITH PASSWORD 'secure-password';
GRANT ALL PRIVILEGES ON DATABASE redmine TO redmine;
  1. Configure in terraform.tfvars:
redmine_db_host     = "your-postgres-host"
redmine_db_port     = 5432
redmine_db_name     = "redmine"
redmine_db_user     = "redmine"
redmine_db_password = "secure-password"

Test Database Connection

python scripts/redmine/test_connection.py

Access

Web UI

# Via VPN (if tailscale enabled) or direct
open https://redmine.example.com

First Login

Default admin account:

  • Username: admin
  • Password: admin

Important: Change admin password immediately!

  1. Login with default credentials
  2. Click "My account" (top right)
  3. Change password
  4. Update email address

Common Operations

Backup Database

# Create timestamped backup
python scripts/redmine/backup_restore_db.py backup

# Output: backups/redmine_backup_YYYYMMDD_HHMMSS.sql

Restore Database

# Restore from backup file
python scripts/redmine/backup_restore_db.py restore \
  --file backups/redmine_backup_20241110_143000.sql

View Logs

# Redmine application logs
kubectl logs -n dev redmine-0 -c redmine -f

# Database query logs
kubectl logs -n dev redmine-0 -c redmine | grep -i "sql"

Install Plugin

# Copy plugin to pod
kubectl cp ./redmine_plugin dev/redmine-0:/usr/src/redmine/plugins/ -c redmine

# Run migrations
kubectl exec -n dev redmine-0 -c redmine -- \
  bundle exec rake redmine:plugins:migrate RAILS_ENV=production

# Restart Redmine
kubectl delete pod redmine-0 -n dev

Update Redmine

# Update image version in terraform.tfvars
redmine_image = "redmine:6.1"

# Apply changes
terraform apply

# Run database migrations (if needed)
kubectl exec -n dev redmine-0 -c redmine -- \
  bundle exec rake db:migrate RAILS_ENV=production

Project Management

Create Project

  1. Admin β†’ Projects β†’ New Project
  2. Fill in details:
    • Name: Project name
    • Identifier: URL-safe identifier
    • Public: Visibility setting
  3. Enable modules (Issues, Wiki, etc.)
  4. Save

Add Users

  1. Admin β†’ Users β†’ New user
  2. Fill in user details
  3. Add to project:
    • Project β†’ Settings β†’ Members
    • Add user with role

Issue Workflows

  1. Admin β†’ Workflow
  2. Configure statuses and transitions
  3. Set permissions per role

Troubleshooting

Cannot Connect to Database

# Test database connectivity
python scripts/redmine/test_connection.py

# Check from pod
kubectl exec -n dev redmine-0 -c redmine -- \
  nc -zv postgres.external.com 22110

# Check database credentials
kubectl get secret redmine-db -n dev -o yaml

Redmine Not Starting

# Check pod status
kubectl describe pod redmine-0 -n dev

# View logs
kubectl logs -n dev redmine-0 -c redmine

# Common issues:
# - Database not accessible
# - Missing database migrations
# - Insufficient resources

500 Internal Server Error

# Check logs for stack trace
kubectl logs -n dev redmine-0 -c redmine | tail -100

# Common causes:
# - Database connection lost
# - Plugin incompatibility
# - Missing assets (run: bundle exec rake assets:precompile)

Slow Performance

# Check resource usage
kubectl top pod redmine-0 -n dev

# Increase resources:
redmine_cpu_limit    = "4"
redmine_memory_limit = "4Gi"

# Optimize database
# Run VACUUM ANALYZE on PostgreSQL

# Enable caching in config/additional_environment.rb:
config.cache_store = :mem_cache_store

LDAP Integration (Optional)

Configure LDAP Authentication

  1. Admin β†’ LDAP authentication
  2. New authentication mode
  3. Configure FreeIPA:
    • Name: FreeIPA
    • Host: freeipa.dev.svc.cluster.local
    • Port: 636
    • LDAPS: Yes
    • Base DN: cn=users,cn=accounts,dc=dev,dc=svc,dc=cluster,dc=local
    • Login attribute: uid
    • Filter: (objectClass=person)

Test LDAP

  1. Try logging in with FreeIPA user
  2. Redmine creates account on first login
  3. Admin can assign roles

Backup Strategy

Automated Backups

Create cron job for regular backups:

# Daily backup at 2 AM
0 2 * * * cd /path/to/charon && python scripts/redmine/backup_restore_db.py backup

Backup Retention

Keep backups for:

  • Daily: 7 days
  • Weekly: 4 weeks
  • Monthly: 12 months

Disaster Recovery

  1. Restore database from backup
  2. Restore file attachments (if using file storage)
  3. Verify data integrity
  4. Test critical workflows

Security

  • Database credentials stored as Kubernetes secrets
  • VPN-only access (if Tailscale enabled)
  • IP allowlisting (100.64.0.0/10)
  • TLS certificates via cert-manager
  • Regular security updates
  • LDAPS for LDAP authentication

Performance Optimization

Database Tuning

-- Add indexes for frequently queried columns
CREATE INDEX idx_issues_assigned_to ON issues(assigned_to_id);
CREATE INDEX idx_issues_status ON issues(status_id);

Caching

Enable caching in config/additional_environment.rb:

config.cache_store = :mem_cache_store
config.action_controller.perform_caching = true

Resource Allocation

For large teams (50+ users):

redmine_cpu_limit      = "4"
redmine_memory_limit   = "4Gi"

Related Documentation


Navigation: Documentation Index | Home