一、简介

  1、前言(引用一下网上的资料)

  随着企业的 Linux 系统数量越来越多,管理问题便成为一个相对麻烦并需要急 迫解决的问题,这里有 2 个 Key Message:1)统一管控体系非常重要,2)最佳运 维体验是运维的追求。 Puppet 是一种 Linux、Unix、Windows 的集中管理工具,采用 C/S 架构, 能够通过一个集中的管控点实现对成千上万台服务器的集中管理,请注意,这里的 管理,不涉及硬件层面的管理、监控等内容,主要服务器软件层面的管理,如软件 部署、配置、账户管理等等日常的软件层面管理。

  Puppet 采用 Ruby 语言编写, 但在管理的时候,管理员不需要丰富的 Ruby 只是,仅仅是通过 Puppet 所定义的 资源描述语言即可工作,这让管理员的学习门槛低了很多。

    与 Puppet 同类的软件还有很多,例如 Chef、SaltStack,但是我用一句话总 结以下他们的优劣,就是:Chef 太老,SaltStack 太新,Puppet 正好。 现在国内采用 Puppet 的大型企业包括新浪、阿里巴巴、百度、腾讯、小米、 PPTV、用友、中国建设银行等。

  那么,Foreman 和 Puppet 是什么关系呢?简单来说,Foreman 就是 Puppet 的 Web 界面,当然,Foreman 的功能不仅仅一个 Web 界面这么简单,引用 Foreman 的介绍来说,Foreman 包含 3 大功能,第一是部署,Foreman 能够实 现快速的系统部署或者再部署;第二就是配置管理,这一点是和 Puppet 进行结合 的;第三是监控,通过 Foreman,能够对 puppet 的执行状况进行检查,也能根 据所有服务器的状态执行不同的报告,让管理员对系统运行情况具有直观的了解。

  本文测试的foreman版本为1.20,puppet5,平台为centos 7

  2、foreman是什么?

   foreman是基于puppet的一个“增强工具”,主要能够帮到我们运维狗的有:

     1. 操作系统的部署

    foreman提供了一个基于kickstart的部署工具,输入一台服务器的部署网卡的mac地址和hostname、ip等信息,就能自动的帮我们部署完,并且,还可以生成一个部署iso,用于该服务器的重新部署。

     2. puppet的节点管理(ENC)

       原生的puppet管理节点分类以及节点和puppet类之间的映射靠文件描述,企业客户更希望有一个直观的工具,foreman可以通过Web界面将节点分组,将类分组,并且构建两者的映射关系。

    3. puppet的Web界面

  有个Web总是比命令行要方便,foreman提供了一个还算的过去的web界面,用于节点管理、类管理、变量管理、配置管理、部署管理等功能。

  3、怎么利用foreman

  

    foreman给我们的一个很大帮助就是,他把所有的配置、fact结果、运行结果什么都放到了mysql数据库里,所以,我们在做一些运行分析的时候,可以直接从数据库中获取数据进行分析即可。

    foreman帮我们搞定了节点管理、数据入库,剩下的就是你的想象力了。

  4、请参考官方快速部署手册

    https://www.theforeman.org/manuals/1.20/quickstart_guide.html

二、foreman的架构

  1、foreman本身只是一个框架,通过smart-proxy代理各种应用程序完成各项功能。

    

  2、foreman通过代理DNS、DHCP、TFTP完成了kickstart、cobbler、jumpstart等各种自动化安装系统工具的图形统一管理串口,实现的结果是只需要在foreman上指定各种模板(pex、ks),不同的模板还可以嵌套各种片段(snippet)达到统一、简化的目的。完成之后,便可以添加节点,关联定义的各种模板生成各种pxe和ks文件实现自动化安装。

  3、foreman通过代理puppet、puppet CA完成对puppet自动签名、puppet环境、class、变量、facter的管理。

  4、foreman通过ENC和静态组管理class和node之间的关联。

  5、foreman通过puppet plugin,可以在UI上完成对节点puppet命令的触发动作,触发的方法可以借助puppetkick(被遗弃了)、mcollective(借助sudo)、puppettssh(借助sshkey)、salt、customrun等各种工具实现。

  6、foreman可以收集所有节点运行puppet生成报告、执行情况

  7、foreman还提供了各种搜索、报表等功能,能够更好的展现节点的运行状况。

  8、foreman除了管理裸机外还可以管理各种虚拟化软件,如RHEV-M、EC2、VMWware和openstack

  9、foreman还可以和LDAP及AD集成

  10、foreman还提供了强大了用户、权限管理入口,可以建立多个用户、多个用户组、还可以对权限进行角色的定义等。不同的权限用户在UI上所看到的功能以及主机是不一样的。

  11、foreman开提供了所有在UI上操作的AUDITS(审计)功能、这样可以保障素有用户的操作都有据可查。

