一、简介

  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

 yum install -y foreman-installer
foreman-installer noarch :1.20.-.el7 foreman 1.0 M
puppet-agent x86_64 5.5.-.el7 puppet5 M
replacing facter.x86_64 :2.4.-.el7
replacing puppet.noarch 3.8.-.el7
Installing for dependencies:
foreman-selinux noarch 1.20.-.el7 foreman k
rubygem-ansi noarch 1.4.-.el7 epel k
rubygem-clamp noarch 1.1.-.el7 foreman k
rubygem-hashie noarch 3.6.-.el7 foreman k
rubygem-highline noarch 1.7.-.el7 foreman k
rubygem-kafo noarch 2.1.-.el7 foreman k
rubygem-kafo_parsers noarch 0.1.-.el7 foreman k
rubygem-kafo_wizards noarch 0.0.-.el7 foreman k
rubygem-little-plugger noarch 1.1.-.el7 foreman k
rubygem-logging noarch 2.2.-.el7 foreman k
rubygem-multi_json noarch 1.12.-.el7 foreman k
rubygem-powerbar noarch 2.0.-.el7 foreman k
Updating for dependencies:
libsemanage x86_64 2.5-.el7 base k
libsemanage-python x86_64 2.5-.el7 base k
policycoreutils x86_64 2.5-.el7 base k
policycoreutils-python x86_64 2.5-.el7 base k
selinux-policy noarch 3.13.-.el7_6. updates k
selinux-policy-targeted noarch 3.13.-.el7_6. updates 6.9 M
setools-libs x86_64 3.3.-.el7 base k Transaction Summary Installed:
foreman-installer.noarch :1.20.-.el7 puppet-agent.x86_64 :5.5.-.el7 Dependency Installed:
foreman-selinux.noarch :1.20.-.el7
rubygem-ansi.noarch :1.4.-.el7
rubygem-clamp.noarch :1.1.-.el7
rubygem-hashie.noarch :3.6.-.el7
rubygem-highline.noarch :1.7.-.el7
rubygem-kafo.noarch :2.1.-.el7
rubygem-kafo_parsers.noarch :0.1.-.el7
rubygem-kafo_wizards.noarch :0.0.-.el7
rubygem-little-plugger.noarch :1.1.-.el7
rubygem-logging.noarch :2.2.-.el7
rubygem-multi_json.noarch :1.12.-.el7
rubygem-powerbar.noarch :2.0.-.el7 Dependency Updated:
libsemanage.x86_64 :2.5-.el7
libsemanage-python.x86_64 :2.5-.el7
policycoreutils.x86_64 :2.5-.el7
policycoreutils-python.x86_64 :2.5-.el7
selinux-policy.noarch :3.13.-.el7_6.
selinux-policy-targeted.noarch :3.13.-.el7_6.
setools-libs.x86_64 :3.3.-.el7 Replaced:
facter.x86_64 :2.4.-.el7 puppet.noarch :3.8.-.el7 Complete!

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

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

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

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

    修改后重启,init6

  

