|
1 | 1 | PXF Packaging |
2 | 2 | ============ |
3 | 3 |
|
4 | | -PXF consists of 3 groups of artifacts, each developed using a different underlying technology: |
| 4 | +Apache Cloudberry PXF (Platform Extension Framework) consists of 3 groups of artifacts, each developed using a different underlying technology: |
5 | 5 |
|
6 | | -* Greenplum extension -- written in C; when built, produces a `pxf.so` library and configuration files |
| 6 | +* Apache Cloudberry extension -- written in C; when built, produces a `pxf.so` library and configuration files |
7 | 7 | * PXF Server -- written in Java; when built, produces a `pxf.war` file, Tomcat server, dependent JAR files, templates and scripts |
8 | 8 | * Script Cluster Plugin -- written in Go; when built, produces a `pxf-cli` executable |
9 | 9 |
|
10 | | -The PXF build system can create an RPM package on CentOs platform and a DEB package on Ubuntu platform, |
11 | | -respectively. PXF compiles against and generates a different package for every major Greenplum version. |
| 10 | +The PXF build system can create an RPM package on CentOS platform and a DEB package on Ubuntu platform, |
| 11 | +respectively. PXF compiles against and generates packages for Apache Cloudberry. |
12 | 12 |
|
13 | | -For example, `pxf-gp5-1.2.3-1.el7.x86_64.rpm` represents an RPM package of PXF version 1.2.3 intended to work with |
14 | | -Greenplum 5 on Centos / Redhat 7 operating systems. |
| 13 | +For example, `cloudberry-pxf-1.2.3-1.el7.x86_64.rpm` represents an RPM package of PXF version 1.2.3 intended to work with |
| 14 | +Apache Cloudberry on CentOS / Red Hat 7 operating systems. |
15 | 15 |
|
16 | 16 | ## PXF RPM specification |
17 | | -On Centos platforms PXF product is packaged as an RPM. The specification on how to build the RPM is provided by the |
18 | | -`pxf-gpX.spec` files in this directory. The following key design decisions were made: |
| 17 | +On CentOS platforms PXF product is packaged as an RPM. The specification on how to build the RPM is provided by the |
| 18 | +`cloudberry-pxf.spec` file in this directory. The following key design decisions were made: |
19 | 19 |
|
20 | | -* the name of the RPM package is `pxf-gpX`, where X is the major Greenplum version (e.g. `pxf-gp5`, `pxf-gp6`) |
21 | | -* to install a newer RPM package for the same Greenplum major release, a user will have to upgrade the PXF RPM |
22 | | -* the RPM installs PXF server into `/usr/local/pxf-gpX` directory (e.g. `/usr/local/pxf-gp6`) |
| 20 | +* the name of the RPM package is `cloudberry-pxf` |
| 21 | +* to install a newer RPM package, a user will have to upgrade the PXF RPM |
| 22 | +* the RPM installs PXF server into `/usr/local/cloudberry-pxf-[VERSION]` directory (e.g. `/usr/local/cloudberry-pxf-1.2.3`) |
23 | 23 | * the RPM is relocatable, a user can specify --prefix option when installing the RPM to install the server into another directory |
24 | | -* the PXF greenplum extension is initially installed by RPM alongside the PXF server and is not initially active |
25 | | -* the PXF greenplum extension is copied into Greenplum install location during `pxf init` command issued by a user after the install |
| 24 | +* the PXF Apache Cloudberry extension is initially installed by RPM alongside the PXF server and is not initially active |
| 25 | +* the PXF Apache Cloudberry extension is copied into Cloudberry install location during `pxf init` command issued by a user after the install |
26 | 26 | * the PXF RPM version number follows 3-number semantic versioning and must be provided during the RPM build process |
27 | 27 | * the PXF RPM release number is usually specified as `1` |
28 | | -* example PXF RPM names are : `pxf-gp5-1.2.3-1.el6.x86_64.rpm` and `pxf-gp5-1.2.3-1.el7.x86_64.rpm` |
| 28 | +* example PXF RPM names are : `cloudberry-pxf-1.2.3-1.el7.x86_64.rpm` and `cloudberry-pxf-1.2.3-1.el8.x86_64.rpm` |
29 | 29 |
|
30 | 30 | ## PXF RPM build process |
31 | 31 |
|
32 | 32 | To build an RPM, follow these steps: |
33 | 33 | 1. Install the `rpm-build` package: `sudo yum install rpm-build` |
34 | | -2. Install Greenplum database |
35 | | -3. Run `source $GPHOME/greenplum_path.sh` to configure your `PATH` to be able to find `pg_config` program |
| 34 | +2. Install Apache Cloudberry |
| 35 | +3. Run `source $GPHOME/greenplum_path.sh`(for Cloudberry 2.0) or `source $GPHOME/cloudberry-env.sh` (for Cloudberry 2.1+) to configure your `PATH` to be able to find `pg_config` program |
36 | 36 | 4. Run `make clean rpm` from the top-level directory to build artifacts and assemble the RPM |
37 | 37 | 5. The RPM will be available in `build/rpmbuild/RPMS` directory |
38 | 38 |
|
39 | 39 |
|
40 | 40 | ## PXF RPM installation process |
41 | 41 | To install PXF from an RPM, follow these steps: |
42 | | -1. Build or download PXF RPM for the corresponding major version of Greenplum. The following example will assume |
43 | | - that PXF version `1.2.3` will be installed to work with with Greenplum 5. |
44 | | -2. Decide which OS user will own the PXF installation. If PXF is installed alongside Greenplum, the user that owns the PXF |
45 | | -installation should either be the same as the one owning the Greenplum installation or have write privilleges to the |
46 | | -Greenplum installation directory. This is necessary to be able to register the PXF Greenplum extension with Greenplum. |
| 42 | +1. Build or download PXF RPM for Apache Cloudberry. The following example will assume |
| 43 | + that PXF version `1.2.3` will be installed to work with Apache Cloudberry. |
| 44 | +2. Decide which OS user will own the PXF installation. If PXF is installed alongside Apache Cloudberry, the user that owns the PXF |
| 45 | +installation should either be the same as the one owning the Cloudberry installation or have write privileges to the |
| 46 | +Cloudberry installation directory. This is necessary to be able to register the PXF Apache Cloudberry extension with Cloudberry. |
47 | 47 | 3. If a previous PXF version has been installed, stop the PXF server. |
48 | | -4. As a superuser, run `rpm -Uvh pxf-gp5-1.2.3-1.el7.x86_64.rpm` to install the RPM into `/usr/local/pxf-gp5` |
49 | | -5. As a superuser, run `chown gpadmin:gpadmin /usr/local/pxf-gp5` to change ownership of PXF installation to the user `gpadmin`. |
| 48 | +4. As a superuser, run `rpm -Uvh cloudberry-pxf-1.2.3-1.el7.x86_64.rpm` to install the RPM into `/usr/local/cloudberry-pxf-1.2.3` |
| 49 | +5. As a superuser, run `chown gpadmin:gpadmin /usr/local/cloudberry-pxf-1.2.3` to change ownership of PXF installation to the user `gpadmin`. |
50 | 50 | Specify a different user other than `gpadmin`, if desired. |
51 | 51 |
|
52 | 52 | After these steps, the PXF product will be installed and is ready to be configured. If there was a previous installation of |
53 | | -PXF for the same major Greenplum version, the files and the runtime directories from the older version will be removed. |
| 53 | +PXF, the files and the runtime directories from the older version will be removed. |
54 | 54 | The PXF configuration directory should remain intact. You will need to have Java installed to run the PXF server. |
55 | 55 |
|
56 | 56 | ## PXF removal process |
57 | 57 | To remove the installed PXF package, follow these steps: |
58 | 58 | 1. Stop the PXF server. |
59 | | -2. As a superuser, run `rpm -e pxf-gp5` (or `rpm -e pxf-gp6`). This will remove all files installed by the RPM package |
| 59 | +2. As a superuser, run `rpm -e cloudberry-pxf`. This will remove all files installed by the RPM package |
60 | 60 | and the PXF runtime directories. The PXF configuration directory should remain intact. |
0 commit comments