Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Gpdb
提交
48fb29ab
G
Gpdb
项目概览
Greenplum
/
Gpdb
通知
7
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
G
Gpdb
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
48fb29ab
编写于
1月 26, 2018
作者:
L
Lav Jain
提交者:
GitHub
1月 26, 2018
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update readme instructions for using docker for building GPDB (#4424)
* Update readme instructions for using docker for building GPDB
上级
4645fb87
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
60 addition
and
62 deletion
+60
-62
README.md
README.md
+3
-56
src/tools/docker/README.md
src/tools/docker/README.md
+51
-4
src/tools/docker/centos6-gpadmin/Dockerfile
src/tools/docker/centos6-gpadmin/Dockerfile
+3
-1
src/tools/docker/centos7-gpadmin/Dockerfile
src/tools/docker/centos7-gpadmin/Dockerfile
+3
-1
未找到文件。
README.md
浏览文件 @
48fb29ab
...
...
@@ -185,69 +185,16 @@ See [more information about gpperfmon here](gpAux/gpperfmon/README.md)
gpperfmon is dependent on several libraries like apr, apu, and libsigar
## Development with
Native Docker Client
## Development with
Docker
See
[
README.docker.md
](
README.docker.md
)
.
## Development with Docker Machine
We provide a docker image with all dependencies required to compile and test
GPDB. You can view the dependency dockerfile at
`./src/tools/docker/base/Dockerfile`
.
The image is hosted on docker hub at
`pivotaldata/gpdb-devel`
. This docker
image is currently under heavy development.
GPDB
[
(See Usage)
](
src/tools/docker/README.md
)
. You can view the dependency dockerfile at
`./src/tools/docker/centos6-admin/Dockerfile`
.
The image is hosted on docker hub at
`pivotaldata/gpdb-dev:centos6-gpadmin`
.
A quickstart guide to Docker can be found on the
[
Pivotal Engineering Journal
](
http://engineering.pivotal.io/post/docker-gpdb/
)
.
Known issues:
*
The
`installcheck-world`
make target has at least 4 failures, some of which
are non-deterministic
### Running regression tests with Docker
1.
Create a docker host with 8GB RAM and 4 cores
```
bash
docker-machine create
-d
virtualbox
--virtualbox-cpu-count
4
--virtualbox-disk-size
50000
--virtualbox-memory
8192 gpdb
eval
$(
docker-machine
env
gpdb
)
```
1.
Build your code on gpdb-devel rootfs
```
bash
cd
[
path/to/gpdb]
docker build
.
# image beefc4f3 built
```
The top level Dockerfile will automatically sync your current working
directory into the docker image. This means that any code you are working
on will automatically be built and ready for testing in the docker context
1.
Log into docker image
```
bash
docker run
-it
beefc4f3
```
1.
As
`gpadmin`
user run
`installcheck-world`
```
bash
su gpadmin
cd
/workspace/gpdb
make installcheck-world
```
### Caveats
*
No Space Left On Device:
On macOS the docker-machine vm can periodically become full with unused images.
You can clear these images with a combination of docker commands.
```
bash
# assuming no currently running containers
# remove all stopped containers from cache
docker ps
-aq
| xargs
-n
1 docker
rm
# remove all untagged images
docker images
-aq
--filter
dangling
=
true
| xargs
-n
1 docker rmi
```
*
The Native macOS docker client available with docker 1.12+ (beta) or
Community Edition 17+ may also work
## Development with Vagrant
There is a Vagrant-based
[
quickstart guide for developers
](
src/tools/vagrant/README.md
)
.
...
...
src/tools/docker/README.md
浏览文件 @
48fb29ab
# Docker container with GPDB for development/testing
## Build locally
```
# Centos 6 (include dependencies for building GPDB)
docker build -t local/gpdb-dev:centos6 centos6
# Add gpadmin user to Centos 6 (gpdb cannot run as root)
docker build --build-arg REPO_OWNER=local -t local/gpdb-dev:centos6-gpadmin centos6-gpadmin
# Centos 7 (include dependencies for building GPDB)
docker build -t local/gpdb-dev:centos7 centos7
# Add gpadmin user to Centos 7 (gpdb cannot run as root)
docker build --build-arg REPO_OWNER=local -t local/gpdb-dev:centos7-gpadmin centos7-gpadmin
```
OR
## Download from docker hub
```
docker pull pivotaldata/gpdb-dev:centos6-admin
docker pull pivotaldata/gpdb-dev:centos7-admin
```
# Build GPDB code with Docker
### Clone GPDB repo
```
git clone https://github.com/greenplum-db/gpdb.git
cd gpdb
```
### Use docker image based on gpdb/src/tools/docker/centos7-gpadmin
```
docker run -w /home/build/gpdb -v ${PWD}:/home/build/gpdb:cached -it pivotaldata/gpdb-dev:centos7-gpadmin /bin/bash
```
docker build -t pivotaldata/gpdb-dev:centos6 centos6
docker build -t pivotaldata/gpdb-dev:centos6-gpadmin centos6-gpadmin
docker build -t pivotaldata/gpdb-dev:centos7 centos7
docker build -t pivotaldata/gpdb-dev:centos7-gpadmin centos7-gpadmin
### Inside docker
(Total time to build and run ~ 15-20 min)
```
# ORCA is disabled here to keep the instructions simple
./configure --enable-debug --with-perl --with-python --with-libxml --disable-orca --prefix=/usr/local/gpdb
make -j4
# Install Greenplum binaries (to /usr/local/gpdb)
make install
# Create a single node demo cluster with three segments
# PGPORT is set to 15432
source /usr/local/gpdb/greenplum_path.sh
make create-demo-cluster
source ./gpAux/gpdemo/gpdemo-env.sh
# Create and use a test database
createdb greenplum
psql -d greenplum
```
\ No newline at end of file
src/tools/docker/centos6-gpadmin/Dockerfile
浏览文件 @
48fb29ab
FROM
pivotaldata/gpdb-dev:centos6
ARG
REPO_OWNER=pivotaldata
FROM
${REPO_OWNER}/gpdb-dev:centos6
# create user gpadmin since GPDB cannot run under root
RUN
groupadd
-g
1000 gpadmin
&&
useradd
-u
1000
-g
1000 gpadmin
&&
\
...
...
src/tools/docker/centos7-gpadmin/Dockerfile
浏览文件 @
48fb29ab
FROM
pivotaldata/gpdb-dev:centos7
ARG
REPO_OWNER=pivotaldata
FROM
${REPO_OWNER}/gpdb-dev:centos7
# create user gpadmin since GPDB cannot run under root
RUN
groupadd
-g
1000 gpadmin
&&
useradd
-u
1000
-g
1000 gpadmin
&&
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录