Background: Previously, there was an effort to add support for a Chinese operating system in Ambari, which required modifications in over 30 files. This approach was deemed risky, not conducive to testing, and hindered the review process.
Solution: It was later discovered that managing different operating systems in Ambari is actually straightforward. In theory, Ambari only needs minimal code changes, potentially just one file, to support all operating systems. The coupling between Ambari and operating systems primarily revolves around managing repositories and installing component packages using different package management tools like yum, apt, etc. Therefore, a simpler and more rational approach to supporting various operating systems involves using `distro.linux_distribution()` to obtain the OS name. Then, categorize these operating systems based on package management tools like yum or apt. For instance, all OSs using yum can be categorized as 'redhat' in the `_get_os_type()` function, while those using apt can be categorized as 'ubuntu'. Subsequently, Ambari's code will automatically select the appropriate package management tool based on the returned OS type, making the OS version irrelevant to Ambari itself. The OS version does matter for the big data components that Ambari needs to install, as different OS versions have varying glibc versions that may require repackaging, such as for Hadoop. Essentially, by modifying just one file, Ambari server can support all operating systems. As for the big data installation packages specific to each OS, compiling the corresponding packages using tools provided by Bigtop suffices. This approach significantly reduces the workload for adding support for new operating systems and allows for easily supporting a wide range of operating systems. In fact, this method has been successfully implemented in our production environment. For detailed discussions and the implementation code, please refer to the discussions in this PR: https://github.com/apache/ambari/pull/3757 Your input and feedback are welcome. Best regards, jialiang --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@ambari.apache.org For additional commands, e-mail: dev-h...@ambari.apache.org