Coder Social home page Coder Social logo

orhankislal / gpdb6-docker-compose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from jimmyyih/gpdb6-docker-compose

0.0 1.0 0.0 15 KB

Docker Compose for OSS GPDB 6X multinode cluster dev testing

License: Apache License 2.0

Dockerfile 2.53% Shell 97.47%

gpdb6-docker-compose's Introduction

GPDB 6 Docker Compose

This is a docker compose repository to build and orchestrate a GPDB 6X multinode cluster for dev testing. This can be useful when there is a need to have multiple hosts and the single-node gpdemo cluster is insufficient. The docker compose GPDB 6 cluster is ephemeral so the cluster can be discarded and rebuilt for quick and clean testing. The OS of choice here is CentOS 7.

Build the image

We need to build a local docker image that will be used for each container in the multinode cluster. The image here is specifically designed to work for GPDB 6 compilation and running the cluster.

pushd ./build/
docker build -t gpdb6-multinode-cluster/gpdb-image .
popd

Note: You only have to build the image once (unless there is an update to the build directory). The image is stored locally.

Set environment variables

The docker-compose.yaml uses two environment variables:

  1. $GPDB6_SRC (the path to your GPDB 6X source code)
Example:
export GPDB6_SRC=/Users/jyih/workspace/gpdb6

Note: The $GPDB6_SRC path will be mounted and used for compilation so it would be good to run git clean -xfd in the directory to rid of anything (e.g. MacOS compiled binaries).

  1. $PWD (the path to the top-level dir of this repository) Note: You have to run docker-compose in the top-level dir anyways so $PWD should always be correct.

Run docker compose

This step will create the GPDB hosts (3 containers), build a network bridge between the 3 containers, and mount a shared volume (the GPDB 6 source code and some orchestration scripts from this repository).

# In this repository's top-level dir
docker-compose up -d

Run coordinate-everything.sh script

This step will install the compiled GPDB 6 onto each host and run gpinitsystem to create the GPDB 6X cluster.

pushd ./scripts/
bash coordinate-everything.sh
popd

Afterwards, you'll be able to connect to the coordinator node and start your testing.

docker exec -it gpdb6-docker-compose_cdw_1 /bin/bash
su - gpadmin
source env.sh

Stop and delete everything

This step will destroy everything we've created. Run this when you no longer need the cluster.

# In this repository's top-level dir
docker-compose down -v

gpdb6-docker-compose's People

Contributors

jimmyyih avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.