三、安装部署

  1、平台支持

    

      

  2、兼容性

    foreman puppet兼容性

    

    foreman puppet server 兼容性

      

  3、防火墙配置

      

  4、配置yum源,我这里测试本地已经连接互联网

  

    rpm -ivh https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm
    rpm -ivh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

    rpm -ivh https://yum.theforeman.org/releases/1.20/el7/x86_64/foreman-release.rpm

  5、安装foreman-installer

  yum install -y foreman-installer

  1. yum install -y foreman-installer
  2. foreman-installer noarch :1.20.-.el7 foreman 1.0 M
  3. puppet-agent x86_64 5.5.-.el7 puppet5 M
  4. replacing facter.x86_64 :2.4.-.el7
  5. replacing puppet.noarch 3.8.-.el7
  6. Installing for dependencies:
  7. foreman-selinux noarch 1.20.-.el7 foreman k
  8. rubygem-ansi noarch 1.4.-.el7 epel k
  9. rubygem-clamp noarch 1.1.-.el7 foreman k
  10. rubygem-hashie noarch 3.6.-.el7 foreman k
  11. rubygem-highline noarch 1.7.-.el7 foreman k
  12. rubygem-kafo noarch 2.1.-.el7 foreman k
  13. rubygem-kafo_parsers noarch 0.1.-.el7 foreman k
  14. rubygem-kafo_wizards noarch 0.0.-.el7 foreman k
  15. rubygem-little-plugger noarch 1.1.-.el7 foreman k
  16. rubygem-logging noarch 2.2.-.el7 foreman k
  17. rubygem-multi_json noarch 1.12.-.el7 foreman k
  18. rubygem-powerbar noarch 2.0.-.el7 foreman k
  19. Updating for dependencies:
  20. libsemanage x86_64 2.5-.el7 base k
  21. libsemanage-python x86_64 2.5-.el7 base k
  22. policycoreutils x86_64 2.5-.el7 base k
  23. policycoreutils-python x86_64 2.5-.el7 base k
  24. selinux-policy noarch 3.13.-.el7_6. updates k
  25. selinux-policy-targeted noarch 3.13.-.el7_6. updates 6.9 M
  26. setools-libs x86_64 3.3.-.el7 base k
  27.  
  28. Transaction Summary
  29.  
  30. Installed:
  31. foreman-installer.noarch :1.20.-.el7 puppet-agent.x86_64 :5.5.-.el7
  32.  
  33. Dependency Installed:
  34. foreman-selinux.noarch :1.20.-.el7
  35. rubygem-ansi.noarch :1.4.-.el7
  36. rubygem-clamp.noarch :1.1.-.el7
  37. rubygem-hashie.noarch :3.6.-.el7
  38. rubygem-highline.noarch :1.7.-.el7
  39. rubygem-kafo.noarch :2.1.-.el7
  40. rubygem-kafo_parsers.noarch :0.1.-.el7
  41. rubygem-kafo_wizards.noarch :0.0.-.el7
  42. rubygem-little-plugger.noarch :1.1.-.el7
  43. rubygem-logging.noarch :2.2.-.el7
  44. rubygem-multi_json.noarch :1.12.-.el7
  45. rubygem-powerbar.noarch :2.0.-.el7
  46.  
  47. Dependency Updated:
  48. libsemanage.x86_64 :2.5-.el7
  49. libsemanage-python.x86_64 :2.5-.el7
  50. policycoreutils.x86_64 :2.5-.el7
  51. policycoreutils-python.x86_64 :2.5-.el7
  52. selinux-policy.noarch :3.13.-.el7_6.
  53. selinux-policy-targeted.noarch :3.13.-.el7_6.
  54. setools-libs.x86_64 :3.3.-.el7
  55.  
  56. Replaced:
  57. facter.x86_64 :2.4.-.el7 puppet.noarch :3.8.-.el7
  58.  
  59. Complete!

  6、使用foreman-installer 安装(-i是交互模式)

  1. root@puppet-foreman ~]# foreman-installer -i
  2. Unable to resolve forward DNS for puppet-foreman
  3. Output of 'facter fqdn' is different from 'hostname -f'
  4.  
  5. Make sure above command gives the same output. If needed, change the hostname permanently via the
  6. 'hostname' or 'hostnamectl set-hostname' command
  7. and editing the appropriate configuration file.
  8. (e.g. on Red Hat systems /etc/sysconfig/network,
  9. on Debian based systems /etc/hostname).
  10.  
  11. If 'hostname -f' still returns an unexpected result, check /etc/hosts and put
  12. the hostname entry in the correct order, for example:
  13.  
  14. 1.2.3.4 full.hostname.com full
  15.  
  16. The fully qualified hostname must be the first entry on the line
  17. Your system does not meet configuration criteria

    提示必须修改hostname和/etc/hosts文件

  1. [root@puppet-foreman ~]# cat /etc/hosts
  2. 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4
  3. :: localhost localhost.localdomain localhost6 localhost6.localdomain6
  4. 192.168.216.234 www.puppet-foreman.com
  5. [root@puppet-foreman ~]# hostnamectl set-hostname www.puppet-foreman.com

    修改后重启,init6

  

  1. [root@www ~]# !for
  2. foreman-installer -i
  3. Welcome to the Foreman installer!
  4. ---------------------------------
  5.  
  6. This wizard will gather all required information. You can change any parameter
  7. to your needs.
  8.  
  9. Ready to start? (y/n)
  10. [root@www ~]# !for
  11. foreman-installer -i
  12. Welcome to the Foreman installer!
  13. ---------------------------------
  14.  
  15. This wizard will gather all required information. You can change any parameter
  16. to your needs.
  17.  
  18. Ready to start? (y/n)
  19. y
  20.  
  21. Main Config Menu
  22. . [✓] Configure foreman
  23. . [✓] Configure foreman_cli
  24. . [✗] Configure foreman_cli_discovery
  25. . [✗] Configure foreman_cli_openscap
  26. . [✗] Configure foreman_cli_remote_execution
  27. . [✗] Configure foreman_cli_tasks
  28. . [✗] Configure foreman_cli_templates
  29. . [✓] Configure foreman_proxy
  30. . [✓] Configure puppet
  31. . [✗] Configure foreman_plugin_ansible
  32. . [✗] Configure foreman_plugin_azure
  33. . [✗] Configure foreman_plugin_bootdisk
  34. . [✗] Configure foreman_plugin_chef
  35. . [✗] Configure foreman_plugin_cockpit
  36. . [✗] Configure foreman_plugin_default_hostgroup
  37. . [✗] Configure foreman_plugin_dhcp_browser
  38. . [✗] Configure foreman_plugin_digitalocean
  39. . [✗] Configure foreman_plugin_discovery
  40. . [✗] Configure foreman_plugin_docker
  41. . [✗] Configure foreman_plugin_expire_hosts
  42. . [✗] Configure foreman_plugin_hooks
  43. . [✗] Configure foreman_plugin_host_extra_validator
  44. . [✗] Configure foreman_plugin_memcache
  45. . [✗] Configure foreman_plugin_monitoring
  46. . [✗] Configure foreman_plugin_omaha
  47. . [✗] Configure foreman_plugin_openscap
  48. . [✗] Configure foreman_plugin_ovirt_provision
  49. . [✗] Configure foreman_plugin_puppetdb
  50. . [✗] Configure foreman_plugin_remote_execution
  51. . [✗] Configure foreman_plugin_salt
  52. . [✗] Configure foreman_plugin_setup
  53. . [✗] Configure foreman_plugin_snapshot_management
  54. . [✗] Configure foreman_plugin_tasks
  55. . [✗] Configure foreman_plugin_templates
  56. . [✗] Configure foreman_compute_ec2
  57. . [✗] Configure foreman_compute_gce
  58. . [✗] Configure foreman_compute_libvirt
  59. . [✗] Configure foreman_compute_openstack
  60. . [✗] Configure foreman_compute_ovirt
  61. . [✗] Configure foreman_compute_rackspace
  62. . [✗] Configure foreman_compute_vmware
  63. . [✗] Configure foreman_proxy_plugin_abrt
  64. . [✗] Configure foreman_proxy_plugin_ansible
  65. . [✗] Configure foreman_proxy_plugin_chef
  66. . [✗] Configure foreman_proxy_plugin_dhcp_infoblox
  67. . [✗] Configure foreman_proxy_plugin_dhcp_remote_isc
  68. . [✗] Configure foreman_proxy_plugin_discovery
  69. . [✗] Configure foreman_proxy_plugin_dns_infoblox
  70. . [✗] Configure foreman_proxy_plugin_dns_powerdns
  71. . [✗] Configure foreman_proxy_plugin_dynflow
  72. . [✗] Configure foreman_proxy_plugin_monitoring
  73. . [✗] Configure foreman_proxy_plugin_omaha
  74. . [✗] Configure foreman_proxy_plugin_openscap
  75. . [✗] Configure foreman_proxy_plugin_pulp
  76. . [✗] Configure foreman_proxy_plugin_remote_execution_ssh
  77. . [✗] Configure foreman_proxy_plugin_salt
  78. . Display current config
  79. . Save and run
  80. . Cancel run without Saving
  81. Choose an option from the menu... 58 #我直接默认了,可以选这56项里面的,这里的58就是保存运行,然后下面就开始安装了
  82. Preparing installation Debug: Loading facts from /usr/share/foreman-instaPreparing installation Debug: Failed to load library 'cfpropertylist' forPreparing installation Debug: Facter: searching for operatingsystem.rb inPreparing installation Debug: Facter: searching for operatingsystemreleasPreparing installation Debug: Facter: fact "network6_lo" has resolved to Preparing installation Debug: Facter: fact "systemd_internal_services" haPreparing installation Debug: Facter: # dmidecode 3.0 Preparing installation -bit capable Preparing installation Multi-Core Preparing installation Manufacturer: GenuineIntel Preparing installation Configuration: Enabled, Socketed, Level Preparing installation Speed: Unknown Preparing installation Configuration: Enabled, Socketed, Level Preparing installation Burst Preparing installation Cache Information Preparing installation Bank Locator: RAM slot # Preparing installation Type: DRAM Preparing installation Error Information Handle: No Error Preparing installation Memory Array Mapped Address Handle: 0x00A7 Preparing installation } Preparing installation No such key: "lookup_options" Preparing installation Debug: Automatically imported foreman_proxy::paramPreparing installation Original path: "kafo_answers" Preparing installation Found key: "foreman::email_smtp_port" vaPreparing installation Debug: Automatically imported foreman::rake from fPreparing installation Debug: Automatically imported apache from apache iPreparing installation Debug: Automatically imported apache::service fromPreparing installation Debug: Automatically imported apache::mod::ext_filPreparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: importing '/usr/share/foreman-installer/modPreparing installation Path "/tmp/kafo_hiera20190110-3050-1qocr9/Preparing installation Searching for "postgresql::server::config_entriePreparing installation Debug: importing '/usr/share/foreman-installer/modPreparing installation Hierarchy entry "yaml" Preparing installation No such key: "foreman_proxy::dhcp_managePreparing installation Debug: importing '/usr/share/foreman-installer/modPreparing installation Debug: Automatically imported foreman_proxy::settiPreparing installation Original path: "custom" Preparing installation Using configuration "/tmp/kafo_hiera20190110Preparing installation Hierarchy entry "yaml" Preparing installation Debug: Automatically imported puppet::server from Preparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Hierarchy entry "yaml" Preparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: Automatically imported apache::listen from Preparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: Scope(Apache::Vhost[foreman-ssl]): RetrieviPreparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: template[/usr/share/foreman-installer/modulPreparing installation Debug: Resource concat::fragment[puppet.conf_main]Preparing installation Debug: Adding relationship from ring installation Debug: Deleted text domain :production: true Installing Debug: Prefetching inifile resources for yumrepo [%] [ ]Installing Yumrepo[epel] [%] [ ]Installing Debug: Prefetching yum resources for package [%] [ ]Installing Package[foreman-release-scl] [%] [ ]Installing Package[foreman-postgresql] [%] [. ]Installing Package[httpd] [%] [ ]Installing Group[apache] [%] [ ]Installing User[apache] [%] [ ]Installing Exec[mkdir /etc/httpd/conf.d] [%] [ ]Installing Exec[mkdir /etc/httpd/conf.modules.d] [%] [ ]Installing Package[mailcap] [%] [ ]Installing File[mime.conf] [%] [ ]Installing File[mime_magic.conf] [%] [ ]Installing File[alias.conf] [%] [ ]Installing File[autoindex.conf] [%] [ ]Installing File[deflate.conf] [%] [ ]Installing File[dir.conf] [%] [ ]Installing File[negotiation.conf] [%] [ ]Installing File[setenvif.conf] [%] [ ]Installing File[/etc/httpd/conf.modules.d/prefork.conf] [%] [ ]Installing Package[postgresql-client] [%] [ ]Installing File[/usr/local/bin/validate_postgresql_connection [%] [........... ]Installing Package[postgresql-server] [%] [........... ]Installing File[/var/lib/pgsql/data] [%] [............ ]Installing Exec[postgresql_initdb] [%] [............. ]Installing File[systemd-override] [%] [ ]Installing Exec[restart-systemd] [%] [ ]Installing Package[foreman-proxy] [%] [ ]Installing Package[puppet-agent-oauth] [%] [... ]Installing Package[tftp-server] [%] [... ]Installing Package[syslinux] [%] [... ]Installing File[/var/lib/tftpboot] [%] [... ]Installing File[/etc/tftpd.map] [%] [... ]Installing Package[xinetd] [%] [.... ]Installing File[/etc/xinetd.d] [%] [.... ]Installing File[/etc/xinetd.conf] [%] [.... ]Installing Package[wget] [%] [.... ]Installing File[/etc/puppetlabs/puppet] [%] [.... ]Installing Package[puppet-agent] [%] [.... ]Installing Package[puppetserver] [%] [.... ]Installing User[puppet] [%] [.... ]Installing Augeas[puppet::server::puppetserver::jvm] [%] [..... ]Installing Augeas[puppet::server::puppetserver::bootstrap] [%] [..... ]Installing Augeas[puppet::server::puppetserver::jruby_jar] [%] [..... ]Installing File[/etc/puppetlabs/puppetserver/services.d] [%] [..... ]Installing File[/etc/puppetlabs/puppetserver/services.d/ca.cf [%] [..... ]Installing File[/opt/puppetlabs/server/apps/puppetserver/conf [%] [..... ]Installing File[/opt/puppetlabs/server/apps/puppetserver/conf [%] [..... ]Installing File[/etc/puppetlabs/puppetserver/conf.d/ca.conf] [%] [..... ]Installing File[/etc/puppetlabs/puppetserver/conf.d/puppetser [%] [...... ]Installing File[/etc/puppetlabs/puppetserver/conf.d/auth.conf [%] [...... ]Installing File[/etc/puppetlabs/puppetserver/conf.d/webserver [%] [...... ]Installing File[/etc/puppetlabs/puppetserver/conf.d/product.c [%] [...... ]Installing File[/etc/puppetlabs/puppetserver/conf.d/metrics.c [%] [...... ]Installing Exec[mkdir -p /usr/share/puppet/modules] [%] [...... ]Installing Exec[puppet_server_config-create_ssl_dir] [%] [...... ]Installing File[/etc/puppetlabs/puppet/ssl/private_keys] [%] [....... ]Installing File[/etc/puppetlabs/puppet/ssl/private_keys/www.p [%] [....... ]Installing File[/etc/puppetlabs/puppet/autosign.conf] [%] [....... ]Installing File[/etc/puppetlabs/code/environments] [%] [....... ]Installing File[/opt/puppetlabs/puppet] [%] [....... ]Installing File[/opt/puppetlabs/puppet/cache/reports] [%] [....... ]Installing File[/etc/puppetlabs/code/environments/common] [%] [....... ]Installing File[/etc/puppetlabs/code/modules] [%] [....... ]Installing File[/opt/puppetlabs/puppet/modules] [%] [........ ]Installing File[/usr/share/puppet/modules] [%] [........ ]Installing Package[rubygem-json] [%] [........ ]Installing File[/etc/puppetlabs/puppet/foreman.yaml] [%] [........ ]Installing Exec[Create Puppet Reports dir] [%] [........ ]Installing File[/opt/puppetlabs/puppet/lib/ruby/vendor_ruby/p [%] [........ ]Installing File[/etc/puppetlabs/puppet/node.rb] [%] [........ ]Installing File[/opt/puppetlabs/server/data/puppetserver/yaml [%] [........ ]Installing File[/opt/puppetlabs/server/data/puppetserver/yaml [%] [......... ]Installing File[/opt/puppetlabs/server/data/puppetserver/yaml [%] [......... ]Installing File[/opt/puppetlabs/server/data/puppetserver/yaml [%] [......... ]Installing Package[foreman-cli] [%] [......... ]Installing File[/etc/hammer/cli.modules.d/foreman.yml] [%] [......... ]Installing File[/root/.hammer] [%] [......... ]Installing File[/root/.hammer/cli.modules.d] [%] [......... ]Installing File[/root/.hammer/cli.modules.d/foreman.yml] [%] [......... ]Installing Concat_file[/etc/httpd/conf/ports.conf] [%] [.......... ]Installing File[/etc/httpd/conf/httpd.conf] [%] [.......... ]Installing File[log_config.load] [%] [.......... ]Installing File[systemd.load] [%] [.......... ]Installing File[unixd.load] [%] [.......... ]Installing File[authz_host.load] [%] [.......... ]Installing File[actions.load] [%] [.......... ]Installing File[authn_core.load] [%] [........... ]Installing File[cache.load] [%] [........... ]Installing File[ext_filter.load] [%] [........... ]Installing File[mime.load] [%] [........... ]Installing File[mime_magic.load] [%] [........... ]Installing File[rewrite.load] [%] [........... ]Installing File[speling.load] [%] [........... ]Installing File[suexec.load] [%] [........... ]Installing File[version.load] [%] [............ ]Installing File[vhost_alias.load] [%] [............ ]Installing File[auth_digest.load] [%] [............ ]Installing File[authn_anon.load] [%] [............ ]Installing File[authn_dbm.load] [%] [............ ]Installing File[authz_dbm.load] [%] [............ ]Installing File[authz_owner.load] [%] [............ ]Installing File[expires.load] [%] [............ ]Installing File[include.load] [%] [............. ]Installing File[logio.load] [%] [............. ]Installing File[substitute.load] [%] [............. ]Installing File[usertrack.load] [%] [............. ]Installing File[alias.load] [%] [............. ]Installing File[authn_file.load] [%] [............. ]Installing File[autoindex.load] [%] [............. ]Installing File[dav.load] [%] [.............. ]Installing File[dav_fs.conf] [%] [.............. ]Installing File[dav_fs.load] [%] [.............. ]Installing File[deflate.load] [%] [.............. ]Installing File[dir.load] [%] [.............. ]Installing File[negotiation.load] [%] [.............. ]Installing File[setenvif.load] [%] [.............. ]Installing File[auth_basic.load] [%] [.............. ]Installing File[filter.load] [%] [............... ]Installing File[authz_core.load] [%] [............... ]Installing File[access_compat.load] [%] [............... ]Installing File[authz_user.load] [%] [............... ]Installing File[authz_groupfile.load] [%] [............... ]Installing File[env.load] [%] [............... ]Installing File[/etc/httpd/conf.modules.d/prefork.load] [%] [............... ]Installing File[cgi.load] [%] [............... ]Installing File[/var/www/html] [%] [................ ]Installing File[/var/log/httpd] [%] [................ ]Installing File[headers.load] [%] [................ ]Installing Package[mod_passenger] [%] [................ ]Installing File[passenger.conf] [%] [................ ]Installing File[zpassenger.load] [%] [................ ]Installing Concat_file[/var/lib/pgsql/data/pg_hba.conf] [%] [................ ]Installing Debug: Prefetching parsed resources for postgresql [%] [................. ]Installing Postgresql_conf[port] [%] [................. ]Installing Postgresql_conf[data_directory] [%] [................. ]Installing Concat_file[/var/lib/pgsql/data/pg_ident.conf] [%] [................. ]Installing Postgresql_conf[checkpoint_completion_target] [%] [................. ]Installing Postgresql_conf[max_connections] [%] [................. ]Installing Postgresql_conf[shared_buffers] [%] [................. ]Installing Postgresql_conf[work_mem] [%] [................. ]Installing Postgresql_conf[log_line_prefix] [%] [................. ]Installing File[/etc/xinetd.d/tftp] [%] [.................. ]Installing Service[xinetd] [%] [.................. ]Installing Concat_file[/etc/puppetlabs/puppet/puppet.conf] [%] [.................. ]Installing File[/etc/puppetlabs/puppet/auth.conf] [%] [.................. ]Installing Exec[puppet_server_config-generate_ca_cert] [%] [.................. ]Installing File[/etc/puppetlabs/code/environments/development [%] [.................. ]Installing File[/etc/puppetlabs/code/environments/development [%] [.................. ]Installing File[/etc/puppetlabs/code/environments/development [%] [.................. ]Installing File[/etc/puppetlabs/code/environments/production] [%] [................... ]Installing File[/etc/puppetlabs/code/environments/production/ [%] [................... ]Installing File[/etc/puppetlabs/code/environments/production/ [%] [................... ]Installing Concat_file[-default.conf] [%] [................... ]Installing Concat_file[-default-ssl.conf] [%] [................... ]Installing Package[mod_ssl] [%] [................... ]Installing File[/etc/httpd/conf.d] [%] [................... ]Installing File[passenger_package.conf] [%] [................... ]Installing File[ssl.conf] [%] [.................... ]Installing File[ssl.load] [%] [.................... ]Installing File[socache_shmcb.load] [%] [.................... ]Installing File[/etc/httpd/conf.modules.d] [%] [.................... ]Installing Service[postgresqld] [%] [.................... ]Installing Postgresql_conn_validator[validate_service_is_runn [%] [.................... ]Installing Exec[postgresql_reload] [%] [.................... ]Installing Postgresql_psql[CREATE ROLE foreman ENCRYPTED PASS [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" NOSUPERUSER] [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" NOCREATEDB] [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" NOCREATEROLE] [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" LOGIN] [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" INHERIT] [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" NOREPLICATION [%] [..................... ]Installing Postgresql_psql[ALTER ROLE "foreman" CONNECTION LI [%] [..................... ]Installing Postgresql_psql[ALTER ROLE foreman ENCRYPTED PASSW [%] [...................... ]Installing Postgresql_psql[CREATE DATABASE "foreman"] [%] [...................... ]Installing Postgresql_psql[REVOKE CONNECT ON DATABASE "forema [65%] [...................... ]Installing Postgresql_psql[UPDATE pg_database SET datistempla [66%] [...................... ]Installing Postgresql_psql[ALTER DATABASE "foreman" OWNER TO [66%] [...................... ]Installing Package[tfm-rubygem-passenger-native] [66%] [...................... ]Installing File[/etc/foreman/database.yml] [67%] [...................... ]Installing File[/etc/foreman/email.yaml] [67%] [...................... ]Installing File[/etc/sysconfig/foreman] [67%] [....................... ]Installing File[/usr/share/foreman] [68%] [....................... ]Installing User[foreman] [68%] [....................... ]Installing Debug: Prefetching crontab resources for cron [69%] [....................... ]Installing Cron[clear_session_table] [69%] [....................... ]Installing Cron[expire_old_reports] [69%] [....................... ]Installing Cron[daily summary] [69%] [....................... ]Installing File[/etc/httpd/conf.d/05-foreman.d] [70%] [....................... ]Installing File[/etc/httpd/conf.d/05-foreman-ssl.d] [70%] [........................ ]Installing File[/usr/share/foreman/config.ru] [70%] [........................ ]Installing File[/usr/share/foreman/config/environment.rb] [71%] [........................ ]Installing Concat_file[/etc/foreman/settings.yaml] [71%] [........................ ]Installing Concat_file[05-foreman.conf] [72%] [........................ ]Installing Concat_file[05-foreman-ssl.conf] [72%] [........................ ]Installing Postgresql_psql[grant:database:GRANT foreman - ALL [72%] [........................ ]Installing Debug: Prefetching cli resources for foreman_confi [73%] [........................ ]Installing Foreman_config_entry[db_pending_migration] [73%] [........................ ]Installing Exec[foreman-rake-db:migrate] [73%] [......................... ]Installing Foreman_config_entry[db_pending_seed] [74%] [......................... ]Installing Exec[foreman-rake-db:seed] [74%] [......................... ]Installing Service[httpd] [74%] [......................... ]Installing Service[dynflowd] [75%] [......................... ]Installing Exec[restart_foreman] [75%] [......................... ]Installing Service[foreman] [75%] [......................... ]Installing User[foreman-proxy] [76%] [......................... ]Installing File[/var/lib/tftpboot/pxelinux.cfg] [76%] [.......................... ]Installing File[/var/lib/tftpboot/grub] [77%] [.......................... ]Installing File[/var/lib/tftpboot/grub2] [77%] [.......................... ]Installing File[/var/lib/tftpboot/boot] [77%] [.......................... ]Installing File[/var/lib/tftpboot/ztp.cfg] [78%] [.......................... ]Installing File[/var/lib/tftpboot/poap.cfg] [78%] [.......................... ]Installing File[/var/lib/tftpboot/grub2/grub.cfg] [79%] [.......................... ]Installing File[/var/lib/tftpboot/chain.c32] [79%] [.......................... ]Installing File[/var/lib/tftpboot/mboot.c32] [79%] [........................... ]Installing File[/var/lib/tftpboot/menu.c32] [80%] [........................... ]Installing File[/var/lib/tftpboot/memdisk] [80%] [........................... ]Installing File[/var/lib/tftpboot/pxelinux.0] [80%] [........................... ]Installing Package[grub2-efi] [81%] [........................... ]Installing Package[grub2-efi-modules] [81%] [........................... ]Installing Package[grub2-tools] [82%] [........................... ]Installing Package[shim] [82%] [............................ ]Installing File[/var/lib/tftpboot/grub2/boot] [82%] [............................ ]Installing File[/var/lib/tftpboot/grub2/grubx64.efi] [83%] [............................ ]Installing File[/var/lib/tftpboot/grub2/shim.efi] [83%] [............................ ]Installing File[/etc/sudoers.d] [83%] [............................ ]Installing File[/etc/sudoers.d/foreman-proxy] [84%] [............................ ]Installing Service[puppetserver] [84%] [............................ ]Installing Exec[foreman-rake-apipie:cache:index] [85%] [................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.yml] [85%] [.................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/bmc.yml] [85%] [..................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/dhcp.yml] [86%] [..................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/dhcp_isc.yml] [86%] [...................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/dns.yml] [87%] [...................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/dns_nsupdate.ym [87%] [....................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/dns_nsupdate_gs [87%] [........................................................................................................................................ ]Installing File[/etc/foreman-proxy/settings.d/dns_libvirt.yml [88%] [........................................................................................................................................ ]Installing File[/etc/foreman-proxy/settings.d/dhcp_libvirt.ym [88%] [......................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/puppet.yml] [88%] [......................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_cu [89%] [.......................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_le [89%] [........................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_mc [90%] [........................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_pu [90%] [............................................................................................................................................ ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_pu [90%] [............................................................................................................................................ ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_sa [91%] [............................................................................................................................................. ]Installing File[/etc/foreman-proxy/settings.d/puppet_proxy_ss [91%] [............................................................................................................................................. ]Installing File[/etc/foreman-proxy/settings.d/puppetca.yml] [91%] [.............................................................................................................................................. ]Installing File[/etc/foreman-proxy/settings.d/puppetca_hostna [92%] [............................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/puppetca_token_ [92%] [............................................................................................................................................... ]Installing File[/etc/foreman-proxy/settings.d/realm.yml] [93%] [................................................................................................................................................ ]Installing File[/etc/foreman-proxy/settings.d/realm_freeipa.y [93%] [................................................................................................................................................ ]Installing File[/etc/foreman-proxy/settings.d/tftp.yml] [93%] [................................................................................................................................................. ]Installing File[/etc/foreman-proxy/settings.d/templates.yml] [94%] [.................................................................................................................................................. ]Installing File[/etc/foreman-proxy/settings.d/logs.yml] [94%] [.................................................................................................................................................. ]Installing Datacat_fragment[foreman_proxy::enabled_features:: [95%] [................................................................................................................................................... ]Installing Datacat_fragment[foreman_proxy::enabled_features:: [95%] [................................................................................................................................................... ]Installing Datacat_fragment[foreman_proxy::enabled_features:: [95%] [.................................................................................................................................................... ]Installing Datacat_fragment[foreman_proxy::enabled_features:: [96%] [..................................................................................................................................................... ]Installing Service[foreman-proxy] [96%] [..................................................................................................................................................... ]Installing Datacat_collector[foreman_proxy::enabled_features] [96%] [...................................................................................................................................................... ]Installing Foreman_smartproxy[www.puppet-foreman.com] [97%] [...................................................................................................................................................... ]Installing Service[puppet] [97%] [....................................................................................................................................................... ]Installing Service[puppet-run.timer] [98%] [........................................................................................................................................................ ]Installing File[/etc/systemd/system/puppet-run.timer] [98%] [........................................................................................................................................................ ]Installing File[/etc/systemd/system/puppet-run.service] [98%] [......................................................................................................................................................... ]Installing Exec[systemctl-daemon-reload-puppet] [99%] [......................................................................................................................................................... ]Installing Cron[puppet] [99%] [.......................................................................................................................................................... ]Installing Done [100%] [..........................................................................................................................................................]Installing Done [100%] [..........................................................................................................................................................]
  83. Success!
  84. * Foreman is running at https://www.puppet-foreman.com
  85. Initial credentials are admin / tE6QmtZACaJzKYRB #这里是生成的随机密码,一会进去修改一下即可
  86. * Foreman Proxy is running at https://www.puppet-foreman.com:8443
  87. * Puppetmaster is running at port
  88. The full log is at /var/log/foreman-installer/foreman.log
  89. [root@www ~]#

    查看端口

  1. [root@www ~]# netstat -untlp
  2. Active Internet connections (only servers)
  3. Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
  4. tcp 127.0.0.1: 0.0.0.0:* LISTEN /Passenger Rack
  5. tcp 0.0.0.0: 0.0.0.0:* LISTEN /systemd
  6. tcp 192.168.122.1: 0.0.0.0:* LISTEN /dnsmasq
  7. tcp 0.0.0.0: 0.0.0.0:* LISTEN /sshd
  8. tcp 127.0.0.1: 0.0.0.0:* LISTEN /cupsd
  9. tcp 127.0.0.1: 0.0.0.0:* LISTEN /postgres
  10. tcp 127.0.0.1: 0.0.0.0:* LISTEN /master
  11. tcp6 ::: :::* LISTEN /java
  12. tcp6 ::: :::* LISTEN /systemd
  13. tcp6 ::: :::* LISTEN /httpd
  14. tcp6 ::: :::* LISTEN /sshd
  15. tcp6 ::: :::* LISTEN /cupsd
  16. tcp6 ::: :::* LISTEN /postgres
  17. tcp6 ::: :::* LISTEN /master
  18. tcp6 ::: :::* LISTEN /ruby
  19. tcp6 ::: :::* LISTEN /httpd
  20. udp 0.0.0.0: 0.0.0.0:* /avahi-daemon: r
  21. udp 0.0.0.0: 0.0.0.0:* /dhclient
  22. udp 0.0.0.0: 0.0.0.0:* /avahi-daemon: r
  23. udp 192.168.122.1: 0.0.0.0:* /dnsmasq
  24. udp 0.0.0.0: 0.0.0.0:* /dnsmasq
  25. udp 0.0.0.0: 0.0.0.0:* /dhclient
  26. udp 0.0.0.0: 0.0.0.0:* /xinetd
  27. udp6 ::: :::* /dhclient
  28. [root@www ~]#

  7、访问页面修改密码

  

      下面就是 安装完生成账号admin和随机密码

  

    登陆后,接下来修改密码

 

  到此foreman已经部署完了,功能测试敬请期待!

 

