Salt Document学习笔记2

配置文件需修改的内容及注意点:

Edit the master config file: 1. Uncomment and change the user: root value to your own user.

默认用户为root,可更改为自己的用户名

2. Uncomment and change the root_dir: / value to point to /path/to/your/virtualenv.

修改环境主路径

3. If you are running version 0.11.1 or older, uncomment and change the pidfile: /var/run/salt-master.pid value to point to /path/to/your/virtualenv/salt-master.pid.

在0.11.1及以前的版本需要把/var/run/salt-master.pid链接到自己的环境路径下的salt-master.pid.

Uncomment and change the id: value to something descriptive like “saltdev”. This isn’t strictly necessary but it will serve as a reminder of which Salt installation you are working with.

设置id的描述,虽然不是必要的但可以便于分清设备

确保你本地的salt安装正确且在运行的一系列操作

verify your local Salt installation is working: cd /path/to/your/virtualenv

salt-master  -c  ./etc/salt -d

salt-minion  -c  ./etc/salt -d

salt-key -c ./etc/salt -L

salt-key -c ./etc/salt -A

salt  -c  ./etc/salt ’*’ test.ping

其中-d为运行在debug模式

If you plan to run salt-call with this self-contained development environment in a masterless setup, you should invoke salt-call with -c /path/to/your/virtualenv/etc/salt so that salt can find the minion config file. Without the -c option, Salt finds its config files in /etc/salt.

如果运行在一个没有master的机器上,需要调用-c以便于设置自己的安装目录,没有-c就默认为/etc/salt

If you would like to log to the console instead of to the log file, remove the -d.

如果你想要把日志输出到控制台而不是log文件,把-d参数去除(安装时的日志输出,参看上文的安装时的命令)

The socket path is limited to 107 characters on Solaris and Linux, and 103 characters on BSD-based systems.

Solaris 和 Linux的 socket路径限制在107字符内,BSD系统限制在103个字符内

File descriptor limits Ensure that the system open file limit is raised to at least 2047:

# check your current limit :ulimit -n

系统可打开文件的数量是2047以上,如果你要查看当前最大可用数量,用命令ulimit -n,如果想提高打开文件的数量,用命令ulimit -n 2047或其他数字,重启后生效

上一篇:Java高并发 -- J.U.C.组件扩展


下一篇:Android Bitmap操作问题之Canvas: trying to use a recycled bitmap