Docker built using Greenplum

Ready to work

installation

  • Dockerfile file
    Here Insert Picture Description
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
    Here Insert Picture Description
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

Here Insert Picture Description

  • Execution docker-compose
docker-compose up -d # 在docker-compose.yaml所在目录执行

Here Insert Picture Description

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

Here Insert Picture Description
At this point the installation is successful

Published 19 original articles · won praise 8 · views 4538

Guess you like

Origin blog.csdn.net/M283592338/article/details/104648649