spec files and sources for building rpms
Note: Building rpms should be done on a linux OS
- Run
yum install rpm-build rpmrebuild rpmdevtools
- Run
rpmdev-setuptree
- Download rpm for HDP 3.1.4.0 version of service https://docs.cloudera.com/HDPDocuments/Ambari-2.7.3.0/bk_ambari-installation/content/hdp_31_repositories.html
- Download the tar.gz for the service and version you will be building an rpm for
- Run
rpmrebuild -e -p <rpm_file>
and when the editor opens save the spec file to /root/rpmbuild/SPECS directory ex. :w /root/rpmbuild/SPECS/ - Modify spec file as needed (this will likely be significant, accumulo specs can be used as examples)
- When you are ready to test run
rpmbuild -ba <spec_filename>
- The rpm will be available in /root/rpmbuild/RPMS directory
- Test the rpm by running a
yum localinstall <rpm_name>
- Run
createrepo /root/rpmbuild/RPMS
, a repodata folder will be created in RPMS directory - Upload the rpm and repodata directory to a folder in S3
- On a docker image with ambari installed, add the url to the S3 folder to /var/lib/ambari-server/resources/stacks/HDP/3.1/repos/repoinfo.xml
- Update the service version in /var/lib/ambari-server/resources/stacks/HDP/3.1/services/metainfo.xml
- Restart ambari-server and ambari-agent
- Login to ambari and create a cluster selecting your sevice and all dependency services