转载请注明出处:https://www.cnblogs.com/zhangxingeng/p/10248601.html

Centos 7 Puppet之foreman介绍安装测试的更多相关文章

  1. Centos下Sphinx中文分词编译安装测试---CoreSeek

    要支持中文分词,还需要下载Coreseek,可以去官方搜索下载,这里我用的4.1 百度云下载地址:      https://pan.baidu.com/s/1slNIyHf tar -zxvf co ...

  2. Centos 7.3 编译 & 安装 & 测试 facebook faiss

    许多 AI 系统训练完毕,正式上线时的基本操作往往可以抽象为:在高维向量空间中,给定一个向量,寻找与之最相近的 k 个向量.当向量数目异常巨大时,如何快速地执行这一基本操作,便成为 AI 系统在工程应 ...

  3. CentOS 6.5下Redis安装测试

    NoSQL之Redis - CentOS 6.5安装测试 1.下载redis 可以在线安装或者下载 redis ①在线安装前需要检测是否存在rpm包不存在的话查看yum在线是否存在rpm包不存在的话就 ...

  4. node.js介绍及Win7环境安装测试(转)

    官网描述: Node.js is a platform built on Chrome's JavaScript runtime for easily building fast, scalable ...

  5. Docker版本与centos和ubuntu环境下docker安装介绍

    # Docker版本与安装介绍 * Docker-CE 和 Docker-EE * Centos 上安装 Docker-CE * Ubuntu 上安装 Docker-CE ## Docker-CE和D ...

  6. [Redis_1] Redis 介绍 && 安装

    0. 说明 Redis 介绍 && 安装 1. Redis 介绍 2. Redis 安装(Windows 10) [2.1 解压 redis-2.2.2-win32-win64.rar ...

  7. CentOS 6.5 下HeartBeat的安装与配置

    CentOS 6.5 下HeartBeat的安装与配置 参考网站: http://wenku.baidu.com/link?url=BvqJatdx1m12PLil-7YA1zkM0yUOEO8OnN ...

  8. CentOS 6下PXE+Kickstart无人值守安装操作系统

    一.简介1.1 什么是PXEPXE(Pre-boot Execution Environment,预启动执行环境)是由Intel公司开发的最新技术,工作于Client/Server的网络模式,支持工作 ...

  9. Rancher介绍安装以及对docker的管理

    原文:Rancher介绍安装以及对docker的管理 一.简介 Rancher是一个开源的企业级全栈化容器部署及管理平台.Rancher为容器提供一揽子基础架构服务:CNI兼容的网络服务.存储服务.主 ...

随机推荐

  1. DevExpress内 GridControl中复选框值问题

    在DevExpress的 GridControl内的复选柜勾选后,界面看到是勾选状态,但对应的DataView的值仍未变,在以下事件内处理 在对应的DataView内的 CellValueChangi ...

  2. 机器学习--------SVM

    #SVM的使用 (结合具体代码说明,代码参考邹博老师的代码) 1.使用numpy中的loadtxt读入数据文件 data:鸢尾花数据 5.1,3.5,1.4,0.2,Iris-setosa 4.9,3 ...

  3. Java 将键盘中的输入保存到数组

    import java.util.Scanner; import java.util.InputMismatchException; public class saveInputToArr { pub ...

  4. 微信小程序统计分析

    在微信公众平台社区看到一个不错的东西,小博统计:https://www.wxappdev.com/:用于微信小程序统计分析.

  5. RequireJS简单实用说明

    OM前端框架说明 om前端框架采用RequireJS,RequireJS  是一个JavaScript模块加载器.它非常适合在浏览器中使用, 它非常适合在浏览器中使用,但它也可以用在其他脚本环境, 就 ...

  6. Android Gradle Task

    Tasks runnable from root project ------------------------------------------------------------ Androi ...

  7. BurpSuite 代理设置的小技巧

    原文:https://www.anquanke.com/post/id/85925 作者:三思之旅 预估稿费:300RMB 投稿方式:发送邮件至linwei#360.cn,或登陆网页版在线投稿 在We ...

  8. Three.js学习笔记05

    场景相关函数和属性 下面的代码中应用到了所有以上的函数及属性: <!DOCTYPE html> <html lang="en"> <head> ...

  9. 使用Java 线程池的利弊及JDK自带六种创建线程池的方法

    1. 为什么使用线程池 诸如 Web 服务器.数据库服务器.文件服务器或邮件服务器之类的许多服务器应用程序都面向处理来自某些远程来源的大量短小的任务.请求以某种方式到达服务器,这种方式可能是通过网络协 ...

  10. 【计算机篇】Office 2016 for Mac 安装和破解教程

    免责声明 请亲们支持正版.这教程旨在分享,供参考. 为啥写这篇文章 对于大多数使用 Mac 的用户而言,虽然有苹果自家的办公软件,但功能少,用起来不舒服.而 Offer 2016 版的需要登录激活购买 ...