随笔 - 27  文章 - 2  评论 - 0  阅读 - 25912

saltstack 一:安装之快速安装 bootstap script

salt bootstrap script 支持用户在各种系统中安装 master 和 minion,shell 脚本名称是 bootstrap-salt.sh,脚本里会有一系统的检查操作来确定操作系统的版本和类型,然后先把适当的方法安装 salt 二进制文件。bootstrap script 会安装最小数量的salt 依赖包,也就是尽可能的轻量化安装。它会在系统上存在了 salt 二进制文件后安装其他依赖的包。脚本地址  https://github.com/saltstack/salt-bootstrap

脚本安装支持大部分的 linux 发行版环境

使用 curl 通过 github 安装最新版本:

curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
sudo sh bootstrap-salt.sh git develop

安装指定版本:

curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
sudo sh bootstrap-salt.sh git v2015.8.8

安装 master:

curl -o bootstrap-salt.sh -L https://bootstrap.saltstack.com
sudo sh bootstrap-salt.sh -M -N git develop

 

使用 wget 安装:

wget -O bootstrap-salt.sh https://bootstrap.saltstack.com
sudo sh bootstrap-salt.sh

使用一行命令安装: 

curl -L https://bootstrap.saltstack.com | sudo sh

wget -O - https://bootstrap.saltstack.com | sudo sh

 

脚本安装命令选项:

$ sh bootstrap-salt.sh -h

  Usage :  bootstrap-salt.sh [options] <install-type> <install-type-args>

  Installation types:
    - stable (default)
    - stable [version] (ubuntu specific)
    - daily  (ubuntu specific)
    - testing (redhat specific)
    - git

  Examples:
    - bootstrap-salt.sh
    - bootstrap-salt.sh stable
    - bootstrap-salt.sh stable 2014.7
    - bootstrap-salt.sh daily
    - bootstrap-salt.sh testing
    - bootstrap-salt.sh git
    - bootstrap-salt.sh git develop
    - bootstrap-salt.sh git v0.17.0
    - bootstrap-salt.sh git 8c3fadf15ec183e5ce8c63739850d543617e4357

  Options:
  -h  Display this message # 显示帮助
  -v  Display script version # 显示脚本版本
  -n  No colours. 
  -D  Show debug output. # 显示debug输出
  -c  Temporary configuration directory
  -g  Salt repository URL. (default: git://github.com/saltstack/salt.git) # 指定salt repo 地址
  -G  Instead of cloning from git://github.com/saltstack/salt.git, clone from https://github.com/saltstack/salt.git (Usually necessary on systems which have the regular git protocol port blocked, where https usually is not)
  -k  Temporary directory holding the minion keys which will pre-seed
      the master.
  -s  Sleep time used when waiting for daemons to start, restart and when checking
      for the services running. Default: 3
  -M  Also install salt-master # 总是安装 master
  -S  Also install salt-syndic 
  -N  Do not install salt-minion # 总是安装 minion
  -X  Do not start daemons after installation
  -C  Only run the configuration function. This option automatically
      bypasses any installation.
  -P  Allow pip based installations. On some distributions the required salt
      packages or its dependencies are not available as a package for that
      distribution. Using this flag allows the script to use pip as a last
      resort method. NOTE: This only works for functions which actually
      implement pip based installations.
  -F  Allow copied files to overwrite existing(config, init.d, etc)
  -U  If set, fully upgrade the system prior to bootstrapping salt
  -K  If set, keep the temporary files in the temporary directories specified
      with -c and -k.
  -I  If set, allow insecure connections while downloading any files. For
      example, pass '--no-check-certificate' to 'wget' or '--insecure' to 'curl'
  -A  Pass the salt-master DNS name or IP. This will be stored under
      ${BS_SALT_ETC_DIR}/minion.d/99-master-address.conf
  -i  Pass the salt-minion id. This will be stored under
      ${BS_SALT_ETC_DIR}/minion_id
  -L  Install the Apache Libcloud package if possible(required for salt-cloud)
  -p  Extra-package to install while installing salt dependencies. One package
      per -p flag. You're responsible for providing the proper package name.
  -d  Disable check_service functions. Setting this flag disables the
      'install_<distro>_check_services' checks. You can also do this by
      touching /tmp/disable_salt_checks on the target host. Defaults ${BS_FALSE}
  -H  Use the specified http proxy for the installation
  -Z  Enable external software source for newer ZeroMQ(Only available for RHEL/CentOS/Fedora/Ubuntu based distributions)
  -b  Assume that dependencies are already installed and software sources are set up.
      If git is selected, git tree is still checked out as dependency step.

posted on   杜景喜  阅读(462)  评论(0编辑  收藏  举报
编辑推荐:
· 基于Microsoft.Extensions.AI核心库实现RAG应用
· Linux系列:如何用heaptrack跟踪.NET程序的非托管内存泄露
· 开发者必知的日志记录最佳实践
· SQL Server 2025 AI相关能力初探
· Linux系列:如何用 C#调用 C方法造成内存泄露
阅读排行:
· 无需6万激活码!GitHub神秘组织3小时极速复刻Manus,手把手教你使用OpenManus搭建本
· Manus爆火,是硬核还是营销?
· 终于写完轮子一部分:tcp代理 了,记录一下
· 别再用vector<bool>了!Google高级工程师:这可能是STL最大的设计失误
· 单元测试从入门到精通
< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

点击右上角即可分享
微信分享提示