Ready to work
- Docker environment
- Greenplum installation package
greenplum-db-6.4.0-rhel7- x86_64.rpm Password: sv4p
installation
- Dockerfile file
FROM lyasper/gphost
COPY greenplum-db-6.4.0-rhel7-x86_64.rpm /home/gpadmin/greenplum-db.rpm
RUN rpm -i /home/gpadmin/greenplum-db.rpm --nodeps --force
RUN chown -R gpadmin /usr/local/greenplum-db*
RUN rm -f /home/gpadmin/greenplum-db.rpm
- docker-compose.yaml file
version: '3'
services:
mdw:
hostname: mdw
image: "mygreenplum"
ports:
- "2222:22"
- "5432:5432"
sdw1:
hostname: sdw1
image: "mygreenplum"
sdw2:
hostname: sdw2
image: "mygreenplum"
etl:
hostname: etl
image: "mygreenplum"
- Execution Dockerfile
docker build . -t mygreenplum
- Execution docker-compose
docker-compose up -d # 在docker-compose.yaml所在目录执行
Cluster configuration
Currently Docker container has started, but has not changed the configuration of greenplum
- Log in to the master node greenplum
ssh -p 2222 [email protected]
# 密码 changeme
- First refresh profile
source /usr/local/greenplum-db/greenplum_path.sh
- Initial Configuration
./artifact/prepare.sh -s 2 -n 2
# -s 表示 segment 机器(容器)的个数
# -n 表示每个容器里 primary segment 的个数
- Cluster initialization
source env.sh
gpinitsystem -a -c gpinitsystem_config
At this point the installation is successful