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
42 changes: 35 additions & 7 deletions docker_greenplum/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,48 @@
```bash
docker build -t qpod0dev/greenplum --build-arg "BASE_NAMESPACE=qpod" .
# GreenplumDB

docker run -it \
This is the docker contianer for starting a GreenplumDB 7 cluster.
https://docs.vmware.com/en/VMware-Greenplum/7/greenplum-database/landing-index.html

Note: After the creation of a cluster, it is required to initialize the cluster using the functions in `$GPHOME/entrypoint.sh`.

## Quick Start

To start a GPDB single node cluster, try the command below, or refer to the `example/gpdb-single-node/docker-compose.yml`

```bash
docker run -d \
-p 15432:5432 -p 10022:22 \
-v /data/database/gpdb:/data/gpdb \
-h gpdb-cdw \
--name gpdb-cdw \
docker.io/qpod0dev/greenplum \
bash
docker.io/qpod0dev/greenplum

docker run -d \
# to change the password for gpadmin db user, enter the container and execute the command below.
psql -d postgres -c "ALTER ROLE gpadmin WITH PASSWORD 'gpadmin';"
```

## Multi-node cluster on a single machine

Please refer to the file `example/gpdb-single-vm/docker-compose.yml`.
Note: it is neded to create folders `primary1` and `primary2` for segment nodes in `/data/database/greenplum`:
```
mkdir -pv /data/database/greenplum/primary1
mkdir -pv /data/database/greenplum/primary2
```

# Debug

```bash
# to build the docker image
docker build -t qpod0dev/greenplum --build-arg "BASE_NAMESPACE=qpod" .

docker run -it \
-p 15432:5432 -p 10022:22 \
-v /data/database/gpdb:/data/gpdb \
-h gpdb-cdw \
--name gpdb-cdw \
docker.io/qpod0dev/greenplum
docker.io/qpod0dev/greenplum \
bash

/bin/bash -c ${GPHOME}/entrypoint.sh
```
3 changes: 3 additions & 0 deletions docker_greenplum/example/gpdb-single-vm/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ services:
volumes:
- ./conf:/opt/gpdb/conf
- /data/database/greenplum:/data/gpdb
depends_on:
- sdw1
- sdw2

sdw1:
image: "docker.io/qpod/greenplum"
Expand Down
1 change: 1 addition & 0 deletions docker_greenplum/rootfs/opt/gpdb/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@ else
echo "Starting existing GPDB" && gpstart -a
fi
# tail -f gpAdminLogs/*.log
bash