Skip to main content

Upgrade Guide for Ubuntu OS

A comprehensive guide for upgrading Ubuntu operating system from version 22 to 24 to ensure access to latest features, security updates, and ServiceOps compatibility.

Ubuntu OS upgrades are essential for maintaining system security, accessing latest features, and ensuring compatibility with ServiceOps applications. This guide covers the upgrade process from Ubuntu 22 to Ubuntu 24, which provides enhanced security, performance improvements, and long-term support.

Key Benefits of Ubuntu 24:

  • Enhanced Security: Latest security patches and vulnerability fixes
  • Performance Improvements: Optimized system performance and resource management
  • Long-term Support: Extended support lifecycle for enterprise environments
  • ServiceOps Compatibility: Full compatibility with ServiceOps v8.6.0 and above
  • Latest Features: Access to newest Ubuntu features and capabilities

Pre-Upgrade Requirements

System Prerequisites:

Before initiating the Ubuntu upgrade, ensure your system meets these requirements:

  • Current Version: Ubuntu 22.x (verified using cat /etc/os-release)
  • Internet Connectivity: Stable internet connection for package downloads
  • Disk Space: Minimum 10GB free space for upgrade packages and temporary files
  • Network Access: Port 1022 must be open for upgrade process
  • ServiceOps Compatibility: Verify ServiceOps version supports Ubuntu 24

Network Configuration:

Ensure port 1022 is open for the upgrade process:

# Option 1: Using iptables
sudo /sbin/iptables -I INPUT -p tcp --dport 1022 -j ACCEPT

# Option 2: Using ufw firewall
ufw allow 1022

Pre-Upgrade Checklist:

Complete these essential steps before starting the upgrade:

  • System Backup: Create complete system backup or VM snapshot
  • ServiceOps Backup: Backup ServiceOps database, application folder, and FileDB
  • Service Status: Stop ServiceOps services before upgrade
  • Disk Space: Verify adequate free disk space (minimum 10GB)
  • Network Connectivity: Test internet connectivity and port accessibility
  • Maintenance Window: Schedule upgrade during low-usage periods
  • Team Notification: Inform stakeholders about planned downtime
Backup Requirements

Always perform complete backups before OS upgrades. Refer to the Backup Procedure for detailed steps.

Upgrade Procedure

Step 1: Pre-Upgrade Preparations

System Backup:

  1. VM Snapshot: If running on a virtual machine, create a snapshot for recovery
  2. ServiceOps Backup: Take complete ServiceOps backups:
    • Database backup using ServiceOps interface
    • Application folder backup
    • FileDB folder backup
  3. Copy Backups: Copy all backup files to an external location

Stop ServiceOps Services:

Before upgrading Ubuntu, stop all ServiceOps services:

sudo systemctl stop ft-main-server.service ft-analytics-server.service

Verify services are stopped:

sudo systemctl status ft-main-server.service ft-analytics-server.service

Step 2: Verify Current Ubuntu Version

Check the current Ubuntu version before proceeding:

cat /etc/os-release

Ensure the system is running Ubuntu 22.x before proceeding with the upgrade.

Step 3: Update System Packages

  1. Update Package Lists:

    sudo apt update

  2. Upgrade Existing Packages:

    sudo apt upgrade -y

    Enter "y" to continue the process.

  3. Dist-upgrade for System Packages:

    sudo apt dist-upgrade -y

Step 4: Clean System Packages

  1. Remove Unnecessary Packages:

    sudo apt autoremove --purge -y

  2. Clean Package Cache:

    sudo apt clean

Step 5: Install Upgrade Tools

  1. Install Update Manager Core:

    sudo apt install update-manager-core

  1. Install Ubuntu Release Upgrader:

    sudo apt install ubuntu-release-upgrader-core

Release Upgrades Configuration

Before running the upgrade command, verify that /etc/update-manager/release-upgrades contains Prompt=lts parameter:

cat /etc/update-manager/release-upgrades

Step 6: Initiate Ubuntu Upgrade

  1. Start the Upgrade Process:

    sudo do-release-upgrade -d

  2. Confirm Upgrade: Enter "y" to continue the installation process

  3. Accept Terms: Enter "y" to accept the upgrade terms

  4. Proceed with Upgrade: Press "Enter" to continue

  5. Confirm Package Installation: Enter "y" to install new packages

