安装Func/Certmaster

简介: Func 有一个长长的功能特性列表,大致要点如下:• Func 可以让你在主控机上一次管理任意多台服务器,或任意多个服务器组。

Func 有一个长长的功能特性列表,大致要点如下:

• Func 可以让你在主控机上一次管理任意多台服务器,或任意多个服务器组。
• Func 基于 Certmaster(https://fedorahosted.org/certmaster/)建立了 Master – Slaves 主从 SSL 证书管控体系,可以将证书自动分发到所有受控服务器。新装服务器也可以在 Kickstart 文件中自动安装 Func,自动注册到主控服务器。
• Func 命令行可以直接发送远程命令或者远程获取数据。
• Func 开发者已经完成了大多数常用任务模块的开发:CommandModule、FileTrackerModule、JBossModule、 IPtablesModule、HardwareModule、MountModule、NagiosCheck、NetappModule、 NetworkTest、ProcessModule、ServiceModule、SysctlModule、RebootModule、 RpmModule、VirtModule、YumModule 等等,这些模块的作用都可以顾名思义,或者参考: https://fedorahosted.org/func/wiki/ModulesList 。
• 任何人都可以通过 Func 提供的 Python API 轻松编写自己的模块,以实现具体功能扩展。而且任何 Func 命令行能完成的工作,都能通过 API 编程实现。
• Func 通讯基于 XMLRPC 和 SSL 标准协议。
master:

1 wget http://people.fedoraproject.org/~alikins/files/certmaster/certmaster-0.25.tar.gz
2 wget http://people.fedoraproject.org/~alikins/files/func/func-0.25.tar.gz
01 tar -zxvf pyOpenSSL-0.9.tar.gz
02 cd pyOpenSSL-0.9
03 python setup.py install 
04   
05 tar -zxvf certmaster-0.25.tar.gz
06 cd certmaster-0.25
07 python setup.py install
08   
09 tar -zxvf func-0.25.tar.gz
10 cd func-0.25
11 python setup.py install

master上默认配置就可以

01 [root@master ~]# cat /etc/certmaster/certmaster.conf
02 # configuration for certmasterd and certmaster-ca
03   
04 [main]
05 autosign = no
06 listen_addr =
07 listen_port = 51235
08 cadir = /etc/pki/certmaster/ca
09 cert_dir = /etc/pki/certmaster
10 certroot = /var/lib/certmaster/certmaster/certs
11 csrroot = /var/lib/certmaster/certmaster/csrs
12 cert_extension = cert
13 sync_certs = False
14   
15 [root@master ~]# cat /etc/certmaster/minion.conf
16 # configuration for minions
17   
18 [main]
19 certmaster = certmaster
20 certmaster_port = 51235
21 log_level = DEBUG
22 cert_dir = /etc/pki/certmaster

slave: 安装重复master的安装步骤
配置如下:

01 [root@slave ~]# cat /etc/certmaster/minion.conf
02 # configuration for minions
03   
04 [main]
05 certmaster = 60.28.x.x   #master的ip或者域名
06 certmaster_port = 51235
07 log_level = DEBUG
08 cert_dir = /etc/pki/certmaster
09   
10 [root@slave ~]# cat /etc/func/minion.conf
11 # configuration for minions
12   
13 [main]
14 log_level = DEBUG
15 acl_dir = /etc/func/minion-acl.d
16   
17 listen_addr =
18 listen_port = 51234
19 minion_name = dxt    #起的名字  这个名字需要在master指定hosts如果你有域名那就更好了,就不需要在指定hosts了
20   
21 master、slave  启动服务器
22 service certmaster start
23 service funcd start 
24   
25 [root@master ~]#  certmaster-ca --list
26 dxt
27 为客户端签发证书
28 [root@master ~]# certmaster-ca --sign dxt

ok了,可以使用了
• 查看当前有哪些服务器注册到主控机: func ‘*’ ping
• 查看所有服务器的硬件信息: func ‘*’ call hardware info
• 查看所有服务器上的 80 端口是否开启: func ‘*’ call networktest isportopen localhost 80
• 查看 blade-5 上的系统负载: func ‘blade-5′ call command run /usr/bin/uptime
• 启动 blade-6 上的 httpd 服务: func ‘blade-6′ call service start httpd
• 在所有服务器上统一挂载某个存储目录: func ‘*’ call mount xxx:/yyy/zzz /path/to/dir

目录
相关文章
|
4月前
|
Python
python RuntimeError: main thread is not in main loop
python RuntimeError: main thread is not in main loop
80 1
|
2月前
|
Python
python中if __name__ == '__main__'
python中if __name__ == '__main__'
17 3
|
7天前
|
存储 Python
【Python 基础】“func”和“ func()”有什么区别?
【5月更文挑战第6天】【Python 基础】“func”和“ func()”有什么区别?
|
3月前
|
数据采集 Rust Java
Python 为什么没有 main 函数?为什么我不推荐写 main 函数?
Python 为什么没有 main 函数?为什么我不推荐写 main 函数?
19 0
|
8月前
|
Go 测试技术
init函数与main函数
init函数与main函数
init函数与main函数
解决办法:GTK_OBJECT、GTK_SIGNAL_FUNC未声明
解决办法:GTK_OBJECT、GTK_SIGNAL_FUNC未声明
72 0
Java类Demo中存在方法func1、func2、func3和func4,请问该方法中,哪些是不合法的定义?( )
Java类Demo中存在方法func1、func2、func3和func4,请问该方法中,哪些是不合法的定义?( )
|
PHP
【laravel】call_user_func_array在框架的使用
【laravel】call_user_func_array在框架的使用
179 0
【laravel】call_user_func_array在框架的使用
|
PHP
【PHP】call_user_func_array() 内置函数
【PHP】call_user_func_array() 内置函数
84 0
【PHP】call_user_func_array() 内置函数