tree: d5411fe7131c6a0f346bfea6a9b5421aa7ec333c [path history] [tgz]
  1. .gitignore
  4. pom.xml
  5. src/

HAWQ Ambari Plugin

hawq-ambari-plugin helps users install HAWQ and PXF using Ambari.

To ensure that Ambari recognizes HAWQ and PXF as services that can be installed for a specific stack, the following steps are required:

  • Add HAWQ and PXF metainfo.xml files (containing metadata about the service) under the stack to be installed.
  • Add repositories where HAWQ and PXF rpms reside, so that Ambari can use it during installation. This requires updating repoinfo.xml under the stack HAWQ and PXF is to be added.
  • If a stack is already installed using Ambari, add repositories to the existing stack using the Ambari REST API.

The above steps are taken care of by the hawq-ambari-plugin when the ./ command is used.

Source Code

Source code directory structure of the hawq-ambari-plugin is as follows:

+-- pom.xml
+-- src
    +-- main
        +-- resources
            +-- services
            ¦   +-- HAWQ
            ¦   ¦   +-- metainfo.xml
            ¦   +-- PXF
            ¦       +-- metainfo.xml
            +-- utils
                +-- contains properties required for building the plugin.


metainfo.xml contains the metadata about the service. The metainfo.xml specifies that the service definition is to be inherited from Ambari common-services. HAWQ and PXF common-services code can be found under Apache Ambari repository. deploys HAWQ and PXF metainfo.xml files under the stack and adds the repositories to Ambari.

Building the plugin

Build Environment: centos6 is the typical operating system used for building.

Properties specified in the file:

hawq.release.versionRelease version of HAWQ2.0.1 common services code in Ambari to be inherited2.0.0
pxf.release.versionRelease version of PXF3.0.1 common services code in Ambari to be inherited3.0.0
hawq.repo.prefixRepository name for HAWQ core repositoryhawq
hawq.addons.repo.prefixRepository name for HAWQ Add Ons repositoryhawq-add-ons
repository.versionRepository Version to be used in repository information2.0.1.0
default.stackDefault stack under which, metainfo.xml and repositories have to be addedHDP-2.4

To build the rpm for hawq-ambari-plugin, change the file with the required parameters and run mvn install command under hawq-ambari-plugin directory:

$ pwd
$ mvn clean resources:copy-resources rpm:rpm -Dbuild_number=1


Installing the hawq-ambari-plugin rpm would lay down the following directory:

+-- staging
    +-- HAWQ
    ¦   +-- metainfo.xml
    +-- PXF
        +-- metainfo.xml

Prerequisite: Ensure that the script is run on the host where Ambari server is running.

Replace <ambari-username> and <ambari-password> with login Ambari credentials.

If hawq- and hawq-add-ons- repository have been set up on the Ambari server host, run the following command:

$ ./ --user <ambari-username> --password <ambari-password> --stack HDP-2.5

If --stack is not mentioned, HDP-2.4 stack will be used as default parameter.

If hawq- and hawq-add-ons- repository have been set up on a different host than the Ambari server host, run the following command:

$ ./ --user <ambari-username> --password <ambari-password> --stack HDP-2.5 --hawqrepo --addonsrepo

Please restart ambari-server after running the script so that the changes take effect:

$ ambari-server restart