[root@www ~]# !for
foreman-installer -i
Welcome to the Foreman installer!
--------------------------------- This wizard will gather all required information. You can change any parameter
to your needs. Ready to start? (y/n)
[root@www ~]# !for
foreman-installer -i
Welcome to the Foreman installer!
--------------------------------- This wizard will gather all required information. You can change any parameter
to your needs. Ready to start? (y/n)
y Main Config Menu
. [✓] Configure foreman
. [✓] Configure foreman_cli
. [✗] Configure foreman_cli_discovery
. [✗] Configure foreman_cli_openscap
. [✗] Configure foreman_cli_remote_execution
. [✗] Configure foreman_cli_tasks
. [✗] Configure foreman_cli_templates
. [✓] Configure foreman_proxy
. [✓] Configure puppet
. [✗] Configure foreman_plugin_ansible
. [✗] Configure foreman_plugin_azure
. [✗] Configure foreman_plugin_bootdisk
. [✗] Configure foreman_plugin_chef
. [✗] Configure foreman_plugin_cockpit
. [✗] Configure foreman_plugin_default_hostgroup
. [✗] Configure foreman_plugin_dhcp_browser
. [✗] Configure foreman_plugin_digitalocean
. [✗] Configure foreman_plugin_discovery
. [✗] Configure foreman_plugin_docker
. [✗] Configure foreman_plugin_expire_hosts
. [✗] Configure foreman_plugin_hooks
. [✗] Configure foreman_plugin_host_extra_validator
. [✗] Configure foreman_plugin_memcache
. [✗] Configure foreman_plugin_monitoring
. [✗] Configure foreman_plugin_omaha
. [✗] Configure foreman_plugin_openscap
. [✗] Configure foreman_plugin_ovirt_provision
. [✗] Configure foreman_plugin_puppetdb
. [✗] Configure foreman_plugin_remote_execution
. [✗] Configure foreman_plugin_salt
. [✗] Configure foreman_plugin_setup
. [✗] Configure foreman_plugin_snapshot_management
. [✗] Configure foreman_plugin_tasks
. [✗] Configure foreman_plugin_templates
. [✗] Configure foreman_compute_ec2
. [✗] Configure foreman_compute_gce
. [✗] Configure foreman_compute_libvirt
. [✗] Configure foreman_compute_openstack
. [✗] Configure foreman_compute_ovirt
. [✗] Configure foreman_compute_rackspace
. [✗] Configure foreman_compute_vmware
. [✗] Configure foreman_proxy_plugin_abrt
. [✗] Configure foreman_proxy_plugin_ansible
. [✗] Configure foreman_proxy_plugin_chef
. [✗] Configure foreman_proxy_plugin_dhcp_infoblox
. [✗] Configure foreman_proxy_plugin_dhcp_remote_isc
. [✗] Configure foreman_proxy_plugin_discovery
. [✗] Configure foreman_proxy_plugin_dns_infoblox
. [✗] Configure foreman_proxy_plugin_dns_powerdns
. [✗] Configure foreman_proxy_plugin_dynflow
. [✗] Configure foreman_proxy_plugin_monitoring
. [✗] Configure foreman_proxy_plugin_omaha
. [✗] Configure foreman_proxy_plugin_openscap
. [✗] Configure foreman_proxy_plugin_pulp
. [✗] Configure foreman_proxy_plugin_remote_execution_ssh
. [✗] Configure foreman_proxy_plugin_salt
. Display current config
. Save and run
. Cancel run without Saving
Choose an option from the menu... 58 #我直接默认了,可以选这56项里面的,这里的58就是保存运行,然后下面就开始安装了
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%] [..........................................................................................................................................................]
Success!
* Foreman is running at https://www.puppet-foreman.com
Initial credentials are admin / tE6QmtZACaJzKYRB #这里是生成的随机密码,一会进去修改一下即可
* Foreman Proxy is running at https://www.puppet-foreman.com:8443
* Puppetmaster is running at port
The full log is at /var/log/foreman-installer/foreman.log
[root@www ~]#

    查看端口

 [root@www ~]# netstat -untlp
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 127.0.0.1: 0.0.0.0:* LISTEN /Passenger Rack
tcp 0.0.0.0: 0.0.0.0:* LISTEN /systemd
tcp 192.168.122.1: 0.0.0.0:* LISTEN /dnsmasq
tcp 0.0.0.0: 0.0.0.0:* LISTEN /sshd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /cupsd
tcp 127.0.0.1: 0.0.0.0:* LISTEN /postgres
tcp 127.0.0.1: 0.0.0.0:* LISTEN /master
tcp6 ::: :::* LISTEN /java
tcp6 ::: :::* LISTEN /systemd
tcp6 ::: :::* LISTEN /httpd
tcp6 ::: :::* LISTEN /sshd
tcp6 ::: :::* LISTEN /cupsd
tcp6 ::: :::* LISTEN /postgres
tcp6 ::: :::* LISTEN /master
tcp6 ::: :::* LISTEN /ruby
tcp6 ::: :::* LISTEN /httpd
udp 0.0.0.0: 0.0.0.0:* /avahi-daemon: r
udp 0.0.0.0: 0.0.0.0:* /dhclient
udp 0.0.0.0: 0.0.0.0:* /avahi-daemon: r
udp 192.168.122.1: 0.0.0.0:* /dnsmasq
udp 0.0.0.0: 0.0.0.0:* /dnsmasq
udp 0.0.0.0: 0.0.0.0:* /dhclient
udp 0.0.0.0: 0.0.0.0:* /xinetd
udp6 ::: :::* /dhclient
[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. React(八)样式及CSS模块化

    (1)内联样式 注:样式要采用驼峰命令发,如果非要使用原生css样式写法,需加引号 缺点:一些动画,伪类不能使用 class App extends Component { constructor(p ...

  2. angular.module()

    <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...

  3. G102040I

    傻逼题.我从来没见过eps这样的... 打破了我对计算几何美好的幻想. eps=1e-6=>wa3  eps=1e-8->wa2  eps 1e-4->AC 真的自闭,真的猜不到ep ...

  4. pyhton 监听文件输入实例

    def tail(filename): f = open(filename,encoding='utf-8') while True: line = f.readline() if line.stri ...

  5. react基础篇 整理(一)

    备注不知道为啥不能到出图片,详细知识自己百度一下就可以了,很简单的.画这个是为了更好的梳理知识,公司有个App项目,项目可控,所以尝试一下用React-native去做一下试试.

  6. linux 重新生成网卡配置文件

    nmcli connection add con-name home type ethernet ifname eth1 autoconnect yes ip4 10.1.252.60/24 gw4 ...

  7. oracle11G 用户密码180天修改概要文件过程

    oracle11G 用户密码180天修改概要文件过程 原因 创建用户的时候不指定概要文件的默认的概要文件是default, 而默认的概要文件中的设置如下,注意斜体部分 PROFILE RESOURCE ...

  8. 最简单的 nginx 负载均衡,只能演示,企业中最好不用

    修改nginx.conf 配置,重启nginx即可 upstream 包名{ ip_hash; #使用此功能,权重和备份都不能使用!一台机器永远只连同一台机子 server IP:端口 weight= ...

  9. 基本类型数据转换(int,char,byte)

    public class DataUtil { public static void main(String[] args) { int a = 8; int value = charToInt(by ...

  10. [Swift]LeetCode468. 验证IP地址 | Validate IP Address

    Write a function to check whether an input string is a valid IPv4 address or IPv6 address or neither ...