Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/publish-cloudberry-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,31 @@ jobs:
contents: write
steps:
- uses: actions/checkout@v4
with:
submodules: 'recursive'
- uses: actions/setup-node@v4
with:
node-version: 20

# Install dependencies and build site
- name: Install dependencies
run: npm install

- name: Initialize submodules
run: |
echo "Initializing git submodules..."
git submodule update --init --recursive
echo "Submodules initialized"

# Configure sparse checkout for PXF submodule
if [ -f "scripts/setup-pxf-submodule.sh" ]; then
echo "Configuring sparse checkout for PXF submodule..."
chmod +x scripts/setup-pxf-submodule.sh
./scripts/setup-pxf-submodule.sh
echo "Sparse checkout configured"
else
echo "WARNING: setup-pxf-submodule.sh not found, continuing without sparse checkout configuration"
fi

- name: Build site
run: |
Expand Down
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "pxf"]
path = pxf
url = https://github.com/apache/cloudberry-pxf.git
sparse-checkout = docs/
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,18 @@ sure no errors when building.
$ npm install
```

3. Build and run
3. Initialize submodules (required for PXF documentation)

This repository uses git submodules to include PXF documentation. After cloning, run:

```
$ git submodule update --init --recursive
$ ./scripts/setup-pxf-submodule.sh
```

The setup script configures sparse checkout to only include the `docs/` directory from the PXF submodule.

4. Build and run

```
$ npm run build
Expand Down
19 changes: 5 additions & 14 deletions docs/sys-admin/expand-cluster/post-expansion-tasks.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,15 @@ You can safely remove the expansion schema after the expansion operation is comp

## Set up PXF on the new host

:::tip
You can visit [PXF](/pxf) guides for more details.
:::

If you are using PXF in your Apache Cloudberry cluster, you must perform some configuration steps on the new hosts.

There are different steps to follow depending on your PXF version and the type of installation.

### PXF 5

- You must install the same version of the PXF `rpm` or `deb` on the new hosts.
- Log into the Cloudberry Coordinator and run the following commands:

```shell
gpadmin@gpcoordinator$ pxf cluster reset
gpadmin@gpcoordinator$ pxf cluster init
```


### PXF 6
### Apache Cloudberry PXF 2.x

- You must install the same version of the PXF `rpm` or `deb` on the new hosts.
- Log into the Cloudberry Coordinator and run the following commands:
Expand All @@ -52,5 +45,3 @@ There are different steps to follow depending on your PXF version and the type o
gpadmin@gpcoordinator$ pxf cluster register
gpadmin@gpcoordinator$ pxf cluster sync
```


12 changes: 12 additions & 0 deletions docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,18 @@ const config: Config = {
"@easyops-cn/docusaurus-search-local",
{ hashed: true, indexPages: true, language: ["en"] },
],
[
'@docusaurus/plugin-content-docs',
{
id: 'pxf',
path: 'pxf/docs',
routeBasePath: 'pxf',
sidebarPath: './sidebarsPxf.ts',
editUrl: 'https://github.com/apache/cloudberry-pxf/edit/main/docs/',
// Exclude repo-level non-doc files from being rendered as pages
exclude: ['README.md'],
},
],
],

presets: [
Expand Down
1 change: 1 addition & 0 deletions pxf
Submodule pxf added at dff263
49 changes: 49 additions & 0 deletions scripts/setup-pxf-submodule.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
#!/bin/bash

# Setup script for PXF submodule with sparse checkout
# This script configures sparse checkout for the PXF submodule to only include docs/ directory

set -e

echo "Setting up PXF submodule with sparse checkout..."

# Check if pxf directory exists
if [ ! -d "pxf" ]; then
echo "ERROR: pxf directory not found. Please run 'git submodule update --init --recursive' first."
exit 1
fi

# Navigate to pxf directory
cd pxf

# Check if .git directory exists (it might be a file pointing to parent .git/modules)
if [ -f ".git" ]; then
# It's a gitlink file, find the actual git directory
GITDIR=$(cat .git | sed 's/gitdir: //')
echo "Found git directory at: $GITDIR"

# Enable sparse checkout in the git module config
git config -f "$GITDIR/config" core.sparsecheckout true

# Create sparse-checkout file with docs/ pattern
mkdir -p "$(dirname "$GITDIR/info/sparse-checkout")"
echo "docs/" > "$GITDIR/info/sparse-checkout"

# Apply sparse checkout
git read-tree -mu HEAD

echo "Sparse checkout configured successfully!"
echo "Only 'docs/' directory will be checked out."

# Show what's actually in the directory
echo ""
echo "Current pxf directory contents:"
ls -la
else
echo "ERROR: Could not find .git configuration in pxf directory"
exit 1
fi

echo ""
echo "PXF submodule setup complete!"
echo "The submodule now only contains the docs/ directory."
6 changes: 5 additions & 1 deletion sidebars.ts
Original file line number Diff line number Diff line change
Expand Up @@ -736,8 +736,12 @@ const sidebars: SidebarsConfig = {
],
},
]
},
{
type: 'link',
label: 'Platform Extension Framework (PXF)',
href: '/pxf/',
}

]
}

Expand Down
15 changes: 15 additions & 0 deletions sidebarsPxf.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import type {SidebarsConfig} from '@docusaurus/plugin-content-docs';

/**
* PXF docs sidebar.
*
* This sidebar is consumed by the second docs plugin instance (id: 'pxf')
* which reads directly from the `pxf/docs` submodule.
*/
const sidebarsPxf: SidebarsConfig = {
pxfSidebar: [
{type: 'autogenerated', dirName: '.'},
],
};

export default sidebarsPxf;
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,15 @@ You can safely remove the expansion schema after the expansion operation is comp

## Set up PXF on the new host

:::tip
You can visit [PXF](/pxf) guides for more details.
:::

If you are using PXF in your Apache Cloudberry cluster, you must perform some configuration steps on the new hosts.

There are different steps to follow depending on your PXF version and the type of installation.

### PXF 5

- You must install the same version of the PXF `rpm` or `deb` on the new hosts.
- Log into the Cloudberry Coordinator and run the following commands:

```shell
gpadmin@gpcoordinator$ pxf cluster reset
gpadmin@gpcoordinator$ pxf cluster init
```


### PXF 6
### Apache Cloudberry PXF 2.x

- You must install the same version of the PXF `rpm` or `deb` on the new hosts.
- Log into the Cloudberry Coordinator and run the following commands:
Expand All @@ -53,4 +46,3 @@ There are different steps to follow depending on your PXF version and the type o
gpadmin@gpcoordinator$ pxf cluster sync
```


5 changes: 5 additions & 0 deletions versioned_sidebars/version-2.x-sidebars.json
Original file line number Diff line number Diff line change
Expand Up @@ -790,6 +790,11 @@
]
}
]
},
{
"type": "link",
"label": "Platform Extension Framework (PXF)",
"href": "/pxf/"
}
]
}
Loading