학교 다닐 때 행렬로 연립방정식 풀었던 기억이 날 듯 합니다. 선형대수(Linear Algebra)는 통계, 기계학습, 공학, 영상/이미지 처리 등 여러 분야에서 활용이 됩니다. 선형대수를 전부 다루려면 너무나 방대하므로, 이번 포스팅에서는 Python의 NumPy에 있는 선형대수(Linear Algebra) 함수들 중에서 자주 사용하는 함수에 대해서만 선별적으로 소개하겠습니다. 그리고 선형대수의 이론적인 부분은 별도로 참고할 수 있는 링크를 달도록 하겠습니다. 


  • 대각행렬 (Diagonal matrix): np.diag(x)
  • 내적 (Dot product, Inner product): np.dot(a, b)
  • 대각합 (Trace): np.trace(x)
  • 행렬식 (Matrix Determinant): np.linalg.det(x)
  • 역행렬 (Inverse of a matrix): np.linalg.inv(x)
  • 고유값 (Eigenvalue), 고유벡터 (Eigenvector): w, v = np.linalg.eig(x)
  • 특이값 분해 (Singular Value Decomposition): u, s, vh = np.linalg.svd(A)
  • 연립방정식 해 풀기 (Solve a linear matrix equation): np.linalg.solve(a, b)
  • 최소자승 해 풀기 (Compute the Least-squares solution): m, c = np.linalg.lstsq(A, y, rcond=None)[0]






  1. 대각행렬 (Diagonal matrix): np.diag(x)


대각행렬은 대각성분 이외의 모든 성분이 모두 '0'인 n차 정방행렬을 말합니다. 아래 예시의 행렬에서 빨간색으로 표시한 원소를 '0'으로 바꾼 행렬이 대각행렬입니다. 


* 참고 링크 : http://rfriend.tistory.com/141


 

In [1]: import numpy as np


In [2]: x = np.arange(9).reshape(3, 3)


In [3]: print(x)

[[0 1 2]

 [3 4 5]

 [6 7 8]]


In [4]: np.diag(x)

Out[4]: array([0, 4, 8])


In [5]: np.diag(np.diag(x))

Out[5]:

array([[0, 0, 0],

        [0, 4, 0],

        [0, 0, 8]])





  2. 내적 (Dot product, Inner product): np.dot(a, b), a.dot(b)


matrix dot product, inner product, scalar product, projection product

Python에서 '*' 를 사용한 두 행렬 간 곱은 원소 간 곱(element-wise product)을 반환하며, 선형대수에서 말하는 행렬 간 내적 곱을 위해서는 np.dot() 함수를 이용해야 합니다. 


원소 간 곱 (element-wise product)

: a*b

내적 (dot product, inner product)

: np.dot(a, b)

 

In [6]: a = np.arange(4).reshape(2, 2)


In [7]: print(a)

[[0 1]

 [2 3]]


In [8]: a*a

Out[8]:

array([[0, 1],

        [4, 9]])


In [6]: a = np.arange(4).reshape(2, 2)


In [7]: print(a)

[[0 1]

 [2 3]]


In [9]: np.dot(a, a)

Out[9]:

array([[ 2, 3],

        [ 6, 11]])



np.dot(a, b) NumPy 함수와 a.dot(b)의 배열 메소드의 결과는 동일합니다. 



In [10]: a.dot(a)

Out[10]:

array([[ 2, 3],

        [ 6, 11]])

 




  3. 대각합 (Trace): np.trace(x)


정방행렬의 대각에 위치한 원소를 전부 더해줍니다. 

아래의 2차 정방행렬 예의 대각합은 0+5+10+15 = 30 이 됩니다. (파란색으로 표시함)



In [12]: b = np.arange(16).reshape(4, 4)


In [13]: print(b)

[[ 0 1 2 3]

 [ 4 5 6 7]

 [ 8 9 10 11]

 [12 13 14 15]]


In [14]: np.trace(b)

Out[14]: 30

 



3차원 행렬에 대해서도 대각합을 구할 수 있습니다. 2차원은 대각선 부분의 원소 값을 전부 더하면 되지만 3차원 행렬에서는 대각(diagonal)이 어떻게 되나 좀 헷갈릴 수 있겠습니다. 아래의 3차원 행렬의 대각합을 구하는 예를 살펴보면, [0+12+24, 1+13+25, 2+14+26] = [36, 39, 42] 가 됩니다. 



In [15]: c = np.arange(27).reshape(3, 3, 3)


In [16]: print(c)

[[[ 0 1 2]

  [ 3 4 5]

  [ 6 7 8]]


 [[ 9 10 11]

  [12 13 14]

  [15 16 17]]


 [[18 19 20]

  [21 22 23]

  [24 25 26]]]


In [17]: np.trace(c)

Out[17]: array([36, 39, 42])

 




  4. 행렬식 (Matrix Determinant): np.linalg.det(x)


역행렬이 존재하는지 여부를 확인하는 방법으로 행렬식(determinant, 줄여서 det)이라는 지표를 사용합니다. 이 행렬식이 '0'이 아니면 역행렬이 존재하고, 이 행렬식이 '0'이면 역행렬이 존재하지 않습니다. 


* 참고 링크 : http://rfriend.tistory.com/142


아래의 예에서 array([[1, 2], [3, 4]]) 의 행렬식이 '-2.0'으로서, '0'이 아니므로 역행렬이 존재한다고 판단할 수 있습니다. 



In [18]: d = np.array([[1, 2], [3, 4]])


In [19]: np.linalg.det(a)

Out[19]: -2.0

 




  5. 역행렬 (Inverse of a matrix): np.linalg.inv(x)


역행렬은 n차정방행렬 Amn과의 곱이 항등행렬 또는 단위행렬 In이 되는 n차정방행렬을 말합니다. A*B 와 B*A 모두 순서에 상관없이 곱했을 때 단위행렬이 나오는 n차정방행렬이 있다면 역행렬이 존재하는 것입니다.

역행렬은 가우스 소거법(Gauss-Jordan elimination method), 혹은 여인수(cofactor method)로 풀 수 있습니다. 




In [20]: a = np.array(range(4)).reshape(2, 2)


In [21]: print(a)

[[0 1]

 [2 3]]


In [22]: a_inv = np.linalg.inv(a)


In [23]: a_inv

Out[23]:

array([[-1.5, 0.5],

        [ 1. , 0. ]])




위의 예제에서 np.linalg.inv() 함수를 사용하여 푼 역행렬이 제대로 푼 것인지 확인을 해보겠습니다. 역행렬의 정의에 따라서 원래의 행렬에 역행렬을 곱하면, 즉, a.dot(a_inv) 또는 np.dot(a, a_inv) 를 하면 단위행렬(unit matrix)가 되는지 확인해보겠습니다. 



In [24]: a.dot(a_inv)

Out[24]:

array([[1., 0.],

         [0., 1.]])

 




  6. 고유값 (Eigenvalue), 고유벡터 (Eigenvector): w, v = np.linalg.eig(x)


