安装k8s版本GCDW集群
非k8s节点安装k8s版本GCDW集群以下步骤均为root用户执行1、将10.10.55.74/10.10.1.67上的(/opt/kube/bin/kubectl、/usr/bin/helm、/root/.kube)三个文件拷贝到自己的机器上2、 修改环境变量。
非k8s节点安装k8s版本GCDW集群
以下步骤均为root用户执行
1、将10.10.55.74/10.10.1.67上的(/opt/kube/bin/kubectl
、/usr/bin/helm、/root/.kube)三个文件拷贝到自己的机器上
scp -r root@10.10.1.67:/opt/kube /opt; scp root@10.10.1.67:/usr/bin/helm /usr/bin; scp -r root@10.10.1.67:/root/.kube /root
2、 修改环境变量
[root@lxj-node-6 bin]# cat ~/.bash_profile
.bash_profile
Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
User specific environment and startup programs
PATH=
P
A
T
H
:
PATH:
PATH:HOME/bin:/opt/kube/bin
export PATH
[root@lxj-node-6 bin]# source ~/.bash_profile
3、 K8s环境注册租户
如:10.10.55.74环境,9.8.0.6.2版本的多租户模式已经部署好了(pub1),大家可以注册自己的租户了。前端注册网址:10.10.55.74:32161
(1)登录网址10.10.55.74:32161
(2)点击注册租户
填写以下信息:
Account Name 登录名称
Company Name
Mobile
Email
Nick Name
Nick Name
Admin Name
Admin Name
Admin Password
Admin Password
Confirm Password
Confirm Password
Comment
Comment
Storage Style
S3 AccessKey
S3 SecretKey
S3 EndPoint
S3 Region
S3 Bucket
疑问:如何获取S3 AccessKey 、S3 SecretKey、S3 EndPoint ?
安装节点进行如下操作:
[root@liushihong-node-0 gbase]# cd /opt/minio/
[root@liushihong-node-0 minio]# ll
total 59048
-rw-r–r-- 1 root root 16609280 Sep 28 16:03 mc
-rwxr-xr-x 1 root root 43855872 Sep 28 16:03 minio
[root@liushihong-node-0 minio]# ./minio server data &
[1] 16488
[root@liushihong-node-0 minio]#
Endpoint: http://10.40.5.50:9000 http://10.10.13.0:9000 http://10.10.130.0:9000 http://127.0.0.1:9000
AccessKey: 7NF1C6CQ0RD690IVT0P6
SecretKey: 7uOW7UoINoblVRxR4LvOZJDAxQm1GAmTMpJMd+e5
Browser Access:
http://10.40.5.50:9000 http://10.10.13.0:9000 http://10.10.130.0:9000 http://127.0.0.1:9000
Command-line Access: https://docs.min.io/docs/minio-client-quickstart-guide
$ mc config host add myminio http://10.40.5.50:9000 7NF1C6CQ0RD690IVT0P6 7uOW7UoINoblVRxR4LvOZJDAxQm1GAmTMpJMd+e5
Object API (Amazon S3 compatible):
Go: https://docs.min.io/docs/golang-client-quickstart-guide
Java: https://docs.min.io/docs/java-client-quickstart-guide
Python: https://docs.min.io/docs/python-client-quickstart-guide
JavaScript: https://docs.min.io/docs/javascript-client-quickstart-guide
.NET: https://docs.min.io/docs/dotnet-client-quickstart-guide
!!!疑问:如何获取S3 Bucket
登录Endpoint http://10.10.13.0:9000,创建一个bucket,如取名为bucket1,则在注册租户位置填写S3 bucket为bucket1
4、使用集群
获取租户名 kubectl get 租户名
kubectl get all -n 租户名
kubectl exec -it pod/coordinator-1-0 -n 租户名 – bash
kubectl get configmaps -n 租户名
kubectl edit configmaps gcdw-coordinator-default-config -n 租户名
kubectl get all -n 租户名
kubectl delete pod/coordinator-1-0 -n 租户名
[root@liushihong-node-0 kube]# kubectl get ns
NAME STATUS AGE
default Active 71d
ds Active 23h
gxy Active 23h
kube-node-lease Active 71d
kube-public Active 71d
kube-system Active 71d
lr1 Active 5h54m
lsh Active 4m27s
pub1 Active 23h
songyanling1 Active 23h
zhaoyingqi Active 4h38m
[root@liushihong-node-0 kube]# kubectl get all -n lsh(租户名)
NAME READY STATUS RESTARTS AGE
pod/coordinator-1-0 1/1 Running 0 4m44s
pod/coordinator-2-0 1/1 Running 0 4m44s
pod/gcware-0 1/1 Running 0 4m44s
pod/gcware-1 1/1 Running 0 4m44s
pod/gcware-2 1/1 Running 0 4m44s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/coordinator-1 NodePort 10.68.43.252 5258:26360/TCP 4m44s
service/coordinator-2 NodePort 10.68.148.91 5258:23718/TCP 4m43s
service/gcware ClusterIP None 5919/TCP 4m45s
NAME READY AGE
statefulset.apps/coordinator-1 1/1 4m44s
statefulset.apps/coordinator-2 1/1 4m44s
statefulset.apps/gcware 3/3 4m45s
[root@liushihong-node-0 kube]# kubectl exec -it pod/coordinator-1-0 -n lsh – bash
(如需使用gcdw需要先执行此条命令进入集群)
[gbase@coordinator-1-0 /]$ gcadmin
CLUSTER STATE: ACTIVE
=======================================
| GBASE GCWARE CLUSTER INFORMATION |
| NodeName | IpAddress | gcware |
| gcware1 | gcware-0.gcware | OPEN |
| gcware2 | gcware-1.gcware | OPEN |
| gcware3 | gcware-2.gcware | OPEN |
===================================================================
| GBASE COORDINATOR CLUSTER INFORMATION |
| NodeName | IpAddress | gcluster | DataState |
| | coordinator-1-0.coordinator-1 | OPEN | 0 |
| | coordinator-2-0.coordinator-2 | OPEN | 0 |
0 warehouse
2 coordinator node
0 free data node
[gbase@coordinator-1-0 /]$ gccli -ulsh -p111111
GBase client 9.8.0.6.26a66282. Copyright © 2004-2023, GBase. All Rights Reserved.
gbase> create warehouse wh1;
Query OK, 0 rows affected (Elapsed: 00:00:00.38)
gbase> use warehouse wh1;
Query OK, 0 rows affected (Elapsed: 00:00:00.01)
gbase> create vc vcname000001;
Query OK, 0 rows affected (Elapsed: 00:00:00.21)
设置默认warehouse:
启动warehouse:
alter warehouse wh1 resume;
gbase> show warehouses;
±-----±----------±------±------------------±------------------±--------±-------±-------------±------------±-----------±-----------±-------------±--------------±---------------+
| name | status | size | min_cluster_count | max_cluster_count | running | queued | auto_suspend | auto_resume | created_on | resumed_on | owner | comment | scaling_policy |
±-----±----------±------±------------------±------------------±--------±-------±-------------±------------±-----------±-----------±-------------±--------------±---------------+
| wh1 | SUSPENDED | SMALL | 1 | 1 | 0 | 0 | 600 | TRUE | 1696927431 | 0 | accountadmin | GBASE CLOUDDB | STANDARD |
±-----±----------±------±------------------±------------------±--------±-------±-------------±------------±-----------±-----------±-------------±--------------±---------------+
1 row in set (Elapsed: 00:00:00.00)
gbase> alter warehouse wh1 resume;
Query OK, 0 rows affected (Elapsed: 00:00:07.42)
gbase> show warehouses;
±-----±--------±------±------------------±------------------±--------±-------±-------------±------------±-----------±-----------±-------------±--------------±---------------+
| name | status | size | min_cluster_count | max_cluster_count | running | queued | auto_suspend | auto_resume | created_on | resumed_on | owner | comment | scaling_policy |
±-----±--------±------±------------------±------------------±--------±-------±-------------±------------±-----------±-----------±-------------±--------------±---------------+
| wh1 | STARTED | SMALL | 1 | 1 | 0 | 0 | 600 | TRUE | 1696927431 | 1696927648 | accountadmin | GBASE CLOUDDB | STANDARD |
±-----±--------±------±------------------±------------------±--------±-------±-------------±------------±-----------±-----------±-------------±--------------±---------------+
1 row in set (Elapsed: 00:00:00.00)
更多推荐
所有评论(0)