[FEATURE REQUEST]: Support auto accept minion by grain

未关闭
#1,972 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
停滞
技术栈
shell
领域
devops

调研方向

从 bootstrap-salt.sh 开始,跟踪 -G 参数的解析方式以及 minion 配置文件的生成方式。将预期的 autosign-grain 设置与所引用的 autoaccept_grains 文档进行比较;当提供 -G 时配置了所请求的 grain 值,并且生成的 bootstrap 行为支持 master 端按 grain 进行 autosign 时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Description of Issue/Question

WHAT: This is a request for enhancement.
WHY: To automate trusted minions deployment via pre-shared key approach to avoid the need to login salt-master.

See R1: The minion client side steps in R1 is like followings, before bootstrap startup minion.

  1. Enable minion to send in "my_auto_sign_grain" grain.

cat <<-END >/etc/salt/minion.d/autosign_grains.conf
autosign_grains:
- my_auto_sign_grain
END

  1. Add a file under minion.d to specify custom grain for autosign
    cat <<-END >/etc/salt/minion.d/grains.conf
    grains:
    my_auto_sign_grain: my-secret-key-for-auto-sign
    END

R1: https://docs.saltproject.io/en/latest/topics/tutorials/autoaccept_grains.html

Setup

(Please provide relevant configs (Be sure to remove sensitive info).)

Steps to Reproduce Issue

Following addon -G argument on minion should works when master side have autosign by grain enabled.

bootstrap-salt.sh -G my-secret-key-for-auto-sign

Versions and Systems

(salt --versions-report, bootstrap-salt.sh -v, system type and version,
cloud/VM provider as appropriate.)

主要语言
Shell
星标
953
派生
541
平均合并
2 天 19 小时
30 天内合并 PR
3

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

saltstack/salt-bootstrap 的其他 Issue

查看 saltstack/salt-bootstrap 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。