[
https://issues.apache.org/jira/browse/AMBARI-26000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17815895#comment-17815895
]
Mohammad Arshad commented on AMBARI-26000:
------------------------------------------
Merged to trunk
https://github.com/apache/ambari/commit/5f95ec6c60ef17d65b0ef2b059feb1b9c482aaa4
Thanks [~leo wen], [~jialiang] for working on this issue.
Thanks [~bpatel], [~hmaurya] for verifying changes and suggesting fixes.
> Ambari supports Python3 environment
> -----------------------------------
>
> Key: AMBARI-26000
> URL: https://issues.apache.org/jira/browse/AMBARI-26000
> Project: Ambari
> Issue Type: New Feature
> Reporter: wenweijian
> Priority: Major
> Attachments: Ambari support python3.md
>
> Time Spent: 6h 50m
> Remaining Estimate: 0h
>
> This patch is about upgrade python3 on trunk branch.
> All unit tests are passed on python3 version.
> We also deploy it in the production environment(Centos7) and it works fine.
> h1. Upgrade Instructions:
> All major changes related to this upgrade are documented in the MD file of
> this issue. Colleagues who need to review and understand the upgrade changes
> can download and review it.
> 1. Required Dependencies:
> After upgrading to Python 3, Ambari requires the 'distro' dependency. To
> install it, run:
> {code:java}
> pip3 install distro {code}
> If you are using CentOS 7, manually install the following dependencies:
> {code:java}
> yum install python3 python3-libs python36-distro python36-rpm {code}
> 2. Compilation and Testing:
> To compile and package, use the following Maven command:
> {code:java}
> mvn -B clean install package rpm:rpm -Dbuild-rpm -Drat.skip=true -DskipTests
> -Dmaven.test.skip=true {code}
> To run unit tests for Ambari server, use:
> {code:java}
> mvn -am test -pl ambari-server -DskipSurefireTests
> -Dmaven.test.failure.ignore -Dmaven.artifact.threads=10 -Drat.skip
> -Dcheckstyle.skip {code}
> To run unit tests for Ambari agent, use:
> {code:java}
> mvn -am test -pl ambari-agent -DskipSurefireTests -Dmaven.test.failure.ignore
> -Dmaven.artifact.threads=10 -Drat.skip -Dcheckstyle.skip{code}
> Note: Before compiling, ensure that you create a symbolic link from
> 'python3' to 'python':
> {code:java}
> rm -f /usr/bin/python
> ln -s /usr/bin/python-3.x /usr/bin/python{code}
> This is necessary because the rpm-maven-plugin used by Ambari for RPM
> packaging defaults to using Python 2, and it cannot be configured to use
> Python 3. This symbolic link change may affect the use of 'yum.' To address
> this, modify the first line in the following files on CentOS 7:
> {code:java}
> /usr/libexec/urlgrabber-ext-down
> /usr/bin/yum
> Change '#!/usr/bin/python' to '#!/usr/bin/python2'{code}
> 3. Testing:
> All unit tests have passed, and we have tested manual installation and
> blueprint testing in the production environment, including common component
> operations.
> 4. How to Test Installation:
> Currently, the trunk supports testing installation on CentOS 7.
> Pre-install the Python 3 dependencies on CentOS 7:
> {code:java}
> yum install python3 python3-libs python36-distro python36-rpm{code}
> The installation steps are the same as before.
> Installation Note:
> Ambari trunk defaults to using the Apache Bigtop stack during installation,
> which relies on the {{bigtop-select}} tool. This tool currently defaults to
> Python 2, but we have updated it to Python 3 for testing purposes.
> Below are the Ambari RPMs required for trunk testing. All Big Data component
> RPMs (packaged using Apache Bigtop) are available for CentOS 7 since trunk
> currently only supports CentOS 7. Download links are provided below.
> http://64.69.37.12:8089/
> We plan to support more operating systems after upgrading to Python 3, which
> will make multi-OS support easier.
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]