请按照以下过程从引导节点初始化 Omnissa Access Control Plane 集群。 所有命令都必须从引导节点运行。
初始化控制平面集群
过程:
- 按照以下内嵌说明,初始化控制平面集群。
**注意:**根据部署的 OVA 大小,必须运行以下命令之一。 示例:
-
如果部署了小型 OVA:
wso access init -n cp-cluster -s small -
如果部署了中型 OVA:
wso access init -n cp-cluster -s medium -
如果部署了大型 OVA:
wso access init -n cp-cluster -s large
运行其中一个命令时,输出会与以下内容类似:
cd /root/<cluster_name>
wso access init -n cp-cluster -s small
# Output
<timestamp> Control Plane name: cp-cluster
<timestamp> Created a sample profile.yml file
<timestamp> Sample Control Plane inventory file created
<timestamp> Created a sample telemetry config file: /root/<cluster_name>/telegraf_plugin/prometheus_remote_write.conf.example
<timestamp> Successfully initialized
结果
此命令会创建以下文件:
- 集群清单文件 (
cp-cluster.ini) profile.yml文件
配置集群清单
cp-cluster.ini 文件定义了以下各项:
- 基础架构/平台节点
- Omnissa Access 节点
| 组件 | IP 地址 |
|---|---|
| asset_server | 一个或两个基础架构/平台节点 |
| consul、vault、nomad | 所有基础架构/平台节点和 Omnissa Access 节点 |
| kafka、opensearch、opensearch_leader、persistent_redis、postgres、general_compute | 所有基础架构/平台节点 |
| general_compute_access_linux | 所有 Omnissa Access 节点 |
| general_compute_nginx_http | 所有 Omnissa Access 节点 |
自动填充 cp-cluster.ini 文件的过程:
执行以下命令:
update-cluster-ini.sh INI_FILE=/root/<cluster_name>/cp-cluster/cp-cluster.ini
# Output
[root@bootstrap configuser]# ./update-cluster-ini.sh INI_FILE=/root/<cluster_name>/cp-cluster/cp-cluster.ini
Enter User (this is the user created at OVA deployment): configuser
Use (1) password or (2) ssh_private_key_file?
Enter 1 or 2: 1
Enter password:
Deployment size: (1) small (2) medium (3) large
Enter 1, 2, or 3: 1
Enter Omnissa Access Node IPs (2 IPs required, comma or space separated): 10.0.0.x 10.0.0.x
Enter infra and platform node IPs (3 IPs required, comma or space separated): 10.0.0.x 10.0.0.x 10.0.0.x
Moved existing /root/<cluster_name>/cp-cluster/cp-cluster.ini to /root/<cluster_name>/cp-cluster/cp-cluster.ini.bkp.20260714_052152
Written /root/<cluster_name>/cp-cluster/cp-cluster.ini (small): access=2, infra=3, asset=2.
更新 cp-cluster.ini 文件的手动过程:
-
打开
cp-cluster.ini文件。例如:vi /root/<cluster_name>/cp-cluster/cp-cluster.ini -
按照以下内嵌说明,更新该文件。
**注意:**您可以使用
ansible_password或ansible_ssh_private_key_file选项。如果使用
ansible_ssh_private_key_file,则需要执行步骤 3。如果使用
ansible_password,请确保它与部署 OVA 时所用的密码相同。[linux:children] asset_server_linux consul_server_linux general_compute_linux kafka_controller_linux kafka_server_linux nomad_server_linux opensearch_leader_linux opensearch_data_linux postgres_linux vault_server_linux general_compute_nginx_http general_compute_access_linux # This template includes sample IPs. Please update these to match your specific environment settings. # Provide IPs to asset server nodes [asset_server_linux] 10.0.0.1 10.0.0.2 # Provide IPs to management server nodes [consul_server_linux] 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 10.0.0.5 # Provide IPs to management server nodes [vault_server_linux] 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 10.0.0.5 # Provide IPs to management server nodes [nomad_server_linux] 10.0.0.1 10.0.0.2 10.0.0.3 10.0.0.4 10.0.0.5 # Provide IPs to kafka controller nodes [kafka_controller_linux] 10.0.0.1 10.0.0.2 10.0.0.3 # Provide IPs to kafka server nodes [kafka_server_linux] 10.0.0.1 10.0.0.2 10.0.0.3 # Provide IPs to postgres server nodes [postgres_linux] 10.0.0.1 10.0.0.2 10.0.0.3 # Provide IPs to Opensearch leader nodes [opensearch_leader_linux] 10.0.0.1 10.0.0.2 10.0.0.3 # Provide IPs to Opensearch data nodes [opensearch_data_linux] 10.0.0.1 10.0.0.2 10.0.0.3 # Provide IPs to General compute nodes [general_compute_linux] 10.0.0.1 10.0.0.2 10.0.0.3 # Provide IPs to access compute nodes [general_compute_access_linux] 10.0.0.4 10.0.0.5 # Provide IPs to Nginx HTTP server nodes [general_compute_nginx_http] 10.0.0.4 10.0.0.5 [linux:vars] # Uncomment ansible_user, ansible_password or ansible_ssh_private_key_file below to provide common credentials to connect to each of the specified nodes # Only one of password or ssh private key can be provided #ansible_user= #ansible_password= #ansible_ssh_private_key_file= -
按照以下内嵌说明,生成
ansible_ssh_private_key_file文件并在cp-cluster.ini文件中使用该文件。# On bootstrap node follow below steps # change to configuser su configuser # Generate Public and private keys ssh-keygen -t <cipher> # Copy public Key to all other machines (Access+Infra+platform) ssh-copy-id configuser@10.0.0.X # Repeat this for all cluster VMs from bootstrap VM # Test login work with other machines without password ssh configuser@10.0.0.X # You should be able to login to 10.0.0.X from bootstrap without credentials # Exit from 10.0.0.X by using exit command, so that you are in bootstrap machine. exit # Exit as configuser; run again to return to root # create a directory in bootstrap machine mkdir -p /root/<cluster_name>/cp-cluster/private-key # Copy the private key to PATH cp /home/configuser/.ssh/id_<cipher> /root/<cluster_name>/cp-cluster/private-key # change the permission of file chmod 400 /root/<cluster_name>/cp-cluster/private-key/id_<cipher>
更新 /root/<cluster_name>/profile.yml 文件
此过程可确保最初仅部署核心基础架构服务。
profile.yml 文件包含集群环境的部署级别配置设置。它主要用于配置:
-
时间同步 (NTP)
-
共享存储 (NFS)
-
集中式日志记录集成
日志记录部分允许集群服务将日志转发到集中式日志记录平台,例如:
- Loki
- OpenSearch
- Syslog
示例结构:
# logging: # loki_server: # url: # username: # password: # opensearch: # url: https://10.0.0.x:<port> # username: host-logging-writer # password: ******* # index_prefix: access_logs # syslog_servers: # host: # protocol: udp # port: 514 # syslog_cert_passphrase: # only if your syslog client key in the logging directory is passphrase-protected
重要说明
- 部署后对日志记录配置所做的更改可能需要重新部署或升级才能生效。
- 仅取消注释并配置所需的部分。
- 确保所有外部服务(NTP、NFS、日志记录服务器)均可从集群节点进行访问。
- 这不是强制性过程,但如果贵组织具有 NTP 服务器,则可以启用 NTP 服务器配置并使用服务器地址对其进行更新。
过程:
-
打开
profile.yml文件。例如:vi /root/<cluster_name>/profile.yml -
如果需要,取消注释用于为集群配置基于 NFS 的共享存储和 NTP 服务器的设置,例如:
# Uncomment and provide NTP server to configure for time synchronization on the cluster nodes # ntp_server: # nfs_host: 10.0.0.x # nfs_path: : # nfs_version: 4 -
查看
profile.yml文件的其余内容并更新其他必要部分,例如日志记录和衡量指标。 -
保存
profile.yml文件。 -
运行以下命令以验证
profile.yml文件。wso cp precheck
验证集群清单文件
-
更新清单文件 (
.ini) 后,对其进行验证。例如:wso access validate # OUTPUT <timestamp> Inventory file validated successfully.
此页面对您有帮助吗?