Add README.md
This commit is contained in:
@@ -0,0 +1,51 @@
|
|||||||
|
# Unity Catalog 버전 갱신 가이드
|
||||||
|
|
||||||
|
## 1. git 작업 환경 구성
|
||||||
|
|
||||||
|
- 서비스 카탈로그 git 다운로드
|
||||||
|
```
|
||||||
|
$ git clone https://github.com/paasup/dip-catalog.git
|
||||||
|
```
|
||||||
|
|
||||||
|
- 작업 브랜치로 체크아웃
|
||||||
|
```
|
||||||
|
$ git checkout -b update-unitycatalog/0.2.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. helm 차트 버전 업데이트
|
||||||
|
|
||||||
|
- 본 chart는 [ray-harrison/unitycatalog](https://github.com/ray-harrison/unitycatalog)를 바탕으로 직접 제작했다.
|
||||||
|
- chart 관리는 [paasup/unitycatalog](https://github.com/paasup/unitycatalog/tree/main/helm/chart)에서 관리하고 있다.
|
||||||
|
|
||||||
|
|
||||||
|
## 3. git push 및 tag 추가
|
||||||
|
- 갱신작업 진행후 commit
|
||||||
|
```sh
|
||||||
|
$ git add .
|
||||||
|
$ git commit -m "update unitycatalog/0.2.0"
|
||||||
|
```
|
||||||
|
|
||||||
|
- main 브랜치에 체크아웃 후 merge
|
||||||
|
```sh
|
||||||
|
$ git checkout main
|
||||||
|
$ git merge update-unitycatalog/0.2.0
|
||||||
|
```
|
||||||
|
|
||||||
|
- git에 push 후 작업 브랜치 삭제
|
||||||
|
```sh
|
||||||
|
$ git push -u origin main
|
||||||
|
$ git branch -d update-unitycatalog/0.2.0
|
||||||
|
```
|
||||||
|
|
||||||
|
- git tag 추가 후 push
|
||||||
|
```sh
|
||||||
|
$ git tag unitycatalog/0.2.0
|
||||||
|
$ git push origin unitycatalog/0.2.0
|
||||||
|
```
|
||||||
|
|
||||||
|
## 4. 차트 버전 정보
|
||||||
|
- unitycatalog/0.2.0
|
||||||
|
- 배포를 위한 설정을 추가하였다.(ingress, private ca 적용 등)
|
||||||
|
- 서비스 배포를 위하여 custom-values.yam에 정의하였다.
|
||||||
|
- 차트의 빌드 방법과 배포 방법을 BUILD-README.md, CUSTOM-README.md 문서에 작성하였다.
|
||||||
|
|
||||||
@@ -0,0 +1,177 @@
|
|||||||
|
|
||||||
|
# Unity Catalog 배포
|
||||||
|
|
||||||
|
## 1. 배포 방법
|
||||||
|
|
||||||
|
- 배포 방법
|
||||||
|
``` sh
|
||||||
|
$ helm upgrade unitycatalog ../unitycatalog --install \
|
||||||
|
-n unitycatalog --create-namespace \
|
||||||
|
-f ./custom-values.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## 2. custom-values.yaml 설명
|
||||||
|
|
||||||
|
- custom-values.yaml에 정의된 값에 대한 설명이다.
|
||||||
|
|
||||||
|
### 1) 이미지 설정
|
||||||
|
- private 환경 배포 시에만 변경하여 사용한다.
|
||||||
|
|
||||||
|
| Name | 설명 | 기본값 |
|
||||||
|
| ---------------------- | ------------------------------------------------------------ | ------ |
|
||||||
|
| `server.statefulset.image.repository` | 오프라인 설치 시에 설정 변경 필요. | `"paasup/unitycatalog"` |
|
||||||
|
| `server.statefulset.image.repository` | 이미지의 태그 설정. | `"0.3.0-minio-2"` |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 2) server의 pod 설정
|
||||||
|
- unity catalog server의 tolerations, nodeSelector, affinity, 리소스를 설정한다.
|
||||||
|
|
||||||
|
| Name | 설명 | 기본값 |
|
||||||
|
| ------------------------ | ---------------------------------- | --------- |
|
||||||
|
| `server.statefulset.tolerations` | server pod의 toleration 설정. | `[]` |
|
||||||
|
| `server.statefulset.nodeSelector` | server pod의 nodeSelector 설정. | `{}` |
|
||||||
|
| `server.statefulset.affinity` | server pod의 affinity 설정. | `{}` |
|
||||||
|
| `server.statefulset.resources` | server pod의 기본 resource 설정.| `{}` |
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
### 3) Storage 설정 - Minio
|
||||||
|
- s3 연동 시 접속 정보를 secret으로 생성해야 한다. minio 사용 시 접속 정보는 반드시 admin 권한이 있는 사용자의 id, password를 사용한다.(access key는 사용 불가)
|
||||||
|
``` sh
|
||||||
|
$ kubectl create -n unitycatalog secret generic minio-secret \
|
||||||
|
--from-literal=accessKey={access key} \
|
||||||
|
--from-literal=secretKey={secret key}
|
||||||
|
```
|
||||||
|
- unity catalog에서 사용할 외부 storage의 목록을 정의한다. 아래 예시는 minio를 대상으로 할 때의 설정이다.
|
||||||
|
``` yaml
|
||||||
|
storage:
|
||||||
|
credentials:
|
||||||
|
# S3 credentials for accessing the storage
|
||||||
|
# Credential secret must contain the following keys - accessKey, secretKey.
|
||||||
|
s3:
|
||||||
|
- bucketPath: s3://test
|
||||||
|
region: us-east-1
|
||||||
|
# minio에서는 빈칸으로 설정한다.
|
||||||
|
awsRoleArn:
|
||||||
|
serviceEndpoint: https://minio.example.org
|
||||||
|
# Client secret must contain the following keys - accessKey, secretKey.
|
||||||
|
credentialsSecretName: minio-secret
|
||||||
|
```
|
||||||
|
|
||||||
|
### 3) Keycloak SSO 설정
|
||||||
|
- keycloak 연동 시 접속 정보를 secret으로 생성해야 한다.
|
||||||
|
``` sh
|
||||||
|
$ kubectl create -n unitycatalog secret generic uc-sso-secret \
|
||||||
|
--from-literal=clientId={keycloak client id} \
|
||||||
|
--from-literal=clientSecret={keycloak client credential}
|
||||||
|
```
|
||||||
|
|
||||||
|
- 미리 생성할 사용자의 이름과 이메일 정보를 `auth.users`에 작성한다. 그 후 keycloak의 oidc 인증 url과 위에서 생성한 client 정보가 담긴 secret을 작성한다.
|
||||||
|
``` yaml
|
||||||
|
auth:
|
||||||
|
enabled: false
|
||||||
|
# List of users to be created in the system. Each user must contain the following keys - name, email.
|
||||||
|
users:
|
||||||
|
- name: admin
|
||||||
|
email: paasup@paasup.io
|
||||||
|
|
||||||
|
provider: keycloak
|
||||||
|
authorizationUrl: https://keycloak.example.org/auth/realms/paasup/protocol/openid-connect/auth
|
||||||
|
|
||||||
|
# Client secret must contain the following keys - clientId, clientSecret.
|
||||||
|
clientSecretName: uc-sso-secret
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
### 5) 사설 인증서 등록
|
||||||
|
|
||||||
|
- keycloak, minio 등의 서비스가 사설 인증서를 사용한다면 unity catalog 서버에 허용 설정이 필요하다. 해당 설정을 위하여 `privateCA.enabeld: true` 설정 후에 인증서는 secret으로 추가하여 등록한다.
|
||||||
|
- CA 인증서가 클러스터에 `cert-manager`로 관리된다면 다음과 같이 unity catalog의 ingress에서 설정한 secret을 사용할 수 있다.
|
||||||
|
``` yaml
|
||||||
|
privateCA:
|
||||||
|
enabled: true
|
||||||
|
secretName: "unitycatalog-tls"
|
||||||
|
```
|
||||||
|
|
||||||
|
### 6) Ingress 설정
|
||||||
|
|
||||||
|
|
||||||
|
#### 6.1) tls 시크릿 직접 생성
|
||||||
|
|
||||||
|
|
||||||
|
- Rancher에서 ingress 사용을 위해서는 다음과 같이 설정할 수 있다.
|
||||||
|
``` yaml
|
||||||
|
server:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
hosts:
|
||||||
|
- host: unitycatalog.example.org
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- unitycatalog.example.org
|
||||||
|
secretName: unitycatalog-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
- ingress 사용을 위해서는 인증서를 secret으로 제공해야한다. 로컬 파일을 이용해 secret을 생성하는 방법은 다음과 같다.
|
||||||
|
``` sh
|
||||||
|
kubectl create secret tls unitycatalog-tls-secret --cert=<path-to-cert-file> --key=<path-to-key-file> -n <namespace>
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
#### 6.2) cert-manager를 이용한 자동 생성
|
||||||
|
|
||||||
|
- cert manager를 통해 인증서 자동 생성 시 `custom-values.yaml` 수정한다.
|
||||||
|
- `ingress.annotations.cert-manager.io/cluster-issuer`에 미리 배포된 Cluster Issuer의 이름으로 변경한다.
|
||||||
|
``` yaml
|
||||||
|
server:
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
className: kong
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: root-ca-issuer
|
||||||
|
konghq.com/https-redirect-status-code: '301'
|
||||||
|
konghq.com/protocols: https
|
||||||
|
hosts:
|
||||||
|
- host: unitycatalog.example.org
|
||||||
|
paths:
|
||||||
|
- path: /
|
||||||
|
pathType: ImplementationSpecific
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- unitycatalog.example.org
|
||||||
|
secretName: unitycatalog-tls
|
||||||
|
```
|
||||||
|
|
||||||
|
### 7) postgresql
|
||||||
|
|
||||||
|
- subchart로 포함된 postgresql을 배포하기 위한 설정이다.
|
||||||
|
- db 정보 변경 시 `db.postgresqlConfig`와 `postgresql.auth`를 동일하게 변경해야 한다.
|
||||||
|
|
||||||
|
``` yaml
|
||||||
|
db:
|
||||||
|
type: postgresql
|
||||||
|
postgresqlConfig:
|
||||||
|
user: uc_default_user
|
||||||
|
password: uc_default_password
|
||||||
|
database: ucdb
|
||||||
|
|
||||||
|
postgresql:
|
||||||
|
enabled: true
|
||||||
|
auth:
|
||||||
|
username: "uc_default_user"
|
||||||
|
password: "uc_default_password"
|
||||||
|
database: "ucdb"
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
size: 5Gi
|
||||||
|
storageClassName: ""
|
||||||
|
```
|
||||||
@@ -6,30 +6,23 @@ storage:
|
|||||||
- bucketPath: s3://test
|
- bucketPath: s3://test
|
||||||
region: us-east-1
|
region: us-east-1
|
||||||
awsRoleArn:
|
awsRoleArn:
|
||||||
credentialsSecretName: minio-secret
|
|
||||||
serviceEndpoint: https://minio.example.org
|
serviceEndpoint: https://minio.example.org
|
||||||
|
# Client secret must contain the following keys - accessKey, secretKey.
|
||||||
|
credentialsSecretName: minio-secret
|
||||||
|
|
||||||
auth:
|
auth:
|
||||||
enabled: true
|
enabled: false
|
||||||
# TODO: It is not possible to create proper admin account. This is a workaround.
|
# List of users to be created in the system. Each user must contain the following keys - name, email.
|
||||||
users:
|
users:
|
||||||
- name: admin
|
- name: admin
|
||||||
email: paasup@paasup.io
|
email: paasup@paasup.io
|
||||||
# List of users to be created in the system. Each user must contain the following keys - name, email.
|
|
||||||
# - name: admin
|
|
||||||
# email: test@example.com
|
|
||||||
|
|
||||||
provider: keycloak
|
provider: keycloak
|
||||||
# Supported values: google, okta, keycloak, other
|
|
||||||
# other: Use this option if you want to use a custom OAuth provider. UI does not have any built-in support for this option.
|
|
||||||
|
|
||||||
authorizationUrl: https://keycloak.example.org/auth/realms/paasup/protocol/openid-connect/auth
|
authorizationUrl: https://keycloak.example.org/auth/realms/paasup/protocol/openid-connect/auth
|
||||||
clientSecretName: uc-sso-secret
|
|
||||||
# Client secret must contain the following keys - clientId, clientSecret.
|
|
||||||
# authorizationUrl: https://accounts.google.com/o/oauth2/auth
|
|
||||||
# tokenUrl: https://oauth2.googleapis.com/token
|
|
||||||
# clientSecretName: my-client-secret
|
|
||||||
|
|
||||||
|
# Client secret must contain the following keys - clientId, clientSecret.
|
||||||
|
clientSecretName: uc-sso-secret
|
||||||
|
|
||||||
privateCA:
|
privateCA:
|
||||||
enabled: true
|
enabled: true
|
||||||
secretName: "unitycatalog-tls"
|
secretName: "unitycatalog-tls"
|
||||||
@@ -38,7 +31,11 @@ server:
|
|||||||
statefulset:
|
statefulset:
|
||||||
image:
|
image:
|
||||||
repository: paasup/unitycatalog
|
repository: paasup/unitycatalog
|
||||||
tag: "0.3.0-s3"
|
tag: "0.3.0-minio-2"
|
||||||
|
resources: {}
|
||||||
|
nodeSelector: {}
|
||||||
|
tolerations: []
|
||||||
|
affinity: {}
|
||||||
ingress:
|
ingress:
|
||||||
enabled: true
|
enabled: true
|
||||||
className: kong
|
className: kong
|
||||||
@@ -61,8 +58,9 @@ server:
|
|||||||
accessModes: [ "ReadWriteOnce" ]
|
accessModes: [ "ReadWriteOnce" ]
|
||||||
size: 100Mi
|
size: 100Mi
|
||||||
storageClassName: ""
|
storageClassName: ""
|
||||||
logLevel: "DEBUG"
|
logLevel: "INFO"
|
||||||
# logLevel: "INFO"
|
# logLevel: "DEBUG"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
db:
|
db:
|
||||||
|
|||||||
Reference in New Issue
Block a user