命令参考
本文档是Installer安装部署的命令参考内容。
制备组件配置文件与组件安装脚本打包
生成组件资产配置文件
命令
shell./fuyao create component-config命令功能
生成组件配置文件,配置内包含所有支持的操作系统清单、所有可安装的组件清单,用户可根据该配置文件打包安装脚本。
命令格式
在指定路径生成组件配置文件。
shell./fuyao create component-config -p <component configuration file save path, eg: /root/openfuyao>查看命令帮助。
shell./fuyao create component-config -h
命令路径
生成fuyao二进制文件的文件夹内,例如:
/root/installer/fuyao create component-config参数说明
参数名称 描述 -h,--help 命令帮助。 -p,--path 生成配置文件存放路径。 执行用户
该命令是由root用户执行。
使用前提
已编译好installer go二进制文件。
注意事项
无
相关命令
组件安装脚本打包。
shell./fuyao create component-package应用示例
执行命令:
shell./fuyao create component-config命令输出结果如下:
shellThe component configuration file is successfully generated.
打包组件安装脚本
命令
shell./fuyao create component-package命令功能
根据组件资产配置文件一键打包待安装组件的执行脚本与相关配置文件到当前目录的targets目录下。
命令格式
根据组件配置文件打包组件安装脚本。
shell./fuyao create component-package -f <component configuration file path, eg: /root/openfuyao/component-config.yaml>根据组件配置文件打包组件安装脚本,同时将安装脚本按操作系统打包为压缩包。
shell./fuyao create component-package -f <component configuration file path, eg: /root/openfuyao/component-config.yaml> -- subpackage-tar查看命令帮助。
shell./fuyao create component-package -h
命令路径
生成fuyao二进制文件的文件夹内,例如:
/root/installer/fuyao create component-package参数说明
参数名称 描述 -h,--help 命令帮助。 -f,--file 组件资产配置文件路径。 执行用户
该命令是由root用户执行。
使用前提
- 已编译好installer go二进制文件。
- 已生成组件资产配置文件。
注意事项
-f标志为必加标志。
相关命令
生成组件资产配置文件。
shell./fuyao create component-config生成集群配置文件。
shell./fuyao create cluster-config
应用示例
执行命令:
shell./fuyao create component-package -f fuyao-component-config.yaml命令输出结果如下:
shellSuccessfully completed component code packaging.
制备离线制品
导出离线制品
命令
shell./fuyao export artifact命令功能
导出离线安装所需制品,制品包括离线安装所需的镜像和二进制文件。
命令格式
在指定路径存放制品。
shell./fuyao export artifact -p <artifact save path, eg: /root/openfuyao>导出制品时输出debug级别日志,并将日志同时输出到控制台。
shell./fuyao export artifact --debug国外网络环境导出制品。
shell./fuyao export artifact --zone nocn查看命令帮助。
shell./fuyao export artifact -h
命令路径
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
targets目录执行:/root/installer/targets/fuyao export artifact - 若直接下载的组件安装包,此命令需要在安装包文件夹内执行,例如:
/root/fuyao-v25.03-openEuler-22.03-amd64/fuyao export artifact
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
参数说明
参数名称 描述 -h,--help 命令帮助。 -p,--path 生成制品文件存放路径。 --zone 时区,用于标记是否为中国大陆网络环境,缺省值为cn,为中国大陆网络环境。 --debug 开启debug调试,输出debug级日志,同时将日志输出到控制台。 执行用户
该命令是由root用户执行。
使用前提
已打包组件安装脚本或已下载openFuyao安装包。
注意事项
无
相关命令
组件安装脚本打包。
shell./fuyao create component-package创建离线镜像仓并上传制品。
shell./fuyao create registry
应用示例
导出离线安装所需制品,执行如下命令:
shell./fuyao export artifact命令输出结果如下:
shellThe offline artifact is exported successfully.
创建离线镜像仓
命令
shell./fuyao create registry命令功能
离线环境创建镜像仓并自动上传镜像到镜像仓。
命令格式
在执行命令机器创建镜像仓。
shell./fuyao create registry --artifact-path <offlie artifact save path, eg: /root/openfuyao/fuyao-offline-artifact.tar.gz > --registry-passwd xxxxx --registry-db-passwd xxxxx在执行命令机器创建镜像仓,并保留安装过程中产生的临时文件。
shell./fuyao create registry --artifact-path <offlie artifact save path, eg: /root/openfuyao/fuyao-offline-artifact.tar.gz> --registry-passwd xxxxx --registry-db-passwd xxxxx --skip-rm-tmp-file在执行命令机器创建镜像仓并指定镜像仓的域名与镜像仓证书过期时间。
shell./fuyao create registry --artifact-path <offlie artifact save path, eg: /root/openfuyao/fuyao-offline-artifact.tar.gz > --registry-domain my.harbor.com --registry-passwd xxxxx --registry-db-passwd xxxxx --cert-expiry-days 365在指定机器创建镜像仓并输出debug级别日志。
shell./fuyao create registry --artifact-path <offlie artifact save path, eg: /root/openfuyao/fuyao-offline-artifact.tar.gz > --registry-node-host 10.1.1.2 --registry-node-passwd xxxxx --registry-node-user root --registry-passwd xxxxx --registry-db-passwd xxxxx查看命令帮助。
shell./fuyao create registry -h
命令路径
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
targets目录执行:/root/targets/fuyao export artifact。 - 若直接下载的组件安装包,此命令需要在安装包文件夹内执行,例如:
/root/fuyao-v25.03-openEuler-22.03-amd64/fuyao export artifact。
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
参数说明
参数名称 描述 -h,--help 命令帮助。 --artifact-path 离线安装时制品存放路径。 --registry-node-user 登录镜像仓机器用户名。 --registry-node-passwd 登录镜像仓机器密码。 --registry-node-host 镜像仓机器IP地址。 --registry-domain 镜像仓域名。 --cert-expiry-days 镜像仓证书过期天数。 --harbor-password 镜像仓密码。 --registry-db-passwd 镜像仓数据库密码。 --skip-rm-tmp-file 跳过安装过程中生成的临时文件。 --debug 开启debug调试,输出debug级日志,同时将日志输出到控制台。 执行用户
该命令是由root用户执行。
使用前提
已导出离线安装所需制品。
注意事项
无
相关命令
导出离线制品。
shell./fuyao export artifact创建集群。
shell./fuyao create cluster
应用示例
在执行机创建镜像仓并指定镜像仓的域名和密码,执行如下命令。
shell./fuyao create registry --artifact-path <offlie artifact save path, eg: /root/openfuyao/fuyao-offline-artifact.tar.gz > --registry-domain my.harbor.com --registry-passwd xxxxx命令输出结果如下。
shell[preflight] Running pre-flight checks [prepare] Preprocessing shell script [preflight] Checking the installation environment [prepare] Copy the binary file to the node [executor] Start installing components [executor] This may take a few minutes The image warehouse is created successfully.
创建集群
创建集群配置文件
命令
shell./fuyao create cluster-config命令功能
生成集群配置文件,用户修改配置文件后可根据该配置文件创建集群。
命令格式
在指定路径生成组件配置文件。
shell./fuyao create cluster-config -p <cluster configuration file save path, eg: /root/openfuyao>生成高可用集群配置文件。
shell./fuyao create cluster-config --ha生成带有高级参数的集群配置文件。
shell./fuyao create cluster-config --advanced-params生成带有全量的组件和参数的集群配置文件。
shell./fuyao create cluster-config --all-params查看命令帮助。
shell./fuyao create cluster-config -h
命令路径
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
targets目录执行:/root/targets/fuyao create cluster-config。 - 若直接下载的组件安装包,此命令需要在安装包文件夹内执行,例如:
/root/fuyao-v25.03-openEuler-22.03-amd64/fuyao create cluster-config。
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
参数说明
参数名称 描述 -h,--help 命令帮助。 -p,--path 生成集群配置文件存放路径。 --ha 生成高可用集群配置文件,该文件含有高可用组件参数,不添加标志生成非高可用集群配置文件。 --advanced-params 生成的集群配置文件中包含高级参数,不添加该标志配置文件中不包含高级参数。 --all-params 生成的集群配置文件中包含全量的组件和参数。 执行用户
该命令是由root用户执行。
使用前提
已生成组件安装脚本或已经下载openFuyao安装包。
注意事项
无
相关命令
组件安装脚本打包。
shell./fuyao create component-package创建集群。
shell./fuyao create cluster
应用示例
生成最简集群配置文件,执行如下命令:
shell./fuyao create cluster-config命令输出结果如下:
shellThe cluster configuration file is successfully generated.
创建集群
命令
shell./fuyao create cluster命令功能
- 创建不带有openFuyao的Kubernetes集群。
- 创建带有openFuyao的Kubernetes集群。
- 创建不带有openFuyao,但带有Ascend Deployer的Kubernetes集群。
- 创建带有openFuyao且带有Ascend Deployer的Kubernetes集群。
- 根据配置文件创建多节点集群。
命令格式
创建不带有openFuyao的单节点Kubernetes集群。
shell./fuyao create cluster创建带有openFuyao的单节点Kubernetes集群。
shell./fuyao create cluster -A根据集群配置文件创建集群。
shell./fuyao create cluster -f <cluster configuration file path, eg: /root/openfuyao/cluster-config.yaml>创建单节点集群,并使用用户提供的配置文件初始化集群。
shell./fuyao create cluster --init-config <init cluster configuration file path, eg: /root/openfuyao/init-cluster-config.yaml>创建集群时开启debug调试。
shell./fuyao create cluster --debug离线创建集群。
shell./fuyao create cluster --debug --offline --artifact-path <offline artifact file path, eg: /root/openfuyao/offline-aritfact.tar.gz>国外网络环境安装集群。
shell./fuyao create cluster --zone nocn国外网络环境安装集群,并跳过删除安装过程中产生的临时文件。
shell./fuyao create cluster --zone nocn --skip-rm-tmp-file创建不带有openFuyao,但带有Ascend Deployer的Kubernetes单节点集群。
shell./fuyao create cluster --ascend-ai创建带有openFuyao且带有Ascend Deployer的Kubernetes单节点集群。
shell./fuyao create cluster --ascend-ai -A- 离线创建带有openFuyao且带有Ascend Deployer组件的Kubernetes单节点集群。
shell./fuyao create cluster --ascend-ai --offline --artifact-path <offline artifact file path, eg: /root/openfuyao/offline-aritfact.tar.gz>- 查看命令帮助。
shell./fuyao create cluster -h命令路径
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
targets目录执行:/root/targets/fuyao create cluster - 若直接下载的组件安装包,此命令需要在安装包文件夹内执行,例如:
/root/fuyao-v25.03-openEuler-22.03-amd64/fuyao create cluster
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
参数说明
参数名称 描述 -h,--help 命令帮助。 -f,--file 集群规划配置文件存放路径。 -A,--all 安装全量组件,默认仅安装Kubernetes、网络插件、Helm。 --offline 离线安装,不使用此标志,默认为在线安装。 --ascend-ai 部署Ascend Deployer组件,仅在部署单节点集群时生效,默认不部署Ascend Deployer组件。 --artifact-path 离线制品存放路径与制品包名,仅离线部署时可用。 --zone 时区,用于标记是否为中国大陆网络环境,缺省值为cn,为中国大陆网络环境。 --skip-rm-tmp-file 跳过安装过程中生成的临时文件。 --debug 开启debug调试,输出debug级日志,同时将日志输出到控制台。 执行用户
该命令是由root用户执行。
使用前提
已生成组件安装脚本或已下载openFuyao安装包。
注意事项
无
相关命令
组件安装脚本打包。
shell./fuyao create component-package扩容集群
shell./fuyao add nodes
应用示例
创建带有openfuyao-system的单节点Kubernetes集群,执行如下命令:
shell./fuyao create cluster -A命令输出结果如下:
shell[preflight] Running pre-flight checks [prepare] Preprocessing shell script [preflight] Checking the installation environment [prepare] Start preparing the artifact [prepare] This may take a few minutes because need to download the artifact [executor] Start installing components [executor] This may take a few minutes You have successfully completed the installation The website of the fuyao system is as follows: https://192.168.0.10:31616 You can login to the fuyao system using the following username and password: username: admin password: xxxxxx username [post check] Check that all Pods are normal [post check] This can take a few minutes or a dozen minutes because the container images need to downloaded [post check] You can also exit the installer by pressing ctrl+c Your cluster has created successfully! You can run the following command on the cluster node to check the pod status: kubectl get pod -A You can run the following command on the cluster node to check the node network status: kubectl get node
扩容集群
命令
shell./fuyao add nodes命令功能
集群安装完成后,使用配置文件拓展集群。扩容时自动在待加入集群节点上安装cri等基础组件。集群扩容所用组件版本与当前集群所用组件版本一致。非高可用集群,可以向集群中加入工作节点,但不可加入控制平面节点,高可用集群可向集群中加入控制平面节点和工作节点。
命令格式
在线扩容集群。
shell./fuyao add nodes -f <add nodes yaml file path, eg: /root/openfuyao/add.yaml>在线扩容集群,并跳过删除扩容过程中产生的临时文件。
shell./fuyao add nodes -f <add nodes yaml file path, eg: /root/openfuyao/add.yaml> --skip-rm-tmp-file离线扩容集群。
shell./fuyao add nodes -f <add nodes yaml file path, eg: /root/openfuyao/add.yaml> --artifact-path <offline artifact file path, eg: /root/openfuyao/offline-aritfact.tar.gz> --offline在国外网络环境下扩容集群并开启debug调试。
shell./fuyao add nodes -f <add nodes yaml file path, eg: /root/openfuyao/add.yaml> --zone nocn --debug查看命令帮助。
shell./fuyao add nodes -h
命令路径
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
targets目录执行:/root/targets/fuyao add nodes -f add-nodes.yaml。 - 若直接下载的组件安装包,此命令需要在安装包文件夹内执行,例如:
/root/fuyao-v25.03-openEuler-22.03-amd64/fuyao add nodes -f add-nodes.yaml。
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
参数说明
参数名称 描述 -h,--help 命令帮助。 -f,--file 集群扩容配置文件存放路径。 --offline 离线扩容,不使用此标志,默认为在线扩容。 --artifact-path 离线制品存放路径与制品包名,仅离线扩容时可用。 --zone 时区,用于标记是否为中国大陆网络环境,缺省值为cn,为中国大陆网络环境。 --skip-rm-tmp-file 跳过扩容过程中生成的临时文件。 --debug 开启debug调试,输出debug级日志,同时将日志输出到控制台。 执行用户
该命令是由root用户执行。
使用前提
已使用openFuyao安装包安装一套集群。
注意事项
在创建集群机器上执行扩容。
相关命令
创建集群。
shell./fuyao create cluster卸载集群。
shell./fuyao destroy cluster
应用示例
在线扩容集群,执行如下命令:
shell./fuyao add nodes -f <add nodes yaml file path, eg: /root/openfuyao/add.yaml>命令输出结果如下:
shell[preflight] Running pre-flight checks [prepare] Preprocessing shell script [preflight] Checking the installation environment [prepare] Start preparing the artifact [prepare] This may take a few minutes because need to download the artifact [executor] Start installing components [executor] This may take a few minutes [post check] Check that all Pods are normal [post check] This can take a few minutes or a dozen minutes because the container images need to downloaded Cluster expansion succeeds! You can run the following command on the cluster node to check the pod status: kubectl get pod -A You can run the following command on the cluster node to check the node network status: kubectl get node
卸载集群
命令
shell./fuyao destroy cluster命令功能
可使用配置文件卸载集群,在All-In-One安装时可快速卸载集群。离线环境卸载集群时可选择保留离线镜像仓或卸载离线镜像仓。
命令格式
All-In-One在线卸载不带有openfuyao-system集群。
shell./fuyao destroy clusterAll-In-One在线卸载不带有openfuyao-system集群并开启debug调试。
shell./fuyao destroy cluster --debugAll-In-One在线卸载带有openfuyao-system集群。
shell./fuyao destroy cluster -A使用配置文件在线卸载集群。
shell./fuyao destroy cluster -f <cluster configuration file path, eg: /root/openfuyao/cluster-config.yaml>All-In-One离线卸载集群。
shell./fuyao destroy cluster --offline使用配置文件离线卸载集群。
shell./fuyao destroy cluster -f <cluster configuration file path, eg: /root/openfuyao/cluster-config.yaml> --offline --registry-node-host 10.1.1.2 --registry-node-passwd xxxxx --registry-node-user rootAll-In-One离线卸载集群并保留离线本地harbor。
shell./fuyao destroy cluster --offline --skip-rm-hub使用配置文件离线卸载集群并保留harbor。
shell./fuyao destroy cluster -f \<cluster configuration file path, eg: /root/openfuyao/cluster-config.yaml> --offline --registry-node-host 10.1.1.2 --registry-node-passwd xxxxx --registry-node-user root --skip-rm-hub查看命令帮助。
shell./fuyao destroy cluster -h
命令路径
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
targets目录执行:/root/targets/fuyao create cluster - 若直接下载的组件安装包,此命令需要在安装包文件夹内执行,例如:
/root/fuyao-v25.03-openEuler-22.03-amd64/fuyao create cluster
- 若克隆源代码并打包组件安装脚本,此命令需要在installer代码文件夹下
参数说明
参数名称 描述 -h,--help 命令帮助。 -f,--file 卸载集群配置文件存放路径。 --skip-rm-harbor 跳过卸载一键部署工具安装的harbor仓,默认卸载harbor。 --registry-node-user 登录镜像仓机器用户名。 --registry-node-host 镜像仓机器IP地址。 --registry-node-passwd 镜像仓机器密码。 --debug 开启debug调试,输出debug级日志,同时将日志输出到控制台。 执行用户
该命令是由root用户执行。
使用前提
- 已生成组件安装脚本或已下载openFuyao安装包。
- 集群为openFuyao一键部署工具安装的集群。
注意事项
集群是由openFuyao一键部署工具安装的集群。
相关命令
创建集群。
shell./fuyao create cluster应用示例
All-In-One在线卸载带有openfuyao-system集群,执行如下命令:
shell./fuyao destroy cluster -A命令输出结果如下:
shell[preflight] Running pre-flight checks [prepare] Preprocessing shell script [prepare] Generate a directed acyclic graph [executor] Start uninstalling components [executor] This may take a few minutes Successfully completed cluster destroy
查看版本
查看openFuyao版本
命令
shell./fuyao version命令功能
查看openFuyao版本。
命令格式
查看openFuyao版本。
shell./fuyao version查看命令帮助。
shell./fuyao version -h
命令路径
生成fuyao二进制文件的文件夹内,例如:
/root/installer/fuyao verison参数说明
参数名称 描述 -h,--help 命令帮助。 执行用户
该命令是由root用户执行。
使用前提
已编译好installer go二进制文件。
注意事项
无
相关命令
无
应用示例
执行命令:
shell./fuyao version命令输出结果如下
shellopenfuyao-system-version: v25.03