Step 7: Configure System Settings

  1. Keyboard Configuration: Select "English" as the keyboard language

  2. Keyboard Layout: Select "English (US)" as the keyboard layout

  3. SSH Server Configuration: Select "Keep the local version currently installed"

  4. Package Removal: Enter "N" to avoid removing extra packages during upgrade

  5. System Restart: Enter "y" to restart the system

Step 8: Post-Upgrade Verification

  1. Check Ubuntu Version: Verify the upgrade was successful

    cat /etc/os-release

  2. Clean Up Packages: Remove unnecessary packages after upgrade

    sudo apt autoremove

System Stabilization

After upgrading Ubuntu, allow approximately 15-20 minutes for system processes to synchronize and stabilize fully.

Post-Upgrade Procedures

Step 1: Restart ServiceOps Services

After Ubuntu upgrade completion and system stabilization:

  1. Start Main Services:

    sudo systemctl start ft-main-server.service ft-analytics-server.service

  2. Verify Service Status:

    sudo systemctl status ft-main-server.service ft-analytics-server.service

  3. Start Additional Services (if applicable):

    sudo systemctl start ft-plugin-server.service
    sudo systemctl start ft-file-server.service
    sudo systemctl start ft-chat-server.service
    sudo systemctl start ft-ai-server.service
    sudo systemctl start meshcentral.service

Step 2: Verify ServiceOps Functionality

  1. Application Access: Test ServiceOps web interface login
  2. Database Connectivity: Verify database connections and operations
  3. File Operations: Test file upload/download functionality
  4. Agent Communication: Verify agent connectivity and discovery
  5. Core Features: Test critical ServiceOps functionality

Step 3: System Health Checks

  1. System Resources: Monitor CPU, memory, and disk usage
  2. Network Connectivity: Verify network connectivity and firewall rules
  3. Service Logs: Check service logs for any errors or warnings
  4. Performance Monitoring: Monitor system performance and response times

Troubleshooting

Common Upgrade Issues

Network Connectivity Problems

Symptoms: Upgrade fails due to network connectivity issues

Resolution:

  1. Verify internet connectivity: ping 8.8.8.8
  2. Check DNS resolution: nslookup ubuntu.com
  3. Verify port 1022 is open: netstat -tuln | grep 1022
  4. Check firewall rules: sudo ufw status
Disk Space Issues

Symptoms: Upgrade fails due to insufficient disk space

Resolution:

  1. Check available disk space: df -h

  2. Clean package cache:

    sudo apt clean

  3. Remove unnecessary packages:

    sudo apt autoremove --purge

  4. Free up additional space if needed.

Service Startup Failures

Symptoms: ServiceOps services fail to start after upgrade

Resolution:

  1. Check service status:

    systemctl status <service-name>

  2. Review service logs:

    journalctl -u <service-name>

  3. Verify dependencies are installed.

  4. Restart services in proper order.

Package Dependency Issues

Symptoms: Package conflicts during upgrade

Resolution:

  1. Update package lists:

    sudo apt update

  2. Fix broken packages:

    sudo apt --fix-broken install

  3. Upgrade packages:

    sudo apt upgrade

  4. Clean package cache:

    sudo apt clean


Performance Optimization

Post-Upgrade Optimization

After successful upgrade, consider these optimizations:

  1. Package Cleanup: Remove unnecessary packages and clean cache
  2. Service Optimization: Optimize service configurations for Ubuntu 24
  3. Security Updates: Apply latest security patches
  4. Performance Monitoring: Monitor system performance and optimize as needed
Security Considerations
  1. Firewall Configuration: Verify firewall rules are properly configured
  2. Security Updates: Apply latest security patches
  3. Access Control: Review and update access controls
  4. Audit Logging: Enable and monitor audit logs

Maintenance and Monitoring

Regular Maintenance
  1. Package Updates: Regularly update system packages
  2. Security Patches: Apply security updates promptly
  3. System Monitoring: Monitor system performance and health
  4. Backup Scheduling: Ensure regular backups are maintained
Performance Monitoring
  1. System Resources: Monitor CPU, memory, and disk usage
  2. Service Performance: Monitor ServiceOps service performance
  3. Network Performance: Monitor network connectivity and bandwidth
  4. Error Tracking: Monitor and address system errors