Many organisations must soon upgrade to Oracle Linux (“OL”) version 7 or risk running on an unsupported platform. With Premier Support for OL 6 finishing in March 2021, now is the time to upgrade. But I.T. budgets are under pressure and an OL upgrade does not bring direct business benefits, so it is important to minimize the cost and effort required to deliver these upgrades.
We at Claremont have had several customers looking to upgrade their Linux operating system to OL 7. To achieve this in a consistent and efficient way, we decided to spend some time to develop a scripted upgrade methodology.
This works particularly well in our public Cloud environment, Claremont Cloud, but can be harnessed to work in a physical environment as well.
Migrate or Upgrade
There is no easy way to upgrade a distribution of Linux. There are options for in-place upgrades, but these methods destroy the source system and it can be a complicated task to unpick changes even requiring a system restore from backup.
To avoid this issue, Claremont has adopted an “upgrade via migration” methodology where we build an upgraded server alongside the source server and cut over to it. This is easy in a virtual environment as virtual hardware can be made available. In a physical environment this requires a new server to be procured to sit alongside the source. It is possible to use the same hardware, but this method would require robust backups of the previous version of operating system code on the server.
Build the Target Server
Initially we need a server built incorporating the later version of Linux, in this instance Oracle Linux 7, which can be done via a variety of methods. At Claremont we have a standard Kickstart script that consistently builds servers with virtualisation environment prerequisites configured for database servers, webservers, etc. This install can be done using other methods, but essentially is a “blank” Oracle Linux 7 install.
Capture the Source Configuration
Claremont’s proprietary script runs through the configuration on the source server and captures the key information related to that server, including:
- User SSH keys
- Home directory content
- Network configuration
- Interface configuration
- DNS configuration
- Routing Configuration
- Host file details
- Iptables/firewalld rules
- NTP/chronyd configuration
- Hostname configuration
- Filesystem configuration
- User/group passwords
- Crontab jobs
- Sysctl configuration & limits.conf settings
The above list is not an exhaustive list and many other elements are captured, but there are too many to list here! The configuration is captured in a single directory which is copied to the target server, either automatically as part of the script (if connectivity is available) or manually. A manual migration can be used when migrating within the same hardware. I.E. Capture source configuration, back up the migration data, rebuild the server as OL 7, then restore the migration data to the target before continuing.
Apply the Configuration to the Target
Once the migration area has been migrated to the target host, our proprietary target apply script takes over to go through the captured information and apply that to the target host.
This will leave the new server ready before the cut over, yet will leave certain services (e.g. network) disabled to ensure no complications with duplicate IP addresses and ARP timeouts.
Cut Over to the Target
In a virtual environment the cutover is easy:
We simply manipulate the Oracle VM configuration to plug in the virtual disk prepared with the OL 7 install and applied the configuration. This means that the remaining configuration of other disks will match that configuration migrated over from the file systems table (fstab) and ensures minimal human error.
Once the disk is put in place, we simply boot off this operating system image, run some verification steps, enable those purposefully “left down” network services and then start up any required applications/databases.
At this point we would apply any specific custom configuration or additional activity that needs to be factored into the work.
By approaching upgrades in this way, as a migration to a pre-configured operating system image, we remove many of the issues associated with manual activity and ensure that the process is as consistent and repeatable as possible. This has been done for a number of Claremont customers successfully and quickly, ensuring that operating system upgrades, which are commonly ignored as being problematic and difficult to achieve, can be performed without the level of perceived risk there may otherwise have been.
If you would like to find out more about upgrading from Oracle Linux 6 to 7, you can email us at email@example.com or phone us on +44 (0) 1483 549004.
Choosing the right Managed Services Provider
If you are looking for an Oracle partner who can help you with your Oracle Managed Services and goes about it the right way and can back up the talk, then contact us. If you would like to find out more about an Oracle Linux upgrade you can email us at firstname.lastname@example.org or phone us on +44 (0) 1483 549004.