本站总访问量 gbase8s数据库搭建 - Jerry的小站

Jerry Gao

上帝就是真理,真理就是上帝

GBase 8s数据库是一款基于informix研发的数据库,保留了大部分原生的语法、特性及字段类型,并且引入了大量oracle的优势特性。

镜像选择

1
docker pull liaosnet/gbase8s:3.3.0_2_amd64

Kubernetes 部署

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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
kind: StatefulSet
apiVersion: apps/v1
metadata:
name: gbase8s
namespace: stable-db
labels:
app: gbase8s
spec:
replicas: 1
selector:
matchLabels:
app: gbase8s
template:
metadata:
labels:
app: gbase8s
spec:
containers:
- name: gbase8s
image: liaosnet/gbase8s:3.3.0_2_amd64
command:
- su
- "-"
- gbasedbt
- -c
- "ipcs -m|awk ' /^0x/{print $2}'|while read line;do ipcrm -m $line;done && oninit && sleep infinity"
ports:
- name: tcp-9088
containerPort: 9088
protocol: TCP
resources:
limits:
cpu: "1"
memory: 4Gi
ephemeral-storage: 10Gi
requests:
cpu: "1"
memory: 4Gi
ephemeral-storage: 10Gi
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
imagePullPolicy: IfNotPresent
livenessProbe:
tcpSocket:
port: 9088
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
readinessProbe:
tcpSocket:
port: 9088
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
startupProbe:
tcpSocket:
port: 9088
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
---
apiVersion: v1
kind: Service
metadata:
name: gbase8s
namespace: stable-db
annotations:
cloud.google.com/l4-rbs: "enabled"
labels:
app: gbase8s
spec:
loadBalancerIP: <your-ip>
type: LoadBalancer
externalTrafficPolicy: Cluster
ports:
- port: <your-port>
nodePort: <your-port>
targetPort: 9088
protocol: TCP
selector:
app: gbase8s

docker-compose 部署

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
version: '3'
services:
gaussdb:
image: liaosnet/gbase8s:3.3.0_2_amd64
container_name: gbase8s
restart: always
ports:
- "9088:9088"
stdin_open: true
tty: true
deploy:
resources:
limits:
cpus: '1'
memory: 4G
reservations:
cpus: '1'
memory: 4G

评论