saltstack-grains
用来匹配minion的grains,是指那些关于minion主机的静态信息,比如OS,软件版本,虚拟化,CPU,内存等等。
查看grains
1 | salt ‘*’ grains.items #打印grains |
在minion 中配置grains
/etc/salt/grains 自定义 grains
/etc/salt/minion 自定义 grains
1 | grains: |
用来匹配minion的grains,是指那些关于minion主机的静态信息,比如OS,软件版本,虚拟化,CPU,内存等等。
1 | salt ‘*’ grains.items #打印grains |
/etc/salt/grains 自定义 grains
/etc/salt/minion 自定义 grains
1 | grains: |
创建 modules 目录
1 | mkdir /srv/salt/_modules && cd /srv/salt/_modules |
在 _modules 目录创建一个模块 test.py
1 | def foo(): |
Ubuntu下最新版本的包发布在saltstack PPA。如果你有 add-apt-repository 工具,你可以一键添加软件源仓库并导入PPA的key。
1 | sudo add-apt-repository ppa:saltstack/salt |
如果提示以下错误
1 | add-apt-repository: command not found? |
需要安装下面两个东西
1 | sudo apt-get install python-software-properties |
1 | # Install the database packages |
1 | $ http_proxy=http://IP:PORT https_proxy=http://IP:PORT brew install PACKAGE |
1 | $ ALL_PROXY=socks5://IP:PORT brew nstall PACKAGE |
1 |
|
1 | yum -y install gcc automake autoconf libtool make |
Tesseract开源的OCR引擎,使用 Apache 2.0 license授权协议,可以直接使用或者使用API开发.并且支持多语言.
在solr使用dataImport时,在测试机上由于内存太小,创建索引时不成功.
###开启batchSize
在data-config.xml文件的dataSource中加入batchSize=”-1”的配置.参考http://wiki.apache.org/solr/DataImportHandlerFaq