정방행렬 A에 대하여 Ax = λx  (상수 λ) 가 성립하는 0이 아닌 벡터 x가 존재할 때 상수 λ 를 행렬 A의 고유값 (eigenvalue), x 를 이에 대응하는 고유벡터 (eigenvector) 라고 합니다. 


np.linalg.eig() 함수는 고유값(eigenvalue) w, 고유벡터(eigenvector) v 의 두 개의 객체를 반환합니다. 


In [25]: e = np.array([[4, 2],[3, 5]])


In [26]: print(e)

[[4 2]

[3 5]]


In [27]: w, v = np.linalg.eig(e)


#  w: the eigenvalues lambda

In [28]: print(w)

[2. 7.]


# v: the corresponding eigenvectors, one eigenvector per column

In [29]: print(v)

[[-0.70710678 -0.5547002 ]

[ 0.70710678 -0.83205029]]

 



고유벡터는 배열 인덱싱하는 방법을 사용해서 각 고유값에 대응하는 고유벡터를 선택할 수 있습니다. 



# eigenvector of eigenvalue lambda 2

In [30]: print(v[:, 0]

[-0.70710678 0.70710678]


# eigenvector of eigenvalue labmda 7

In [31]: print(v[:, 1]

[-0.5547002 -0.83205029]

 




  7. 특이값 분해 (Singular Value Decomposition): u, s, vh = np.linalg.svd(A)


특이값 분해는 고유값 분해(eigen decomposition)처럼 행렬을 대각화하는 한 방법으로서, 정방행렬뿐만 아니라 모든 m x n 행렬에 대해 적용 가능합니다. 특이값 분해는 차원축소, 데이터 압축 등에 사용할 수 있습니다. 이론적인 부분은 설명하자면 너무 길기 때문에 이 포스팅에서는 설명하지 않겠으며, 아래의 링크를 참고하시기 바랍니다. 


* 참고 링크 : http://rfriend.tistory.com/185


아래의 np.linalg.svd(A) 예제는 위의 참고 링크에서 사용했던 예제와 동일한 것을 사용하였습니다. 


In [32]: A = np.array([[3,6], [2,3], [0,0], [0,0]])


In [33]: print(A)

[[3 6]

 [2 3]

 [0 0]

 [0 0]]


In [34]: u, s, vh = np.linalg.svd(A)


In [35]: print(u)

[[-0.8816746 -0.47185793 0. 0. ]

 [-0.47185793 0.8816746 0. 0. ]

 [ 0. 0. 1. 0. ]

 [ 0. 0. 0. 1. ]]


In [36]: print(s)

[7.60555128 0.39444872]


In [37]: print(vh)

[[-0.47185793 -0.8816746 ]

 [ 0.8816746 -0.47185793]]

 




  8. 연립방정식 해 풀기 (Solve a linear matrix equation): np.linalg.solve(a, b)


아래의 두 개 연립방정식의 해(x0, x1)를 np.linalg.solve(a, b) 함수를 사용하여 풀어보겠습니다. 



위의 연립방정식을 어떻게 행렬로 입력하고, np.linalg.solve(a, b)에 입력하는지 유심히 살펴보시기 바랍니다. 



In [38]: a = np.array([[4, 3], [3, 2]])


In [39]: b = np.array([23, 16])


In [40]: x = np.linalg.solve(a, b)


In [41]: print(x)

[2. 5.]

 



NumPy 가 제대로 x0, x1의 해를 풀었는지 확인해보겠습니다. x0=2, x1=5 가 해 맞네요!



In [42]: np.allclose(np.dot(a, x), b)

Out[42]: True

 




  9. 최소자승 해 풀기 (Compute the Least-squares solution)

     : m, c = np.linalg.lstsq(A, y, rcond=None)[0]


회귀모형 적합할 때 최소자승법(Least-squares method)으로 잔차 제곱합을 최소화하는 회귀계수를 추정합니다. 


* 참고 링크 : https://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.lstsq.html



아래의 예에서는 회귀계수 m, y절편 c를 최소자승법을 사용해서 구해보겠습니다. 



In [43]: x = np.array([0, 1, 2, 3])


In [44]: y = np.array([-1, 0.2, 0.9, 2.1])


In [45]: A = np.vstack([x, np.ones(len(x))]).T


In [46]: A

Out[46]:

array([[0., 1.],

        [1., 1.],

        [2., 1.],

        [3., 1.]])


In [47]: m, c = np.linalg.lstsq(A, y, rcond=None)[0]


In [48]: print(m, c)

0.9999999999999999 -0.9499999999999997

 



아래의 그래프에서 점은 원래의 데이터이며, 빨간색 선은 최소자승법으로 추정한 회귀식의 적합선이 되겠습니다. 



In [49]: import matplotlib.pyplot as plt

    ...: plt.plot(x, y, 'o', label='Original data', markersize=10)

    ...: plt.plot(x, m*x + c, 'r', label='Fitted line')

    ...: plt.legend()

    ...: plt.show()




많은 도움이 되었기를 바랍니다. 


Posted by R Friend R_Friend

이번 포스팅에서는 도커 허브(Docker Hub)에서 Greenplum Database(이하 GPDB)에 MADlib, PL/R, PL/Python이 설치된 Docker Image를 내려받아 분석 환경을 구성하는 방법을 소개하겠습니다. 


이번 포스팅에서 소개하는 gpdb-analytics 도커 이미지는 개인이 집이나 회사에서 GPDB로 MADlib, PL/R, PL/Python 사용하면서 테스트해보고 공부할 때 간편하게 사용할 수 있는 용도로 만든 것입니다. 



[사전 준비] Dokcer Install


Docker Image를 이용하여 GPDB+분석툴을 설치할 것이므로, 먼저 Docker Hub (https://hub.docker.com/)에서 회원가입을 하고, https://www.docker.com/products/docker-desktop 사이트에서 자신의 OS에 맞는 Docker를 다운로드 받아 설치하시기 바랍니다. 




단, Windows OS 사용자의 경우는 (1) Windows 10 Professional or Enterprise 64-bit 의 경우 'Docker CE for Windows'를 다운받아 설치하시구요, 그 이전 버전 혹은 Home Edition 버전 Windows OS 이용하시는 분의 경우는 'Docker Toolbox'를 다운로드 받아서 설치하시기 바랍니다. 





[ Docker Hub에서 gpdb-analytics 도커 이미지 내려받아서 GPDB 분석 환경 구성하기 ]


1. Docker Hub에서 gpdb-analytics 도커 이미지 내려받기 (docker pull)





(터미널 사용)

## Docker 이미지 내려 받기

$ docker pull hdlee2u/gpdb-analytics

## Docker 이미지 확인 하기

$ docker images

REPOSITORY               TAG                 IMAGE ID            CREATED             SIZE
centos                     7                   d123f4e55e12        9 months ago        197MB
hdlee2u/gpdb-base        latest              bfe4e63b8e81         2 years ago           1.17GB

hdlee2u/gpdb-analytics  latest           3be773a1a7e1        About a minute ago   4.93GB

 




2. 도커 이미지를 실행하여 Docker Container 를 생성하고, GPDB 분석 환경 시작하기



## Docker 이미지를 실행/ 5432 기본 포트로, ssh 2022포트를 사용하여 접근 가능하도록 Docker 컨테이너 생성

docker run -i -d -p 5432:5432 -p 28080:28080 --name gpdb-ds --hostname mdw hdlee2u/gpdb-analytics /usr/sbin/sshd -D


## Docker 컨테이너 목록 확인

$ docker ps

CONTAINER ID    IMAGE                   COMMAND                   CREATED             STATUS              PORTS                   NAMES

7518fd48450a        575a7d45999d        "/bin/bash"              1 minute ago         Up 6 hours                  0.0.0.0:5432->5432/tcp, 0.0.0.0:28080->28080/tcp   gpdb-ds



## Start GPDB and Use psql


$ docker exec -it gpdb-ds /bin/bash

[root@mdw /]# su - gpadmin
[gpadmin@mdw ~]$ gpstart -a
[gpadmin@mdw ~]$ psql
psql (8.3.23)
Type "help" for help.

gpadmin=# \dn
List of schemas
Name | Owner
--------------------+---------
gp_toolkit | gpadmin
information_schema | gpadmin
madlib | gpadmin
pg_aoseg | gpadmin
pg_bitmapindex | gpadmin
pg_catalog | gpadmin
pg_toast | gpadmin
public | gpadmin
(8 rows)

gpadmin=# \q




3. PGAdmin IV 로 GPDB 연결하기


GPDB 5.x 버전에서 SQL Query를 할 때 PGAdmin IV 를 사용합니다. (GPDB 5.x 버전에서는 PGAdmin III 는 작동하지 않으며, 반대로 GPDB 4.x 버전에서는 PGAdmin IV가 작동하지 않고 대신 PGAdmin III만 작동합니다)


PGAdmin IV 는 https://www.pgadmin.org/download/ 에서 다운로드 하여 설치하면 됩니다. 


  • Host : localhost
  • Port : 5432
  • Maintenance DB : gpadmin
  • Username : gpadmin
  • Password : pivotal
  • Group: Servers
  • Ternel port: 22






4. Jupyter Notebook으로 GPDB 연결하기


4-0. Python 2.7 version의 Anaconda 설치


https://www.anaconda.com/download 에서 자신의 OS에 맞는 Python 2.7 version의 Anaconda를 설치합니다. GPDB 5.x 버전은 Python 2.7 version을 지원합니다. 




Anaconda를 설치하였으면, Anaconda Navigator를 실행한 후 base(root) 환경(즉, python 2.7)에서 'Jupyter Notebook'의 Launch 단추를 눌러서 Jupyter Notebook을 실행합니다. 





터미널을 이용해서 가상환경을 조회, 선택하고 Jupyter Notebook을 실행할 수도 있습니다. 




# 가상 환경 리스트 조회

$ conda env list

 

# 가상 환경 선택 (가상환경 리스트에서 python 2.7 버전 선택, windows의 경우: activate env_name)

$ source activate env_name


# Jupyter Notebook 실행

$ jupyter notebook






4-1. pip install 로 추가로 필요한 Python 패키지 설치하기



(터미널에서)

$ pip install --upgrade pip


$ pip install psycopg2

$ pip install sqlalchemy

$ pip install sql_magic

$ pip install math

$ pip install textwrap

$ pip install os

$ pip install Ipython


$ pip install ipywidgets

$ jupyter nbextension enable --py widgetsnbextension

$ pip install pygraphviz





4-2.  Jupyter Notebook에서 DB Connection 설정하기

4-2-1. Python packages importing



# Common modules

import numpy as np

import pandas as pd

from pandas import DataFrame

from pandas import Series

import sklearn

import math

import textwrap as tw


# For DB Connecton

import psycopg2

from sqlalchemy import create_engine

import sql_magic


# For reproducibility

np.random.seed(2622)


# Directory

import os

 



4-2-2. Visualization Parms Setup



import matplotlib as mpl

import matplotlib.pyplot as plt

import seaborn as sns


# To draw plots in jupyter notebook

#%matplotlib inline

%pylab inline


from pylab import rcParams

rcParams['figure.figsize'] = 12, 8

rcParams['axes.labelsize'] = 14

rcParams['xtick.labelsize'] = 12

rcParams['ytick.labelsize'] = 12


pd.set_option('display.max_columns', None)

pd.set_option('display.max_colwidth', 1000)


# Display

import ipywidgets as widgets

import IPython.display as ipd

from IPython.display import display


# interpret string as markdown

def printmd(string):

    ipd.display(ipd.Markdown(string))


# seaborn style

sns.set(style="darkgrid")




4-2-3. Greenplum Database Connection Setup



# put your own GPDB information

user = 'gpadmin'

password = 'pivotal'

host = 'localhost'

db = 'gpadmin'


connection_string = "postgresql://{user}:{password}@{host}/{db}".\

    format(user=user, 

           password=password, 

           host=host, 

           db=db)

    

conn = psycopg2.connect(connection_string)

cur = conn.cursor()

conn.autocommit = True




# helper function

def query_gpdb(query): 


    cur.execute(query)


    colnames = [desc[0] for desc in cur.description]

    return DataFrame(cur.fetchall(), columns=colnames)

 




4-2-4. sql_magic Setup

https://github.com/pivotal-legacy/sql_magic

sql_magic is Jupyter magic for writing SQL to interact with Greenplum/PostgreSQL database, Hive and Spark. Query results are saved directly to a Pandas dataframe.



# sql_magic package and ext sql_magic to query GPDB

%load_ext sql_magic

#%reload_ext sql_magic


%config SQL.conn_name = 'postgres_engine'


# '%execsql' for sql execution, 

# '%read_sql' for reading table as a DataFrame format

from IPython.core.magic import (register_line_magic, register_cell_magic, register_line_cell_magic)

@register_cell_magic

def execsql(line, cell):

       _ = postgres_engine.execute(cell)

       return

 




드디어 GPDB를 개인 컴퓨터에서 테스트, 공부용으로 간편하게(? ^^;) 설치하여 보았습니다. 수고 많으셨습니다. 




Jupyter Notebook 에서 sql 매직 언어로 DB를 조회할 수 있습니다. 


# GPDB 버전 확인

%read_sql select version();



# GPDB instance 확인 (하나의 서버에 1개 master, 2개 segment가 설치된 경우임)

%read_sql select * from pg_catalog.gp_segment_configuration 



# MADlib version 확인

%read_sql select madlib.version();



# PL/Languages 확인


sql query가 두 줄 이상일 경우 %%read_sql 처럼 % 두개를 앞에 써줍니다. (sql query 가 한 줄일 경우 %read_sql)

%%read_sql 

select * 

    from pg_catalog.pg_language;



# Table 생성

%%execsql

drop table if exists tmp;

create table tmp (

    id int, 

    var1 varchar(10)

    );




5. Docker Container 중단, 재시작, 작동 중인 컨테이너 목록 확인



## Docker  컨테이너 중단, 재시작, 목록 확인

$ docker stop gpdb-ds

$ docker start gpdb-ds

$ docker ps

CONTAINER ID    IMAGE                   COMMAND                   CREATED             STATUS              PORTS                   NAMES
7518fd48450a        575a7d45999d        "/bin/bash"              2 minutes ago         Up 6 hours                  0.0.0.0:5432->5432/tcp, 0.0.0.0:28080->28080/tcp   gpdb-ds

 



많은 도움이 되었기를 바랍니다. 


Posted by R Friend R_Friend

이번 포스팅에서는 기본 Greenplum Database (이하 GPDB) 도커 이미지를 내려받아서, 그 위에 대용량 데이터 통계분석, 기계학습에 활용하는 MADlib, PL/R, PL/Python을 설치한 Docker Image 만든 후, Docker Hub에 올리는 일련의 절차에 대해서 소개하겠습니다. 


이번 포스팅은 도커로 GPDB 기반 분석 환경을 구성하는 절차로서, 데이터 엔지니어링에 관심있으신 분에게 도움이 될 것 같습니다. 혹시 데이터 분석으로 바로 넘어가고 싶은 분은 다음번 포스팅(http://rfriend.tistory.com/379)을 참고하시면 되며, 이번 포스팅을 skip 하여도 아무런 문제 없이 도커를 사용하여 GPDB 기반 분석 환경을 바로 바로 이용하실 수 있습니다. 



[ GPDB 기본 도커 이미지에 MADlib, PL/R, PL/Python 설치 후 gpdb-analytics 도커 이미지 새로 만들어서 Docker Hub에 올리기 절차 ]






0. Dokcer Hub 회원 가입 및 Docker Desktop 다운로드/설치




Windows OS 사용자의 경우 자신의 Windows 버전에 맞게 'Docker CE for Windows' 혹은 'Docker Toolbox'를 다운로드 받아 설치하면 됩니다. 





1. Docker Hub에서 기본 GPDB 이미지를 pull 해서 사용하기

 

<터미널 사용>

1-1.docker image download



docker pull hdlee2u/gpdb-base

docker images

REPOSITORY              TAG                 IMAGE ID            CREATED             SIZE

centos                  7                   d123f4e55e12        9 months ago        197MB

hdlee2u/gpdb-base      latest              bfe4e63b8e81        2 years ago         1.17GB

 




1-2.docker image
실행/ 5432를 기본 포트로, ,ssh2022포트를 사용하여 접근 가능하도록 docker 이미지 실행 



docker run -i -d -p 5432:5432 -p 2022:22 --name gpdb  hdlee2u/gpdb-base

docker ps -a

 




1-3.docker image
중단, 시작 후 동작 상태 확인 



docker stop gpdb

docker start gpdb

docker ps

CONTAINER ID    IMAGE                   COMMAND                   CREATED             STATUS              PORTS                   NAMES

4e6b947be0d6    hdlee2u/gpdb-base   "/bin/sh -c 'echo \"1…"   29 hours ago        Up 3 hours        0.0.0.0:5432->5432/tcp, 0.0.0.0:2022->22/tcp   gpdb

ihongdon-ui-MacBook-Pro:~ ihongdon$

 




2. Docker GPDBMADlib 설치하기

 

2-1. GPDB version 확인 (PGAdmin III 에서)



# select version()

 

PostgreSQL 8.2.15 (Greenplum Database 4.3.7.1 build 1) on x86_64-unknown-linux-gnu, compiled by GCC gcc (GCC) 4.4.2 compiled on Jan 21 2016 15:51:02

 




2-2.Pivotal Network(https://network.pivotal.io)
에서 MADlib 다운로드 (회원가입 필요) 


Pivotal Greenplum Releases: 4.3.18.0 버전 카테고리에서

>> Greenplum Advanced Analytics 선택

>> MADlib 1.12 다운로드

(https://network.pivotal.io/products/pivotal-gpdb/#/releases/8538/file_groups/764)

 






2-3. MADlib downloads 한 파일을 docker로 복사



cd Downloads/

ls

madlib-1.12-gp4.3-rhel5-x86_64.tar.gz

 



docker exec -i -t gpdb /bin/bash

[root@4e6b947be0d6 ~]# mkdir /setup

 

[참고파일 옮길 때

[root@4e6b947be0d6 ~]# mv mad* /setup/

 




2-4. docker container 내부의 /bin/bash 프로세스 실행 후, MADlib 파일을 Docker GPDB에 복사하기

 

다른 터미널의 Downloads 경로에서


docker cp madlib-1.12-gp4.3-rhel5-x86_64.tar.gz gpdb:/setup/



[root@4e6b947be0d6 ~]# chown -R gpadmin:gpadmin /setup

[root@4e6b947be0d6 ~]# cd /setup

[root@4e6b947be0d6 setup]# ls -la

total 7492

drwxr-xr-x 2 gpadmin gpadmin    4096 Aug  8 07:44 .

drwxr-xr-x 1 root    root       4096 Aug  8 07:44 ..

-rw-r--r-- 1 gpadmin gpadmin 3932160 Aug  8 05:10 madlib-1.12-gp4.3-rhel5-x86_64.tar

-rw-r--r-- 1 gpadmin gpadmin 3728292 Aug 29  2017 madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

 




2-5. 권한 부여

 


[root@4e6b947be0d6 ~]# chown -R gpadmin:gpadmin /setup

[root@4e6b947be0d6 ~]# cd /setup

[root@4e6b947be0d6 setup]# ls -la

total 7492

drwxr-xr-x 2 gpadmin gpadmin    4096 Aug  8 07:44 .

drwxr-xr-x 1 root    root       4096 Aug  8 07:44 ..

-rw-r--r-- 1 gpadmin gpadmin 3932160 Aug  8 05:10 madlib-1.12-gp4.3-rhel5-x86_64.tar

-rw-r--r-- 1 gpadmin gpadmin 3728292 Aug 29  2017 madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

 




2-6. MADlib 압축 풀고 설치하기



[root@4e6b947be0d6 setup]# su - gpadmin

-bash-4.1$ cd /setup

-bash-4.1$ ls -la

total 7492

drwxr-xr-x 2 gpadmin gpadmin    4096 Aug  8 07:44 .

drwxr-xr-x 1 root    root       4096 Aug  8 07:44 ..

-rw-r--r-- 1 gpadmin gpadmin 3932160 Aug  8 05:10 madlib-1.12-gp4.3-rhel5-x86_64.tar

 

-bash-4.1$ tar xf madlib-1.12-gp4.3-rhel5-x86_64.tar

-bash-4.1$ ls -la

total 7692

drwxr-xr-x 2 gpadmin gpadmin    4096 Aug  8 07:45 .

drwxr-xr-x 1 root    root       4096 Aug  8 07:44 ..

-rw-r--r-- 1 gpadmin gpadmin 3932160 Aug  8 05:10 madlib-1.12-gp4.3-rhel5-x86_64.tar

-rw-r--r-- 1 gpadmin gpadmin 3728292 Aug 29  2017 madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin  135530 Aug 29  2017 open_source_license_MADlib_1.12_GA.txt

-rw-r--r-- 1 gpadmin gpadmin   51900 Aug 29  2017 ReleaseNotes.txt

 

-bash-4.1$ gppkg -i madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

20180808:07:47:11:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Starting gppkg with args: -i madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

20180808:07:47:11:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing package madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

20180808:07:47:11:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/madlib-1.12-1.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:07:47:11:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg locally

20180808:07:47:11:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/madlib-1.12-1.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:07:47:11:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -i /usr/local/greenplum-db-4.3.7.1/.tmp/madlib-1.12-1.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix=/usr/local/greenplum-db-4.3.7.1'

20180808:07:47:12:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Completed local installation of madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg.

20180808:07:47:12:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Please run the following command to deploy MADlib

usage:  madpack install [-s schema_name] -p greenplum -c user@host:port/database

Example:

       $ $GPHOME/madlib/bin/madpack install -s madlib -p greenplum -c gpadmin@mdw:5432/testdb

       This will install MADlib objects into a Greenplum database named "testdb"

       running on server "mdw" on port 5432. Installer will try to login as "gpadmin"

       and will prompt for password. The target schema will be "madlib".

       To upgrade to a new version of MADlib from version v1.0 or later, use option "upgrade",

       instead of "install"

For additional options run:

$ madpack --help

Release notes and additional documentation can be found at http://madlib.apache.org

20180808:07:47:12:000512 gppkg:4e6b947be0d6:gpadmin-[INFO]:-madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg successfully installed.

-bash-4.1$  madpack install ^C

-bash-4.1$ hostname

4e6b947be0d6

-bash-4.1$ cat /etc/hosts

127.0.0.1       localhost

::1      localhost ip6-localhost ip6-loopback

fe00::0 ip6-localnet

ff00::0 ip6-mcastprefix

ff02::1 ip6-allnodes

ff02::2 ip6-allrouters

172.17.0.2     4e6b947be0d6

127.0.0.1 72ba20be3774

 




Database list 확인


 

-bash-4.1$ psql

psql (8.2.15)

Type "help" for help.

 

gpadmin=# \l

                  List of databases

   Name    |  Owner  | Encoding |  Access privileges 

-----------+---------+----------+---------------------

 gpadmin   | gpadmin | UTF8     |

 postgres  | gpadmin | UTF8     |

 template0 | gpadmin | UTF8     | =c/gpadmin         

                                : gpadmin=CTc/gpadmin

 template1 | gpadmin | UTF8     | =c/gpadmin         

                                : gpadmin=CTc/gpadmin

(4 rows)

 

gpadmin=# \q




-bash-4.1$ $GPHOME/madlib/bin/madpack install -s madlib -p greenplum -c gpadmin@127.0.0.1:5432/gpadmin

madpack.py : INFO : Detected Greenplum DB version 4.3.7.

madpack.py : INFO : *** Installing MADlib ***

madpack.py : INFO : MADlib tools version    = 1.12 (/usr/local/greenplum-db-4.3.7.1/madlib/Versions/1.12/bin/../madpack/madpack.py)

madpack.py : INFO : MADlib database version = None (host=127.0.0.1:5432, db=gpadmin, schema=madlib)

madpack.py : INFO : Testing PL/Python environment...

madpack.py : INFO : > Creating language PL/Python...

madpack.py : INFO : > PL/Python environment OK (version: 2.6.2)

madpack.py : INFO : Installing MADlib into MADLIB schema...

madpack.py : INFO : > Creating MADLIB schema

madpack.py : INFO : > Creating MADLIB.MigrationHistory table

madpack.py : INFO : > Writing version info in MigrationHistory table

madpack.py : INFO : > Creating objects for modules:

madpack.py : INFO : > - array_ops

madpack.py : INFO : > - bayes

madpack.py : INFO : > - crf

madpack.py : INFO : > - elastic_net

madpack.py : INFO : > - linalg

madpack.py : INFO : > - pmml

madpack.py : INFO : > - prob

madpack.py : INFO : > - sketch

madpack.py : INFO : > - svec

madpack.py : INFO : > - svm

madpack.py : INFO : > - tsa

madpack.py : INFO : > - stemmer

madpack.py : INFO : > - conjugate_gradient

madpack.py : INFO : > - knn

madpack.py : INFO : > - lda

madpack.py : INFO : > - stats

madpack.py : INFO : > - svec_util

madpack.py : INFO : > - utilities

madpack.py : INFO : > - assoc_rules

madpack.py : INFO : > - convex

madpack.py : INFO : > - glm

madpack.py : INFO : > - graph

madpack.py : INFO : > - linear_systems

madpack.py : INFO : > - recursive_partitioning

madpack.py : INFO : > - regress

madpack.py : INFO : > - sample

madpack.py : INFO : > - summary

madpack.py : INFO : > - kmeans

madpack.py : INFO : > - pca

madpack.py : INFO : > - validation

madpack.py : INFO : MADlib 1.12 installed successfully in MADLIB schema.

 



 

스키마 리스트 & MADlib 버전 확인



-bash-4.1$ psql

psql (8.2.15)

Type "help" for help.

 

gpadmin=# \dn

       List of schemas

        Name        |  Owner 

--------------------+---------

 gp_toolkit         | gpadmin

 information_schema | gpadmin

 madlib             | gpadmin

 pg_aoseg           | gpadmin

 pg_bitmapindex     | gpadmin

 pg_catalog         | gpadmin

 pg_toast           | gpadmin

 public             | gpadmin

(8 rows)

 

gpadmin=# select madlib.version();

MADlib version: 1.12, git revision: rc/1.12-rc1, cmake configuration time: Wed Aug 23 22:33:09 UTC 2017, build type: Release, build system: Linux-2.6.18-238.27.1.el5.hot

fix.bz516490, C compiler: gcc 4.4.0, C++ compiler: g++ 4.4.0

(1 row)

 

---- MADlib 설치 성공 완료! ----

 

gpadmin=# \q

 




3. Docker GPDB
PL/R 설치하기 

 

Cent OS 버전 확인하기



-bash-4.1$ cat /etc/redhat-release

CentOS release 6.7 (Final)

 




3-1. Pivotal Network에서 PL/R 다운로드 하기

Pivotal Greenplum Releases: 4.3.18.0 카테고리에서

>> Greenplum Procedural Languages

>> PL/R for RHEL 6 다운로드

(https://network.pivotal.io/products/pivotal-gpdb/#/releases/8538/file_groups/768)

 




3-2. (다른 터미널에서) Docker GPDB/setup 폴더로 PL/R 복사하기



ihongdon-ui-MacBook-Pro:~ ihongdon$ cd Downloads/

ihongdon-ui-MacBook-Pro:Downloads ihongdon$ ls -la

total 90512

-rw-r--r--@  1 ihongdon  staff   3788987  8  8 14:10 madlib-1.12-gp4.3-rhel5-x86_64.tar.gz

-rw-r--r--@  1 ihongdon  staff  39640735  8  8 16:51 plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

 

ihongdon-ui-MacBook-Pro:Downloads ihongdon$ docker cp plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg gpdb:/setup

 




3-3. (Docker
터미널에서) 권한 부여하기 및 gpadmin 들어가기 



[root@4e6b947be0d6 setup]# su - gpadmin

-bash-4.1$ ls

madlib-1.12-gp4.3-rhel5-x86_64.tar                     

open_source_license_MADlib_1.12_GA.txt  ReleaseNotes.txt

madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg 

plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

-bash-4.1$ exit

logout

 

[root@4e6b947be0d6 setup]# chown gpadmin:gpadmin plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

 

 [root@4e6b947be0d6 setup]# su - gpadmin

-bash-4.1$ cd /setup

-bash-4.1$ ls

madlib-1.12-gp4.3-rhel5-x86_64.tar                     

open_source_license_MADlib_1.12_GA.txt  ReleaseNotes.txt

madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg 

plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

 

-bash-4.1$ ls -la

total 46404

drwxr-xr-x 2 gpadmin gpadmin     4096 Aug  8 07:52 .

drwxr-xr-x 1 root    root        4096 Aug  8 07:44 ..

-rw-r--r-- 1 gpadmin gpadmin  3932160 Aug  8 05:10 madlib-1.12-gp4.3-rhel5-x86_64.tar

-rw-r--r-- 1 gpadmin gpadmin      566 Aug 29  2017 ._madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin  3728292 Aug 29  2017 madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin     1362 Aug 29  2017 ._open_source_license_MADlib_1.12_GA.txt

-rw-r--r-- 1 gpadmin gpadmin   135530 Aug 29  2017 open_source_license_MADlib_1.12_GA.txt

-rw-r--r-- 1 gpadmin gpadmin 39640735 Aug  8 07:51 plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin      594 Aug 29  2017 ._ReleaseNotes.txt

-rw-r--r-- 1 gpadmin gpadmin    51900 Aug 29  2017 ReleaseNotes.txt

 



 

3-4. PL/R 설치



-bash-4.1$ gppkg -i plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

20180808:07:53:41:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Starting gppkg with args: -i plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

20180808:07:53:42:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing package plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

20180808:07:53:42:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/R-3.3.3-1.x86_64.rpm /usr/local/greenplum-db-4.3.7.1/.tmp/plr-2.3-1.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:07:53:42:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg locally

20180808:07:53:42:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/R-3.3.3-1.x86_64.rpm /usr/local/greenplum-db-4.3.7.1/.tmp/plr-2.3-1.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:07:53:42:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -i /usr/local/greenplum-db-4.3.7.1/.tmp/R-3.3.3-1.x86_64.rpm /usr/local/greenplum-db-4.3.7.1/.tmp/plr-2.3-1.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix=/usr/local/greenplum-db-4.3.7.1'

20180808:07:53:45:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Completed local installation of plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg.

20180808:07:53:45:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:--

==========================================================================

PL/R installation is complete! To proceed, follow these steps:

1. Source your new $GPHOME/greenplum_path.sh file and restart the database.

2. Create PL/R language in the target database with "createlang plr -d mydatabase"

3. Optionally you can enable PL/R helper functions in this database by running

    "psql -f $GPHOME/share/postgresql/contrib/plr.sql -d mydatabase"

==========================================================================

20180808:07:53:45:006779 gppkg:4e6b947be0d6:gpadmin-[INFO]:-plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg successfully installed.

 




3-5. GPDB stop
 



-bash-4.1$ gpstop -af

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Starting gpstop with args: -af

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Gathering information and validating the environment...

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Segment details from master...

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.7.1 build 1'

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-There are 2 connections to the database

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='fast'

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Master host=72ba20be3774

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Detected 2 connections to database

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Switching to WAIT mode

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Will wait for shutdown to complete, this may take some time if

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-there are a large number of active complex transactions, please wait...

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=fast

20180808:07:54:30:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Master segment instance directory=/gpdata/master/gpseg-1

20180808:07:54:31:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process

20180808:07:54:31:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Terminating processes for segment /gpdata/master/gpseg-1

20180808:07:54:31:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-No standby master host configured

20180808:07:54:31:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Commencing parallel segment instance shutdown, please wait...

20180808:07:54:31:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-0.00% of jobs completed

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-100.00% of jobs completed

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-   Segments stopped successfully      = 2

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-   Segments with errors during stop   = 0

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Successfully shutdown 2 of 2 segment instances

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Database successfully shutdown with no errors reported

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Cleaning up leftover gpmmon process

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-No leftover gpmmon process found

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Cleaning up leftover gpsmon processes

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-No leftover gpsmon processes on some hosts. not attempting forceful termination on these hosts

20180808:07:54:41:006833 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Cleaning up leftover shared memory

 




3-6.
Source your new $GPHOME/greenplum_path.sh file 



-bash-4.1$ vi ~/.bash_profile

-bash-4.1$ source ~/.bash_profile

-bash-4.1$ env | grep R

MASTER_DATA_DIRECTORY=/gpdata/master/gpseg-1

TERM=xterm

USER=gpadmin

LD_LIBRARY_PATH=/usr/local/greenplum-db/./ext/R-3.3.3/lib:/usr/local/greenplum-db/./ext/R-3.3.3/extlib:

/usr/local/greenplum-db/./lib:

/usr/local/greenplum-db/./ext/python/lib:/usr/local/greenplum-db/./lib:/usr/local/greenplum-db/./ext/python/lib:

LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=01;05;37;41:

su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arj=01;31:*.taz=01;31:*.lzh=01;31:

*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lz=01;31:*.xz=01;31:*.bz2=01;31:

*.tbz=01;31:*.tbz2=01;31:*.bz=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.rar=01;31:*.ace=01;31:*.zoo=01;31:

*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.jpg=01;35:*.jpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:

*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:

*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.ogm=01;35:

*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:

*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:

*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.axv=01;35:*.anx=01;35:*.ogv=01;35:*.ogx=01;35:

*.aac=01;36:*.au=01;36:*.flac=01;36:*.mid=01;36:*.midi=01;36:*.mka=01;36:*.mp3=01;36:*.mpc=01;36:

*.ogg=01;36:*.ra=01;36:*.wav=01;36:*.axa=01;36:*.oga=01;36:*.spx=01;36:*.xspf=01;36:

PATH=/usr/local/greenplum-db/./ext/R-3.3.3/bin:/usr/local/greenplum-db/./bin:/usr/local/greenplum-db/./ext/python/bin:/usr/local/greenplum-db/./bin:/usr/local/greenplum-db/./ext/python/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin

HISTCONTROL=ignoredups

R_HOME=/usr/local/greenplum-db/./ext/R-3.3.3

G_BROKEN_FILENAMES=1

 




3-7.
Create PL/R language in the target database with "createlang plr -d mydatabase" and restart the database. 



-bash-4.1$ createlang plr -d gpadmin

createlang: could not connect to database gpadmin: could not connect to server: No such file or directory

         Is the server running locally and accepting

         connections on Unix domain socket "/tmp/.s.PGSQL.5432"?

 

-bash-4.1$ gpstart -a

20180808:07:56:17:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Starting gpstart with args: -a

20180808:07:56:17:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Gathering information and validating the environment...

20180808:07:56:17:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.7.1 build 1'

20180808:07:56:17:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150'

20180808:07:56:17:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Starting Master instance in admin mode

20180808:07:56:18:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20180808:07:56:18:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Segment details from master...

20180808:07:56:18:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Setting new master era

20180808:07:56:18:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Master Started...

20180808:07:56:18:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Shutting down master

20180808:07:56:19:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...

..

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Process results...

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-   Successful segment starts                                            = 2

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-   Failed segment starts                                                = 0

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:07:56:21:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Starting Master instance 72ba20be3774 directory /gpdata/master/gpseg-1

20180808:07:56:22:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Command pg_ctl reports Master 72ba20be3774 instance active

20180808:07:56:23:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-No standby master configured.  skipping...

20180808:07:56:23:006995 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Database successfully started

 

-bash-4.1$ psql -f $GPHOME/share/postgresql/contrib/plr.sql -d gpadmin

SET

CREATE FUNCTION

CREATE FUNCTION

CREATE FUNCTION

REVOKE

CREATE FUNCTION

 

-bash-4.1$ exit

logout

 



 

4. DataSciencePython(PL/Python), DataScienceR 설치하기

 

4-1. Pivotal Network에서 PL/Python 다운로드 하기

Pivotal Greenplum Releases: 4.3.18.0 카테고리에서

>> Greenplum Procedural Languages

>> Python Data Science Package for RHEL 6다운로드

>> R Data Science Package for RHEL 6 다운로드

(https://network.pivotal.io/products/pivotal-gpdb/#/releases/8538/file_groups/768)

 


4-2. (다른 터미널에서) Docker GPDB로 파일 복사하기



ihongdon-ui-MacBook-Pro:Downloads ihongdon$ ls -la

total 549520

-rw-r--r--@  1 ihongdon  staff  103557483  8  8 16:58 DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg

-rw-r--r--@  1 ihongdon  staff  114736878  8  8 16:58 DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg

-rw-r--r--@  1 ihongdon  staff    3788987  8  8 14:10 madlib-1.12-gp4.3-rhel5-x86_64.tar.gz

-rw-r--r--@  1 ihongdon  staff   39640735  8  8 16:51 plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

 

ihongdon-ui-MacBook-Pro:Downloads ihongdon$ docker cp DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg gpdb:/setup

ihongdon-ui-MacBook-Pro:Downloads ihongdon$ docker cp DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg gpdb:/setup

 




4-3. (Docker
터미널에서) 권한 부여 및 gpadmin 들어가기 



[root@4e6b947be0d6 setup]# chown gpadmin:gpadmin *.gppkg

[root@4e6b947be0d6 setup]# su - gpadmin

-bash-4.1$ ls

gpAdminLogs

-bash-4.1$ cd  /setup

-bash-4.1$ ls

DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg 

madlib-1.12-gp4.3-rhel5-x86_64.tar                     

open_source_license_MADlib_1.12_GA.txt 

ReleaseNotes.txt

DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg      

madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg 

plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

 

-bash-4.1$ ls -la

total 259584

drwxr-xr-x 2 gpadmin gpadmin      4096 Aug  8 07:59 .

drwxr-xr-x 1 root    root         4096 Aug  8 07:44 ..

-rw-r--r-- 1 gpadmin gpadmin 103557483 Aug  8 07:58 DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin 114736878 Aug  8 07:58 DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin   3932160 Aug  8 05:10 madlib-1.12-gp4.3-rhel5-x86_64.tar

-rw-r--r-- 1 gpadmin gpadmin       566 Aug 29  2017 ._madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin   3728292 Aug 29  2017 madlib-ossv1.12_pv1.9.9_gpdb4.3orca-rhel5-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin      1362 Aug 29  2017 ._open_source_license_MADlib_1.12_GA.txt

-rw-r--r-- 1 gpadmin gpadmin    135530 Aug 29  2017 open_source_license_MADlib_1.12_GA.txt

-rw-r--r-- 1 gpadmin gpadmin  39640735 Aug  8 07:51 plr-2.3.1-GPDB4.3-rhel6-x86_64.gppkg

-rw-r--r-- 1 gpadmin gpadmin       594 Aug 29  2017 ._ReleaseNotes.txt

-rw-r--r-- 1 gpadmin gpadmin     51900 Aug 29  2017 ReleaseNotes.txt

 




4-4. DataSciencePython
설치하기 



-bash-4.1$ gppkg -i DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg

20180808:08:00:58:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Starting gppkg with args: -i DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg

20180808:08:00:59:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing package DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg

20180808:08:00:59:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/DataSciencePython-1.0-0.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:08:00:59:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-SQLITE3 Installed

20180808:08:01:00:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-TK Not installed

20180808:08:01:00:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-TCL Not installed

20180808:08:01:00:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg locally

20180808:08:01:00:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/DataSciencePython-1.0-0.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:08:01:01:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -i /usr/local/greenplum-db-4.3.7.1/.tmp/DataSciencePython-1.0-0.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix=/usr/local/greenplum-db-4.3.7.1'

20180808:08:01:14:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Completed local installation of DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg.

20180808:08:01:14:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Please source your $GPHOME/greenplum_path.sh file and restart the database.

20180808:08:01:14:007333 gppkg:4e6b947be0d6:gpadmin-[INFO]:-DataSciencePython-1.0.0-gp4-rhel6-x86_64.gppkg successfully installed.

 




4-5. DataScienceR
설치하기 



-bash-4.1$ gppkg -i DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg

20180808:08:01:48:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Starting gppkg with args: -i DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg

20180808:08:01:48:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing package DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg

20180808:08:01:49:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/DataScienceR-1.0-0.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:08:01:49:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg locally

20180808:08:01:50:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Validating rpm installation cmdStr='rpm --test -i /usr/local/greenplum-db-4.3.7.1/.tmp/DataScienceR-1.0-0.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix /usr/local/greenplum-db-4.3.7.1'

20180808:08:01:50:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Installing rpms cmdStr='rpm -i /usr/local/greenplum-db-4.3.7.1/.tmp/DataScienceR-1.0-0.x86_64.rpm --dbpath /usr/local/greenplum-db-4.3.7.1/share/packages/database --prefix=/usr/local/greenplum-db-4.3.7.1'

20180808:08:02:05:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Completed local installation of DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg.

20180808:08:02:05:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-Please source your $GPHOME/greenplum_path.sh file and restart the database.

20180808:08:02:05:007393 gppkg:4e6b947be0d6:gpadmin-[INFO]:-DataScienceR-1.0.0-gp4-rhel6-x86_64.gppkg successfully installed.

 




4-6. source path
설정 


-bash-4.1$ source $GPHOME/greenplum_path.sh




4-7. GPDB stop
 



-bash-4.1$ gpstop -af

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Starting gpstop with args: -af

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Gathering information and validating the environment...

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Segment details from master...

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Greenplum Version: 'postgres (Greenplum Database) 4.3.7.1 build 1'

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-There are 0 connections to the database

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Commencing Master instance shutdown with mode='fast'

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Master host=72ba20be3774

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Detected 0 connections to database

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Using standard WAIT mode of 120 seconds

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Commencing Master instance shutdown with mode=fast

20180808:08:02:18:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Master segment instance directory=/gpdata/master/gpseg-1

20180808:08:02:19:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Attempting forceful termination of any leftover master process

20180808:08:02:20:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Terminating processes for segment /gpdata/master/gpseg-1

20180808:08:02:20:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-No standby master host configured

20180808:08:02:20:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Commencing parallel segment instance shutdown, please wait...

20180808:08:02:20:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-0.00% of jobs completed

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-100.00% of jobs completed

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-   Segments stopped successfully      = 2

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-   Segments with errors during stop   = 0

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Successfully shutdown 2 of 2 segment instances

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Database successfully shutdown with no errors reported

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Cleaning up leftover gpmmon process

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-No leftover gpmmon process found

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Cleaning up leftover gpsmon processes

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-No leftover gpsmon processes on some hosts. not attempting forceful termination on these hosts

20180808:08:02:30:007430 gpstop:4e6b947be0d6:gpadmin-[INFO]:-Cleaning up leftover shared memory

 




4-8. GPDB restart
 



-bash-4.1$ gpstart -a

20180808:08:02:39:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Starting gpstart with args: -a

20180808:08:02:39:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Gathering information and validating the environment...

20180808:08:02:39:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Greenplum Binary Version: 'postgres (Greenplum Database) 4.3.7.1 build 1'

20180808:08:02:39:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Greenplum Catalog Version: '201310150'

20180808:08:02:39:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Starting Master instance in admin mode

20180808:08:02:40:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Greenplum Master catalog information

20180808:08:02:40:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Obtaining Segment details from master...

20180808:08:02:40:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Setting new master era

20180808:08:02:40:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Master Started...

20180808:08:02:40:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Shutting down master

20180808:08:02:42:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Commencing parallel segment instance startup, please wait...

..

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Process results...

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-   Successful segment starts                                            = 2

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-   Failed segment starts                                                = 0

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-   Skipped segment starts (segments are marked down in configuration)   = 0

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Successfully started 2 of 2 segment instances

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-----------------------------------------------------

20180808:08:02:44:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Starting Master instance 72ba20be3774 directory /gpdata/master/gpseg-1

20180808:08:02:45:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Command pg_ctl reports Master 72ba20be3774 instance active

20180808:08:02:45:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-No standby master configured.  skipping...

20180808:08:02:45:007584 gpstart:4e6b947be0d6:gpadmin-[INFO]:-Database successfully started

-bash-4.1$

-bash-4.1$

 



 

5. Docker 이미지 만들고, Docker Hub에 올리기

 

5-1. Docker 이미지 만들고, 생성 여부 확인하기



 # Docker 이미지 만들기 : $ docker commit [OPTIONS] CONTAINER [REPOSITORY[:TAG]]


ihongdon-ui-MacBook-Pro:~ ihongdon$ docker commit \

-a "pivotal-data-science-holee" \

-m "GPDB 4.37 with MADlib, PL/R, PL/Python" \

gpdb \

gpdb-analytics:first

sha256:c1450e5e5a58f0518ce747a408846968b3a8d2746e6a147c1a3d8ce2910dfff1

ihongdon-ui-MacBook-Pro:~ ihongdon$

ihongdon-ui-MacBook-Pro:~ ihongdon$ docker images

REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE

gpdb-analytics                     first               c1450e5e5a58        3 minutes ago       2.83GB

centos                             7                   d123f4e55e12        9 months ago        197MB

pivotaldata/gpdb-base              latest              bfe4e63b8e81        2 years ago         1.17GB

ihongdon-ui-MacBook-Pro:~ ihongdon$

 


 

 

5-2. Docker ImageTag 추가 후 Docker Hub에 올리기(push)



 # Tag 추가 : $ docker tag SOURCE_IMAGE[:TAG] TARGET_IMAGE[:TAG]


ihongdon-ui-MacBook-Pro:~ ihongdon$ docker tag gpdb-analytics:first hdlee2u/gpdb-analytics:latest

ihongdon-ui-MacBook-Pro:~ ihongdon$

ihongdon-ui-MacBook-Pro:~ ihongdon$ docker images

REPOSITORY                         TAG                 IMAGE ID            CREATED             SIZE

hdlee2u/gpdb-analytics             latest               c1450e5e5a58        About an hour ago   2.83GB

gpdb-analytics                     first               c1450e5e5a58        About an hour ago   2.83GB

centos                             7                   d123f4e55e12        9 months ago        197MB

pivotaldata/gpdb-base              latest              bfe4e63b8e81        2 years ago         1.17GB

 

# Docker Hub 로그인

ihongdon-ui-MacBook-Pro:~ ihongdon$ docker login

Authenticating with existing credentials...

Login Succeeded

 



 # Docker Hub에 도커 이미지 올리기 : $ docker push [OPTIONS] NAME[:TAG]


ihongdon-ui-MacBook-Pro:~ ihongdon$ docker push hdlee2u/gpdb-analytics:latest

The push refers to repository [docker.io/hdlee2u/gpdb-analytics]

e603ef714b8e: Pushing [========>                                          ]  275.1MB/1.663GB

8c65eead2327: Mounted from hdlee2u/gpdb-base

516e5ab465c7: Mounted from hdlee2u/gpdb-base

5f70bf18a086: Mounted from hdlee2u/gpdb-base

69bd93b9db4e: Mounted from hdlee2u/gpdb-base





[ https://hub.docker.com/r/hdlee2u/gpdb-analytics/ 에 gpdb-analytics 도커 이미지 올라간 모습 ]




다음번 포스팅에서는 Docker Hub에서 gpdb-ds 도커 이미지를 내려 받아서 사용할 수 있는 방법에 대해서 소개하겠습니다. 


많은 도움이 되었기를 바랍니다. 



Posted by R Friend R_Friend