automation-suite
2.2510
true
Linux 版 Automation Suite 安装指南
- 概述
- 要求
- 部署模板
- 手动:准备安装
- 手动:准备安装
- 步骤 2:为离线安装配置符合 OCI 的注册表
- 步骤 3:配置外部对象存储
- 步骤 4:配置 High Availability Add-on
- 步骤 5:配置 SQL 数据库
- 步骤 7:配置 DNS
- 步骤 8:配置磁盘
- 步骤 9:配置内核和操作系统级别设置
- 步骤 10:配置节点端口
- 步骤 11:应用其他设置
- 步骤 12:验证并安装所需的 RPM 包
- 步骤 13:生成 cluster_config.json
- Cluster_config.json 示例
- 常规配置
- 配置文件配置
- 证书配置
- 数据库配置
- 外部对象存储配置
- 预签名 URL 配置
- ArgoCD 配置
- Kerberos 身份验证配置
- 符合 OCI 的外部注册表配置
- Disaster Recovery:主动/被动和主动/主动配置
- High Availability Add-on 配置
- 特定于 Orchestrator 的配置
- Insights 特定配置
- Process Mining 特定配置
- Document Understanding 特定配置
- Automation Suite Robot 特定配置
- 监控配置
- 可选:配置代理服务器
- 可选:在多节点 HA 就绪生产集群中启用区域故障恢复
- 可选:传递自定义 resolv.conf
- 可选:提高容错能力
- 添加具有 GPU 支持的专用代理节点
- 为 Automation Suite Robot 添加专用代理节点
- 步骤 15:为离线安装配置临时 Docker 注册表
- 步骤 16:验证安装的先决条件
- 正在运行 uipathctl
- 手动:执行安装
- 安装后
- 集群管理
- 监控和警示
- 迁移和升级
- 特定于产品的配置
- 最佳实践和维护
- 故障排除
- 如何在安装过程中对服务进行故障排除
- 如何减少 NFS 备份目录的权限
- 如何卸载集群
- 如何清理离线工件以改善磁盘空间
- 如何清除 Redis 数据
- 如何启用 Istio 日志记录
- 如何手动清理日志
- 将 Ceph 退出只读模式
- 如何清理存储在 sf-logs 存储桶中的旧日志
- 如何禁用 AI Center 的流日志
- 如何对失败的 Automation Suite 安装进行调试
- 如何在升级后从旧安装程序中删除映像
- 如何禁用 TX 校验和卸载
- 如何手动将 ArgoCD 日志级别设置为 Info
- 如何扩展 AI Center 存储
- 如何为外部注册表生成已编码的 pull_secret_value
- 如何解决 TLS 1.2 中的弱密码问题
- 如何查看 TLS 版本
- 如何使用证书
- 如何计划 Ceph 备份和还原数据
- 如何使用集群内对象存储 (Ceph) 收集 DU 使用情况数据
- 如何在离线环境中安装 RKE2 SELinux
- 如何清理 NFS 服务器上的旧差异备份
- 如何在已启用 FIPS 的集群中部署 Insights
- 如何迁移到 cgroup v2
- 如何在虚拟机重新启动后恢复 Kerberos 身份验证
- 如何将本地 Docker 映像推送到集群内注册表
- 如何从备份中排除存储桶
- 无法获取沙盒映像
- Pod 未显示在 ArgoCD 用户界面中
- Redis 探测器失败
- RKE2 服务器无法启动
- ArgoCD 在首次安装后进入“进行中”状态
- 处于 CrashLoopBackOff 状态的 ArgoCD 存储库服务器 Pod
- 手动 ArgoCD 网络策略缓解措施 (MHSA-47m3-95c7-g2g8)
- 监控仪表板中缺少 Ceph-rook 指标
- 诊断性运行状况检查期间报告的错误不匹配
- 为 uipathctl 创建的工作负载配置资源请求和限制
- 无正常的上游问题
- 杀毒软件阻止了 Redis 启动
- 无法在启用 TLS 证书验证的情况下启动 AI Center 和 Document Understanding Pod
- Fluentd 不会在 IPv6 环境中导出日志
- Studio 桌面版无法加载 Integration Service 连接器和活动
- 使用 Process Mining 运行高可用性
- 使用 Kerberos 登录时 Process Mining 挖掘失败
- 无法使用 pyodbc 格式连接字符串连接到 AutomationSuite_ProcessMining_Warehouse 数据库
- Airflow 安装失败,并显示 sqlalchemy.exc.ArgumentError:无法从字符串“”中解析 rfc1738 URL
- 如何添加 IP 表格规则以使用 SQL Server 端口 1433
- 运行 CData Sync 的服务器不信任 Automation Suite 证书
- Process Mining fails to load after disabling and re-enabling it
- 运行诊断工具
- 使用 Automation Suite 支持捆绑包
- 探索日志
重要 :
请注意,此内容已使用机器翻译进行了部分本地化。
新发布内容的本地化可能需要 1-2 周的时间才能完成。
针对 Automation Suite 中未经身份验证的网络访问 ArgoCD 存储库服务器和 Redis 的解决方案,借助手动网络策略缓解程序。
描述
ArgoCD 最近发布了一个影响 ArgoCD repo-server组件的漏洞,并且 ArgoCD 目前未修复该漏洞。
可以从集群网络中的任何 Pod 访问 ArgoCD repo-server (端口 8081)和 ArgoCD Redis,因为默认情况下没有网络策略限制进入这些组件。因此,集群网络中的任何 Pod 都可以直接连接到它们,因为 ArgoCD 不需要对这些内部组件进行身份验证。有关详细信息,请参阅MHSA-47m3-95c7-g2g8 。
为缓解此问题,您必须手动应用本页“解决方案”部分中所述的网络策略。
先决条件
- 从对集群具有
kubectl访问权限的主机运行此过程。 - 该过程采用默认的 Automation Suite
argocd命名空间。如果 ArgoCD 使用不同的命名空间,请在运行脚本之前设置ARGOCD_NS。 - 此缓解措施依赖于 Kubernetes 网络策略强制执行。Automation Suite 支持的集群使用兼容的 CNI(容器网络接口)配置。
解决方案
-
运行以下脚本。它会检测您的 ArgoCD 版本和 Redis 模式(独立或高可用性,HA),并自动应用匹配的网络策略:
export ARGOCD_NS="${ARGOCD_NS:-argocd}" export ARGOCD_RELEASE="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.labels.app\.kubernetes\.io/instance}')" test -n "$ARGOCD_RELEASE" || { echo "Cannot detect Argo CD Helm release"; exit 1; } if kubectl -n "$ARGOCD_NS" get pod -l "release=${ARGOCD_RELEASE},app=redis-ha-haproxy,component=haproxy" --no-headers 2>/dev/null | grep -q .; then REDIS_MODE=ha else REDIS_MODE=standalone fi echo "Argo CD namespace: $ARGOCD_NS" echo "Argo CD release: $ARGOCD_RELEASE" echo "Redis mode: $REDIS_MODE" cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-repo-server-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: app.kubernetes.io/name: argocd-repo-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: argocd-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-application-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-applicationset-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-notifications-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} ports: - protocol: TCP port: 8081 - from: - namespaceSelector: {} ports: - protocol: TCP port: 8084 EOF if [ "$REDIS_MODE" = "ha" ]; then cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-redis-ha-server-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha - podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha-haproxy component: haproxy ports: - protocol: TCP port: 6379 - protocol: TCP port: 26379 --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-redis-ha-haproxy-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha-haproxy component: haproxy app.kubernetes.io/name: argocd-redis-ha-haproxy policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: argocd-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-repo-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-application-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} ports: - protocol: TCP port: 6379 EOF else cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-redis-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: app.kubernetes.io/name: argocd-redis app.kubernetes.io/instance: ${ARGOCD_RELEASE} policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: argocd-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-repo-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-application-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} ports: - protocol: TCP port: 6379 - from: - namespaceSelector: {} ports: - protocol: TCP port: 9121 EOF fiexport ARGOCD_NS="${ARGOCD_NS:-argocd}" export ARGOCD_RELEASE="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.labels.app\.kubernetes\.io/instance}')" test -n "$ARGOCD_RELEASE" || { echo "Cannot detect Argo CD Helm release"; exit 1; } if kubectl -n "$ARGOCD_NS" get pod -l "release=${ARGOCD_RELEASE},app=redis-ha-haproxy,component=haproxy" --no-headers 2>/dev/null | grep -q .; then REDIS_MODE=ha else REDIS_MODE=standalone fi echo "Argo CD namespace: $ARGOCD_NS" echo "Argo CD release: $ARGOCD_RELEASE" echo "Redis mode: $REDIS_MODE" cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-repo-server-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: app.kubernetes.io/name: argocd-repo-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: argocd-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-application-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-applicationset-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-notifications-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} ports: - protocol: TCP port: 8081 - from: - namespaceSelector: {} ports: - protocol: TCP port: 8084 EOF if [ "$REDIS_MODE" = "ha" ]; then cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-redis-ha-server-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha - podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha-haproxy component: haproxy ports: - protocol: TCP port: 6379 - protocol: TCP port: 26379 --- apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-redis-ha-haproxy-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: release: ${ARGOCD_RELEASE} app: redis-ha-haproxy component: haproxy app.kubernetes.io/name: argocd-redis-ha-haproxy policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: argocd-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-repo-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-application-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} ports: - protocol: TCP port: 6379 EOF else cat <<EOF | kubectl apply -f - apiVersion: networking.k8s.io/v1 kind: NetworkPolicy metadata: name: argocd-redis-manual-mitigation namespace: ${ARGOCD_NS} spec: podSelector: matchLabels: app.kubernetes.io/name: argocd-redis app.kubernetes.io/instance: ${ARGOCD_RELEASE} policyTypes: - Ingress ingress: - from: - podSelector: matchLabels: app.kubernetes.io/name: argocd-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-repo-server app.kubernetes.io/instance: ${ARGOCD_RELEASE} - podSelector: matchLabels: app.kubernetes.io/name: argocd-application-controller app.kubernetes.io/instance: ${ARGOCD_RELEASE} ports: - protocol: TCP port: 6379 - from: - namespaceSelector: {} ports: - protocol: TCP port: 9121 EOF fi
验证
运行以下命令以确认已成功应用缓解措施:
kubectl -n "$ARGOCD_NS" get networkpolicy
kubectl -n "$ARGOCD_NS" get pods
kubectl get applications.argoproj.io -A
kubectl -n "$ARGOCD_NS" get networkpolicy
kubectl -n "$ARGOCD_NS" get pods
kubectl get applications.argoproj.io -A
确认以下内容:
argocd-repo-server-manual-mitigation存在。- 对于 Redis HA,存在
argocd-redis-ha-server-manual-mitigation和argocd-redis-ha-haproxy-manual-mitigation。 - 对于独立 Redis,存在
argocd-redis-manual-mitigation。 - ArgoCD Pod 为
Running或Completed。 - ArgoCD 应用程序仍然是
Synced和Healthy。
确认缓解措施
在应用策略后运行这些检查。它们会验证所需的 ArgoCD 流量是否仍有效,并且不允许的流量是否已被阻止。
-
运行以下脚本:
export ARGOCD_NS="${ARGOCD_NS:-argocd}" export ARGOCD_RELEASE="${ARGOCD_RELEASE:-$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.labels.app\.kubernetes\.io/instance}')}" if kubectl -n "$ARGOCD_NS" get pod -l "release=${ARGOCD_RELEASE},app=redis-ha-haproxy,component=haproxy" --no-headers 2>/dev/null | grep -q .; then REDIS_MODE=ha else REDIS_MODE=standalone fi SERVER_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.name}')" APPSET_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-applicationset-controller -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true)" FAILED_CHECKS="" tcp_check() { pod="$1" host="$2" port="$3" expected="$4" name="$5" code="$(kubectl -n "$ARGOCD_NS" exec "$pod" -- sh -c ' host="$1" port="$2" if command -v nc >/dev/null 2>&1; then timeout 5 nc -z -w 3 "$host" "$port" >/dev/null 2>&1 printf "%s\n" "$?" elif command -v bash >/dev/null 2>&1; then timeout 5 bash -c "</dev/tcp/${host}/${port}" >/dev/null 2>&1 printf "%s\n" "$?" else printf "%s\n" "NO_TCP_TOOL" fi ' sh "$host" "$port" 2>/dev/null | tail -n 1)" if [ "$expected" = "allow" ] && [ "$code" = "0" ]; then return elif [ "$expected" = "deny" ] && [ "$code" != "0" ] && [ "$code" != "NO_TCP_TOOL" ] && [ -n "$code" ]; then return else FAILED_CHECKS="${FAILED_CHECKS} - ${name}: expected ${expected}, got exit code ${code}" fi } tcp_check "$SERVER_POD" argocd-repo-server 8081 allow "argocd-server to repo-server:8081" if [ "$REDIS_MODE" = "ha" ]; then HAPROXY_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app=redis-ha-haproxy,component=haproxy -o jsonpath='{.items[0].metadata.name}')" tcp_check "$SERVER_POD" argocd-redis-ha-haproxy 6379 allow "argocd-server to redis-ha-haproxy:6379" tcp_check "$HAPROXY_POD" argocd-redis-ha 6379 allow "redis-ha-haproxy to redis-ha:6379" tcp_check "$HAPROXY_POD" argocd-repo-server 8081 deny "redis-ha-haproxy to repo-server:8081" if [ -n "$APPSET_POD" ]; then tcp_check "$APPSET_POD" argocd-redis-ha-haproxy 6379 deny "applicationset-controller to redis-ha-haproxy:6379" fi else REDIS_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-redis -o jsonpath='{.items[0].metadata.name}')" tcp_check "$SERVER_POD" argocd-redis 6379 allow "argocd-server to redis:6379" tcp_check "$REDIS_POD" argocd-repo-server 8081 deny "redis to repo-server:8081" if [ -n "$APPSET_POD" ]; then tcp_check "$APPSET_POD" argocd-redis 6379 deny "applicationset-controller to redis:6379" fi fi if [ -z "$FAILED_CHECKS" ]; then echo "MITIGATION CHECK: PASS" else echo "MITIGATION CHECK: FAIL" echo "$FAILED_CHECKS" exit 1 fiexport ARGOCD_NS="${ARGOCD_NS:-argocd}" export ARGOCD_RELEASE="${ARGOCD_RELEASE:-$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.labels.app\.kubernetes\.io/instance}')}" if kubectl -n "$ARGOCD_NS" get pod -l "release=${ARGOCD_RELEASE},app=redis-ha-haproxy,component=haproxy" --no-headers 2>/dev/null | grep -q .; then REDIS_MODE=ha else REDIS_MODE=standalone fi SERVER_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-server -o jsonpath='{.items[0].metadata.name}')" APPSET_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-applicationset-controller -o jsonpath='{.items[0].metadata.name}' 2>/dev/null || true)" FAILED_CHECKS="" tcp_check() { pod="$1" host="$2" port="$3" expected="$4" name="$5" code="$(kubectl -n "$ARGOCD_NS" exec "$pod" -- sh -c ' host="$1" port="$2" if command -v nc >/dev/null 2>&1; then timeout 5 nc -z -w 3 "$host" "$port" >/dev/null 2>&1 printf "%s\n" "$?" elif command -v bash >/dev/null 2>&1; then timeout 5 bash -c "</dev/tcp/${host}/${port}" >/dev/null 2>&1 printf "%s\n" "$?" else printf "%s\n" "NO_TCP_TOOL" fi ' sh "$host" "$port" 2>/dev/null | tail -n 1)" if [ "$expected" = "allow" ] && [ "$code" = "0" ]; then return elif [ "$expected" = "deny" ] && [ "$code" != "0" ] && [ "$code" != "NO_TCP_TOOL" ] && [ -n "$code" ]; then return else FAILED_CHECKS="${FAILED_CHECKS} - ${name}: expected ${expected}, got exit code ${code}" fi } tcp_check "$SERVER_POD" argocd-repo-server 8081 allow "argocd-server to repo-server:8081" if [ "$REDIS_MODE" = "ha" ]; then HAPROXY_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app=redis-ha-haproxy,component=haproxy -o jsonpath='{.items[0].metadata.name}')" tcp_check "$SERVER_POD" argocd-redis-ha-haproxy 6379 allow "argocd-server to redis-ha-haproxy:6379" tcp_check "$HAPROXY_POD" argocd-redis-ha 6379 allow "redis-ha-haproxy to redis-ha:6379" tcp_check "$HAPROXY_POD" argocd-repo-server 8081 deny "redis-ha-haproxy to repo-server:8081" if [ -n "$APPSET_POD" ]; then tcp_check "$APPSET_POD" argocd-redis-ha-haproxy 6379 deny "applicationset-controller to redis-ha-haproxy:6379" fi else REDIS_POD="$(kubectl -n "$ARGOCD_NS" get pod -l app.kubernetes.io/name=argocd-redis -o jsonpath='{.items[0].metadata.name}')" tcp_check "$SERVER_POD" argocd-redis 6379 allow "argocd-server to redis:6379" tcp_check "$REDIS_POD" argocd-repo-server 8081 deny "redis to repo-server:8081" if [ -n "$APPSET_POD" ]; then tcp_check "$APPSET_POD" argocd-redis 6379 deny "applicationset-controller to redis:6379" fi fi if [ -z "$FAILED_CHECKS" ]; then echo "MITIGATION CHECK: PASS" else echo "MITIGATION CHECK: FAIL" echo "$FAILED_CHECKS" exit 1 fi预期结果:
MITIGATION CHECK: PASS
回滚
如果需要,请采取以下步骤删除缓解措施:
-
删除手动缓解策略:
kubectl -n "$ARGOCD_NS" delete networkpolicy \ argocd-repo-server-manual-mitigation \ argocd-redis-manual-mitigation \ argocd-redis-ha-server-manual-mitigation \ argocd-redis-ha-haproxy-manual-mitigation \ --ignore-not-foundkubectl -n "$ARGOCD_NS" delete networkpolicy \ argocd-repo-server-manual-mitigation \ argocd-redis-manual-mitigation \ argocd-redis-ha-server-manual-mitigation \ argocd-redis-ha-haproxy-manual-mitigation \ --ignore-not-found -
确认回滚已成功完成:
kubectl -n "$ARGOCD_NS" get networkpolicy kubectl -n "$ARGOCD_NS" get pods kubectl get applications.argoproj.io -Akubectl -n "$ARGOCD_NS" get networkpolicy kubectl -n "$ARGOCD_NS" get pods kubectl get applications.argoproj.io -A确认以下内容:
- 手动缓解策略将被删除。
- ArgoCD Pod 仍为
Running或Completed。 - ArgoCD 应用程序仍然是
Synced和Healthy。