automation-suite
2023.10
true
- 概述
- 要求
- 推荐:部署模板
- 手动:准备安装
- 手动:准备安装
- 步骤 1:为离线安装配置符合 OCI 的注册表
- 步骤 2:配置外部对象存储
- 步骤 3:配置 High Availability Add-on
- 步骤 4:配置 Microsoft SQL Server
- 步骤 5:配置负载均衡器
- 步骤 6:配置 DNS
- 步骤 7:配置磁盘
- 步骤 8:配置内核和操作系统级别设置
- 步骤 9:配置节点端口
- 步骤 10:应用其他设置
- 步骤 12:验证并安装所需的 RPM 包
- 步骤 13:生成 cluster_config.json
- 证书配置
- 数据库配置
- 外部对象存储配置
- 预签名 URL 配置
- 符合 OCI 的外部注册表配置
- Disaster Recovery:主动/被动和主动/主动配置
- High Availability Add-on 配置
- 特定于 Orchestrator 的配置
- Insights 特定配置
- Process Mining 特定配置
- Document Understanding 特定配置
- Automation Suite Robot 特定配置
- 监控配置
- 可选:配置代理服务器
- 可选:在多节点 HA 就绪生产集群中启用区域故障恢复
- 可选:传递自定义 resolv.conf
- 可选:提高容错能力
- install-uipath.sh 参数
- 添加具有 GPU 支持的专用代理节点
- 为 Task Mining 添加专用代理节点
- 连接 Task Mining 应用程序
- 为 Automation Suite Robot 添加专用代理节点
- 步骤 15:为离线安装配置临时 Docker 注册表
- 步骤 16:验证安装的先决条件
- 手动:执行安装
- 安装后
- 集群管理
- 监控和警示
- 迁移和升级
- 特定于产品的配置
- 最佳实践和维护
- 故障排除
- 如何在安装过程中对服务进行故障排除
- 如何卸载集群
- 如何清理离线工件以改善磁盘空间
- 如何清除 Redis 数据
- 如何启用 Istio 日志记录
- 如何手动清理日志
- 如何清理存储在 sf-logs 捆绑包中的旧日志
- 如何禁用 AI Center 的流日志
- 如何对失败的 Automation Suite 安装进行调试
- 如何在升级后从旧安装程序中删除映像
- 如何禁用 TX 校验和卸载
- 如何从 Automation Suite 2022.10.10 和 2022.4.11 升级到 2023.10.2
- 如何手动将 ArgoCD 日志级别设置为 Info
- 如何扩展 AI Center 存储
- 如何为外部注册表生成已编码的 pull_secret_value
- 如何解决 TLS 1.2 中的弱密码问题
- 运行诊断工具
- 使用 Automation Suite 支持包工具
- 探索日志
Linux 版 Automation Suite 安装指南
Last updated 2024年10月4日
如何卸载集群
如果您遇到特定于集群上运行的 Kubernetes 的问题,可以直接卸载 rke2 集群。
-
根据您的安装配置文件,运行以下命令之一:
1.1. 在在线设置中,在集群的每个节点上以提升的特权(即sudo
)运行以下脚本。 这将卸载节点。function remove_rke2_entry_from_exclude() { local current_exclude_list new_exclude_list YUM_CONF_FILE=$1 if [[ ! -s "${YUM_CONF_FILE}" ]]; then # File is empty return fi current_exclude_list=$(grep 'exclude=' "${YUM_CONF_FILE}" | tail -1) if echo "$current_exclude_list" | grep -q 'rke2-*'; then if [[ -w ${YUM_CONF_FILE} ]]; then new_exclude_list=$(printf '%s\n' "${current_exclude_list//rke2-* /}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-*,/}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-\*/}") sed -i "/exclude=.*rke2-\*/d" "${YUM_CONF_FILE}" echo "${new_exclude_list}" >> "${YUM_CONF_FILE}" else error "${YUM_CONF_FILE} file is readonly and contains rke2-* under package exclusion. Please remove the entry for AS to work." fi fi } function enable_rke2_package_upgrade() { remove_rke2_entry_from_exclude /etc/dnf/dnf.conf remove_rke2_entry_from_exclude /etc/yum.conf } enable_rke2_package_upgrade service_exists() { local n=$1 if [[ $(systemctl list-units --all -t service --full --no-legend "$n.service" | cut -f1 -d' ') == $n.service ]]; then return 0 else return 1 fi } if service_exists rke2-server; then systemctl stop rke2-server systemctl disable rke2-server fi if service_exists rke2-agent; then systemctl stop rke2-agent systemctl disable rke2-agent fi if [ -e /usr/bin/rke2-killall.sh ] then echo "Running rke2-killall.sh" /usr/bin/rke2-killall.sh > /dev/null else echo "File not found: rke2-killall.sh" fi if [ -e /usr/bin/rke2-uninstall.sh ] then echo "Running rke2-uninstall.sh" /usr/bin/rke2-uninstall.sh > /dev/null else echo "File not found: rke2-uninstall.sh" fi crontab -l > backupcron sed -i '/backupjob/d' backupcron > /dev/null crontab backupcron > /dev/null rm -rf backupcron > /dev/null rm -rfv /usr/bin/backupjob > /dev/null rm -rfv /etc/rancher/ > /dev/null rm -rfv /var/lib/rook/ > /dev/null rm -rfv /var/lib/longhorn/ > /dev/null rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null umount -l -f /var/lib/rancher/rke2/server/db > /dev/null 2>&1 || true rm -rfv /var/lib/rancher/* > /dev/null umount -l -f /var/lib/rancher rm -rfv /var/lib/rancher/* > /dev/null while ! rm -rfv /var/lib/kubelet/* > /dev/null; do findmnt --list --submounts -n -o TARGET --target /var/lib/kubelet | grep '/var/lib/kubelet/plugins' | xargs -r umount -f -l sleep 5 done umount -l -f /var/lib/kubelet rm -rfv /var/lib/kubelet/* > /dev/null rm -rfv /datadisk/* > /dev/null umount -l -f /datadisk rm -rfv /datadisk/* > /dev/null rm -rfv ~/.uipath/* > /dev/null rm -rfv /etc/sysconfig/rke2-server > /dev/null rm -rfv /etc/sysconfig/rke2-agent > /dev/null mount /var/lib/rancher mkdir -p /var/lib/rancher/rke2/server/db/ && mount -a rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null echo "Uninstall RKE complete."
function remove_rke2_entry_from_exclude() { local current_exclude_list new_exclude_list YUM_CONF_FILE=$1 if [[ ! -s "${YUM_CONF_FILE}" ]]; then # File is empty return fi current_exclude_list=$(grep 'exclude=' "${YUM_CONF_FILE}" | tail -1) if echo "$current_exclude_list" | grep -q 'rke2-*'; then if [[ -w ${YUM_CONF_FILE} ]]; then new_exclude_list=$(printf '%s\n' "${current_exclude_list//rke2-* /}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-*,/}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-\*/}") sed -i "/exclude=.*rke2-\*/d" "${YUM_CONF_FILE}" echo "${new_exclude_list}" >> "${YUM_CONF_FILE}" else error "${YUM_CONF_FILE} file is readonly and contains rke2-* under package exclusion. Please remove the entry for AS to work." fi fi } function enable_rke2_package_upgrade() { remove_rke2_entry_from_exclude /etc/dnf/dnf.conf remove_rke2_entry_from_exclude /etc/yum.conf } enable_rke2_package_upgrade service_exists() { local n=$1 if [[ $(systemctl list-units --all -t service --full --no-legend "$n.service" | cut -f1 -d' ') == $n.service ]]; then return 0 else return 1 fi } if service_exists rke2-server; then systemctl stop rke2-server systemctl disable rke2-server fi if service_exists rke2-agent; then systemctl stop rke2-agent systemctl disable rke2-agent fi if [ -e /usr/bin/rke2-killall.sh ] then echo "Running rke2-killall.sh" /usr/bin/rke2-killall.sh > /dev/null else echo "File not found: rke2-killall.sh" fi if [ -e /usr/bin/rke2-uninstall.sh ] then echo "Running rke2-uninstall.sh" /usr/bin/rke2-uninstall.sh > /dev/null else echo "File not found: rke2-uninstall.sh" fi crontab -l > backupcron sed -i '/backupjob/d' backupcron > /dev/null crontab backupcron > /dev/null rm -rf backupcron > /dev/null rm -rfv /usr/bin/backupjob > /dev/null rm -rfv /etc/rancher/ > /dev/null rm -rfv /var/lib/rook/ > /dev/null rm -rfv /var/lib/longhorn/ > /dev/null rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null umount -l -f /var/lib/rancher/rke2/server/db > /dev/null 2>&1 || true rm -rfv /var/lib/rancher/* > /dev/null umount -l -f /var/lib/rancher rm -rfv /var/lib/rancher/* > /dev/null while ! rm -rfv /var/lib/kubelet/* > /dev/null; do findmnt --list --submounts -n -o TARGET --target /var/lib/kubelet | grep '/var/lib/kubelet/plugins' | xargs -r umount -f -l sleep 5 done umount -l -f /var/lib/kubelet rm -rfv /var/lib/kubelet/* > /dev/null rm -rfv /datadisk/* > /dev/null umount -l -f /datadisk rm -rfv /datadisk/* > /dev/null rm -rfv ~/.uipath/* > /dev/null rm -rfv /etc/sysconfig/rke2-server > /dev/null rm -rfv /etc/sysconfig/rke2-agent > /dev/null mount /var/lib/rancher mkdir -p /var/lib/rancher/rke2/server/db/ && mount -a rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null echo "Uninstall RKE complete."1.2 在离线设置中,在集群的每个节点上以提升的特权(即sudo
)运行以下脚本。 这将卸载节点。function remove_rke2_entry_from_exclude() { local current_exclude_list new_exclude_list YUM_CONF_FILE=$1 if [[ ! -s "${YUM_CONF_FILE}" ]]; then # File is empty return fi current_exclude_list=$(grep 'exclude=' "${YUM_CONF_FILE}" | tail -1) if echo "$current_exclude_list" | grep -q 'rke2-*'; then if [[ -w ${YUM_CONF_FILE} ]]; then new_exclude_list=$(printf '%s\n' "${current_exclude_list//rke2-* /}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-*,/}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-\*/}") sed -i "/exclude=.*rke2-\*/d" "${YUM_CONF_FILE}" echo "${new_exclude_list}" >> "${YUM_CONF_FILE}" else error "${YUM_CONF_FILE} file is readonly and contains rke2-* under package exclusion. Please remove the entry for AS to work." fi fi } function enable_rke2_package_upgrade() { remove_rke2_entry_from_exclude /etc/dnf/dnf.conf remove_rke2_entry_from_exclude /etc/yum.conf } enable_rke2_package_upgrade service_exists() { local n=$1 if [[ $(systemctl list-units --all -t service --full --no-legend "$n.service" | cut -f1 -d' ') == $n.service ]]; then return 0 else return 1 fi } if service_exists rke2-server; then systemctl stop rke2-server systemctl disable rke2-server fi if service_exists rke2-agent; then systemctl stop rke2-agent systemctl disable rke2-agent fi if [ -e /usr/local/bin/rke2-killall.sh ] then echo "Running rke2-killall.sh" /usr/local/bin/rke2-killall.sh > /dev/null else echo "File not found: rke2-killall.sh" fi if [ -e /usr/local/bin/rke2-uninstall.sh ] then echo "Running rke2-uninstall.sh" /usr/local/bin/rke2-uninstall.sh > /dev/null else echo "File not found: rke2-uninstall.sh" fi crontab -l > backupcron sed -i '/backupjob/d' backupcron > /dev/null crontab backupcron > /dev/null rm -rf backupcron > /dev/null rm -rfv /usr/bin/backupjob > /dev/null rm -rfv /etc/rancher/ > /dev/null rm -rfv /var/lib/rook/ > /dev/null rm -rfv /var/lib/longhorn/ > /dev/null rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null umount -l -f /var/lib/rancher/rke2/server/db > /dev/null 2>&1 || true rm -rfv /var/lib/rancher/* > /dev/null umount -l -f /var/lib/rancher rm -rfv /var/lib/rancher/* > /dev/null while ! rm -rfv /var/lib/kubelet/* > /dev/null; do findmnt --list --submounts -n -o TARGET --target /var/lib/kubelet | grep '/var/lib/kubelet/plugins' | xargs -r umount -f -l sleep 5 done umount -l -f /var/lib/kubelet rm -rfv /var/lib/kubelet/* > /dev/null rm -rfv /datadisk/* > /dev/null umount -l -f /datadisk rm -rfv /datadisk/* > /dev/null rm -rfv ~/.uipath/* > /dev/null rm -rfv /etc/sysconfig/rke2-server > /dev/null rm -rfv /etc/sysconfig/rke2-agent > /dev/null mount /var/lib/rancher mkdir -p /var/lib/rancher/rke2/server/db/ && mount -a rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null echo "Uninstall RKE complete."
function remove_rke2_entry_from_exclude() { local current_exclude_list new_exclude_list YUM_CONF_FILE=$1 if [[ ! -s "${YUM_CONF_FILE}" ]]; then # File is empty return fi current_exclude_list=$(grep 'exclude=' "${YUM_CONF_FILE}" | tail -1) if echo "$current_exclude_list" | grep -q 'rke2-*'; then if [[ -w ${YUM_CONF_FILE} ]]; then new_exclude_list=$(printf '%s\n' "${current_exclude_list//rke2-* /}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-*,/}") new_exclude_list=$(printf '%s\n' "${new_exclude_list//rke2-\*/}") sed -i "/exclude=.*rke2-\*/d" "${YUM_CONF_FILE}" echo "${new_exclude_list}" >> "${YUM_CONF_FILE}" else error "${YUM_CONF_FILE} file is readonly and contains rke2-* under package exclusion. Please remove the entry for AS to work." fi fi } function enable_rke2_package_upgrade() { remove_rke2_entry_from_exclude /etc/dnf/dnf.conf remove_rke2_entry_from_exclude /etc/yum.conf } enable_rke2_package_upgrade service_exists() { local n=$1 if [[ $(systemctl list-units --all -t service --full --no-legend "$n.service" | cut -f1 -d' ') == $n.service ]]; then return 0 else return 1 fi } if service_exists rke2-server; then systemctl stop rke2-server systemctl disable rke2-server fi if service_exists rke2-agent; then systemctl stop rke2-agent systemctl disable rke2-agent fi if [ -e /usr/local/bin/rke2-killall.sh ] then echo "Running rke2-killall.sh" /usr/local/bin/rke2-killall.sh > /dev/null else echo "File not found: rke2-killall.sh" fi if [ -e /usr/local/bin/rke2-uninstall.sh ] then echo "Running rke2-uninstall.sh" /usr/local/bin/rke2-uninstall.sh > /dev/null else echo "File not found: rke2-uninstall.sh" fi crontab -l > backupcron sed -i '/backupjob/d' backupcron > /dev/null crontab backupcron > /dev/null rm -rf backupcron > /dev/null rm -rfv /usr/bin/backupjob > /dev/null rm -rfv /etc/rancher/ > /dev/null rm -rfv /var/lib/rook/ > /dev/null rm -rfv /var/lib/longhorn/ > /dev/null rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null umount -l -f /var/lib/rancher/rke2/server/db > /dev/null 2>&1 || true rm -rfv /var/lib/rancher/* > /dev/null umount -l -f /var/lib/rancher rm -rfv /var/lib/rancher/* > /dev/null while ! rm -rfv /var/lib/kubelet/* > /dev/null; do findmnt --list --submounts -n -o TARGET --target /var/lib/kubelet | grep '/var/lib/kubelet/plugins' | xargs -r umount -f -l sleep 5 done umount -l -f /var/lib/kubelet rm -rfv /var/lib/kubelet/* > /dev/null rm -rfv /datadisk/* > /dev/null umount -l -f /datadisk rm -rfv /datadisk/* > /dev/null rm -rfv ~/.uipath/* > /dev/null rm -rfv /etc/sysconfig/rke2-server > /dev/null rm -rfv /etc/sysconfig/rke2-agent > /dev/null mount /var/lib/rancher mkdir -p /var/lib/rancher/rke2/server/db/ && mount -a rm -rfv /var/lib/rancher/rke2/server/db/* > /dev/null echo "Uninstall RKE complete." -
清理 OSD 磁盘:
for osddisk in $(find /dev/uipath/ceph -maxdepth 1 -mindepth 1 -type l); do devName=$(basename "${osddisk}") devPath="/dev/${devName}" sgdisk --zap-all "${devPath}" dd if=/dev/zero of="${devPath}" bs=1M count=100 oflag=direct,dsync blkdiscard "${devPath}" done ls /dev/mapper/ceph-* | xargs -I% -- dmsetup remove % rm -rf /dev/ceph-* rm -rf /etc/udev/rules.d/99-ceph-raw-osd.rules
for osddisk in $(find /dev/uipath/ceph -maxdepth 1 -mindepth 1 -type l); do devName=$(basename "${osddisk}") devPath="/dev/${devName}" sgdisk --zap-all "${devPath}" dd if=/dev/zero of="${devPath}" bs=1M count=100 oflag=direct,dsync blkdiscard "${devPath}" done ls /dev/mapper/ceph-* | xargs -I% -- dmsetup remove % rm -rf /dev/ceph-* rm -rf /etc/udev/rules.d/99-ceph-raw-osd.rules3,卸载后重新启动节点。
重要提示: 从集群中卸载某个节点时,您必须运行以下命令:kubectl delete node <node_name>
。 这将从集群中删除节点。