OpenShift Container Storage is now OpenShift Data Foundation starting with version 4.9.
A.3.3. 部署融合模式
执行以下命令来部署聚合模式:
在客户端上执行以下命令,以部署 heketi 和 Red Hat Gluster Storage pod:
cns-deploy -v -n <namespace> -g --admin-key <admin-key> --user-key <user-key> topology.json
# cns-deploy -v -n <namespace> -g --admin-key <admin-key> --user-key <user-key> topology.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意- 从 Container-Native Storage 3.6 中,对 Red Hat Openshift Container Storage 中的 S3 兼容对象存储的支持处于技术预览阶段。要在 Red Hat Openshift Container Storage 中部署 S3 兼容对象存储,请参阅以下子步骤。
-
在上述命令中,
admin-key
的值是 heketi admin 用户的 secret 字符串。heketi 管理员有权访问所有 API 和命令。默认为不使用 secret。 cns-deploy 中的
BLOCK_HOST_SIZE
参数控制自动创建的 Red Hat Gluster Storage 卷的大小(以 GB 为单位)。当需要更多空间时,此默认配置将动态创建块托管为 500GB 的卷。如果要更改此值,则在 cns-deploy 中使用 --block-host。例如:cns-deploy -v -n storage-project -g --admin-key secret --user-key mysecret --block-host 1000 topology.json
# cns-deploy -v -n storage-project -g --admin-key secret --user-key mysecret --block-host 1000 topology.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意For more information on the cns-deploy commands, refer to the man page of cns-deploy.
For more information on the cns-deploy commands, refer to the man page of cns-deploy.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow +
cns-deploy --help
# cns-deploy --help
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 要部署 S3 兼容对象存储以及 Heketi 和 Red Hat Gluster Storage pod,请执行以下命令:
cns-deploy /opt/topology.json --deploy-gluster --namespace <namespace> --yes --admin-key <admin-key> --user-key <user-key> --log-file=<path/to/logfile> --object-account <object account name> --object-user <object user name> --object-password <object user password> --verbose
# cns-deploy /opt/topology.json --deploy-gluster --namespace <namespace> --yes --admin-key <admin-key> --user-key <user-key> --log-file=<path/to/logfile> --object-account <object account name> --object-user <object user name> --object-password <object user password> --verbose
Copy to Clipboard Copied! Toggle word wrap Toggle overflow object-account
、object-user
和object-password
是部署 gluster-s3 容器所需的凭证。如果缺少其中任何一个,gluster-s3 容器部署将会被跳过。object-sc
和object-capacity
是可选参数。其中,object-sc
用于指定已存在的 StorageClass,用于创建 Red Hat Gluster 存储卷来备份对象存储和对象容量
,这是将存储对象数据的 Red Hat Gluster 存储卷的总容量。例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
执行以下命令以便客户端与容器通信:
export HEKETI_CLI_SERVER=http://heketi-<project_name>.<sub_domain_name>
# export HEKETI_CLI_SERVER=http://heketi-<project_name>.<sub_domain_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:
export HEKETI_CLI_SERVER=http://heketi-storage-project.cloudapps.mystorage.com
# export HEKETI_CLI_SERVER=http://heketi-storage-project.cloudapps.mystorage.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 要验证 Heketi 是否已使用拓扑载入,请执行以下命令:
heketi-cli topology info
# heketi-cli topology info
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The cns-deploy tool does not support scaling up of the cluster. To manually scale-up the cluster, see link:https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Managing_Clusters[]
The cns-deploy tool does not support scaling up of the cluster. To manually scale-up the cluster, see link:https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Managing_Clusters[]
A.3.3.1. 部署独立模式 复制链接链接已复制到粘贴板!
执行以下命令以独立模式部署 Red Hat Openshift Container Storage:
要设置到所有 Red Hat Gluster Storage 节点的免密码 SSH,请在客户端上为每个 Red Hat Gluster Storage 节点执行以下命令:
ssh-copy-id -i /root/.ssh/id_rsa root@<hostname>
# ssh-copy-id -i /root/.ssh/id_rsa root@<hostname>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 在客户端上执行以下命令,以部署 heketi pod 并创建 Red Hat Gluster Storage 节点集群:
cns-deploy -v -n <namespace> -g --admin-key <admin-key> --user-key <user-key> topology.json
# cns-deploy -v -n <namespace> -g --admin-key <admin-key> --user-key <user-key> topology.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意- 对 S3 兼容对象存储的支持处于技术预览阶段。部署 S3 兼容对象存储请查看子步骤,如下所示。
-
在上述命令中,
admin-key
的值是 heketi admin 用户的 secret 字符串。heketi 管理员有权访问所有 API 和命令。默认为不使用 secret。 cns-deploy 中的
BLOCK_HOST_SIZE
参数控制自动创建的 Red Hat Gluster Storage 卷的大小(以 GB 为单位)。当需要更多空间时,此默认配置将动态创建块托管为 500GB 的卷。如果要更改此值,则在 cns-deploy 中使用 --block-host。例如:cns-deploy -v -n storage-project -g --admin-key secret --user-key mysecret --block-host 1000 topology.json
# cns-deploy -v -n storage-project -g --admin-key secret --user-key mysecret --block-host 1000 topology.json
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 注意For more information on the cns-deploy commands, refer to the man page of the cns-deploy.
For more information on the cns-deploy commands, refer to the man page of the cns-deploy.
Copy to Clipboard Copied! Toggle word wrap Toggle overflow +
cns-deploy --help
# cns-deploy --help
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 要部署 S3 兼容对象存储以及 Heketi 和 Red Hat Gluster Storage pod,请执行以下命令:
cns-deploy /opt/topology.json --deploy-gluster --namespace <namespace> --admin-key <admin-key> --user-key <user-key> --yes --log-file=<path/to/logfile> --object-account <object account name> --object-user <object user name> --object-password <object user password> --verbose
# cns-deploy /opt/topology.json --deploy-gluster --namespace <namespace> --admin-key <admin-key> --user-key <user-key> --yes --log-file=<path/to/logfile> --object-account <object account name> --object-user <object user name> --object-password <object user password> --verbose
Copy to Clipboard Copied! Toggle word wrap Toggle overflow object-account
、object-user
和object-password
是部署 gluster-s3 容器所需的凭证。如果缺少其中任何一个,gluster-s3 容器部署将会被跳过。object-sc
和object-capacity
是可选参数。其中,object-sc
用于指定已存在的 StorageClass,用于创建 Red Hat Gluster 存储卷来备份对象存储和对象容量
,这是将存储对象数据的 Red Hat Gluster 存储卷的总容量。例如:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Brick 多路是一个功能,允许在一个进程中添加多个 brick。这可以减少资源消耗,并允许我们运行超过相同内存消耗的 brick 数。在每个集群上的其中一个 Red Hat Gluster Storage 节点上执行以下命令来启用 brick-multiplexing:
执行以下命令以启用 brick 多路功能:
gluster vol set all cluster.brick-multiplex on
# gluster vol set all cluster.brick-multiplex on
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:
gluster vol set all cluster.brick-multiplex on
# gluster vol set all cluster.brick-multiplex on Brick-multiplexing is supported only for container workloads (Independent or Converged mode). Also it is advised to make sure that either all volumes are in stopped state or no bricks are running before this option is modified.Do you still want to continue? (y/n) y volume set: success
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 重启 heketidb 卷:
gluster vol stop heketidbstorage
# gluster vol stop heketidbstorage Stopping volume will make its data inaccessible. Do you want to continue? (y/n) y volume stop: heketidbstorage: success
Copy to Clipboard Copied! Toggle word wrap Toggle overflow gluster vol start heketidbstorage
# gluster vol start heketidbstorage volume start: heketidbstorage: success
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
执行以下命令以便客户端与容器通信:
export HEKETI_CLI_SERVER=http://heketi-<project_name>.<sub_domain_name>
# export HEKETI_CLI_SERVER=http://heketi-<project_name>.<sub_domain_name>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 例如:
export HEKETI_CLI_SERVER=http://heketi-storage-project.cloudapps.mystorage.com
# export HEKETI_CLI_SERVER=http://heketi-storage-project.cloudapps.mystorage.com
Copy to Clipboard Copied! Toggle word wrap Toggle overflow 要验证 Heketi 是否已使用拓扑载入,请执行以下命令:
heketi-cli topology info
# heketi-cli topology info
Copy to Clipboard Copied! Toggle word wrap Toggle overflow
The cns-deploy tool does not support scaling up of the cluster. To manually scale-up the cluster, see link:https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Managing_Clusters[].
The cns-deploy tool does not support scaling up of the cluster. To manually scale-up the cluster, see link:https://access.redhat.com/documentation/en-us/red_hat_openshift_container_storage/3.11/html-single/operations_guide/#chap-Documentation-Red_Hat_Gluster_Storage_Container_Native_with_OpenShift_Platform-Managing_Clusters[].