Foreman on ubuntu: Unterschied zwischen den Versionen

Aus Xinux Wiki
Zur Navigation springen Zur Suche springen
(Die Seite wurde neu angelegt: „=Repositories= *apt-get -y install ca-certificates *wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb *dpkg -i puppetlabs-release-trusty.deb =Enabl…“)
 
 
(17 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Repositories=
+
=requirements=
 +
*/etc/network/interfaces
 +
<pre>
 +
auto lo
 +
iface lo inet loopback
 +
 
 +
auto eth0
 +
iface eth0 inet static
 +
address 192.168.252.5
 +
netmask 255.255.255.0
 +
gateway 192.168.252.1
 +
dns-nameservers 192.168.240.200
 +
dns-search xinux.org
 +
</pre>
 +
*/etc/hosts
 +
127.0.0.1 localhost
 +
192.168.252.5  toc.xinux.org toc
 +
=hostname test=
 +
*hostname  -f
 +
toc.xinux.org
 +
 
 +
=Install and configure isc-dhcp-server=
 +
*apt-get install isc-dhcp-server
 +
==sample config==
 +
<pre>
 +
ddns-update-style interim;
 +
ignore client-updates;
 +
authoritative;
 +
allow booting;
 +
allow bootp;
 +
omapi-port 7911;
 +
key omapi_key {
 +
        algorithm HMAC-MD5;
 +
        secret "2wgoV3yukKdKMkmOzOn/hIsM97QgLTT4CLVzg9Zv0sWOSe1yxPxArmr7a/xb5DOJTm5e/9zGgtzL9FKna0NWis==";
 +
}
 +
omapi-key omapi_key;
 +
subnet 192.168.252.0 netmask 255.255.255.0 {
 +
  option routers      192.168.252.1;
 +
  option subnet-mask  255.255.255.0;
 +
 
 +
  option domain-name    "xinux.org";
 +
  option domain-name-servers  192.168.240.200;
 +
  range dynamic-bootp 192.168.252.10 192.168.252.30;
 +
  default-lease-time 21600;
 +
  max-lease-time 43200;
 +
}
 +
</pre>
 +
==restart dhcp server==
 +
*service isc-dhcp-server restart
 +
isc-dhcp-server stop/waiting
 +
isc-dhcp-server start/running, process 1936
 +
 
 +
=Install Foreman=
 +
==Repositories==
 
*apt-get -y install ca-certificates
 
*apt-get -y install ca-certificates
 
*wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
 
*wget https://apt.puppetlabs.com/puppetlabs-release-trusty.deb
 
*dpkg -i puppetlabs-release-trusty.deb
 
*dpkg -i puppetlabs-release-trusty.deb
=Enable the Foreman repo=
+
==Enable the Foreman repo==
 
*echo "deb http://deb.theforeman.org/ trusty 1.9" > /etc/apt/sources.list.d/foreman.list
 
*echo "deb http://deb.theforeman.org/ trusty 1.9" > /etc/apt/sources.list.d/foreman.list
 
*echo "deb http://deb.theforeman.org/ plugins 1.9" >> /etc/apt/sources.list.d/foreman.list
 
*echo "deb http://deb.theforeman.org/ plugins 1.9" >> /etc/apt/sources.list.d/foreman.list
 
*wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add -
 
*wget -q http://deb.theforeman.org/pubkey.gpg -O- | apt-key add -
=Downloading the installer=
+
==Downloading the installer==
 
*apt-get update && apt-get -y install foreman-installer
 
*apt-get update && apt-get -y install foreman-installer
 +
=Install Foreman=
 +
==Basic installation==
 +
*foreman-installer
 +
<pre>
 +
Installing            Done                                              [100%] [..............................................................]
 +
  Success!
 +
  * Foreman is running at https://toc.xinux.org
 +
      Initial credentials are admin / 2Fbfr4EtrZLrHPjW
 +
  * Foreman Proxy is running at https://toc.xinux.org:8443
 +
  * Puppetmaster is running at port 8140
 +
  The full log is at /var/log/foreman-installer/foreman-installer.log
 +
</pre>
 +
==Downloading a Puppet module==
 +
*puppet module install -i /etc/puppet/environments/production/modules saz/ntp
 +
==Puppet agent==
 +
*puppet agent --test
 +
==activating dhcp proxy==
 +
*/etc/foreman-proxy/settings.d/dhcp.yml
 +
<pre>
 +
---
 +
:enabled: https
 +
:dhcp_vendor: isc
 +
:dhcp_subnets: [192.168.252.0/255.255.255.0]
 +
:dhcp_config: /etc/dhcp/dhcpd.conf
 +
:dhcp_leases: /var/lib/dhcp/dhcpd.leases
 +
:dhcp_key_name: omapi_key
 +
:dhcp_key_secret: 2wgoV3yukKdKMkmOzOn/hIsM97QgLTT4CLVzg9Zv0sWOSe1yxPxArmr7a/xb5DOJTm5e/9zGgtzL9FKna0NWis==
 +
:dhcp_omapi_port: 7911
 +
</pre>
 +
 +
==restart foreman proxy==
 +
*service foreman-proxy restart
 +
Restarting foreman-proxy foreman-proxy
 +
 +
=acticvate foreman on boot=                                                                                                 
 +
*/etc/default/foreman
 +
START=yes
 +
=restart foreman=
 +
*service foreman restart
 +
=weblogin=
 +
[[Datei:foreman1.png]]
 +
==go to smart proxy==
 +
[[Datei:foreman2.png]]
 +
 +
==absenden smart proxy==
 +
[[Datei:foreman3.png]]
 +
 +
 +
 +
[[Datei:foreman4.png]]
 +
 +
 +
 +
 +
[[Datei:foreman5.png]]
 +
 +
 +
 +
 +
 +
[[Datei:foreman6.png]]
 +
 +
 +
 +
 +
[[Datei:foreman7.png]]
 +
 +
 +
 +
[[Datei:foreman8.png]]
 +
 +
 +
[[Datei:foreman9.png]]
 +
 +
 +
 +
[[Datei:foreman10.png]]
 +
 +
 +
 +
[[Datei:foreman11.png]]
 +
 +
 +
 +
[[Datei:foreman12.png]]
 +
 +
 +
=Links=
 +
*http://www.gtkdb.de/index_34_2515.html

Aktuelle Version vom 11. Oktober 2017, 18:13 Uhr

requirements

  • /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
 address 192.168.252.5
 netmask 255.255.255.0
 gateway 192.168.252.1
 dns-nameservers 192.168.240.200
 dns-search xinux.org
  • /etc/hosts
127.0.0.1	localhost
192.168.252.5   toc.xinux.org toc

hostname test

  • hostname -f
toc.xinux.org

Install and configure isc-dhcp-server

  • apt-get install isc-dhcp-server

sample config

ddns-update-style interim;
ignore client-updates;
authoritative;
allow booting;
allow bootp;
omapi-port 7911;
key omapi_key {
        algorithm HMAC-MD5;
        secret "2wgoV3yukKdKMkmOzOn/hIsM97QgLTT4CLVzg9Zv0sWOSe1yxPxArmr7a/xb5DOJTm5e/9zGgtzL9FKna0NWis==";
}
omapi-key omapi_key;
subnet 192.168.252.0 netmask 255.255.255.0 {
  option routers      192.168.252.1;
  option subnet-mask  255.255.255.0;

  option domain-name    "xinux.org";
  option domain-name-servers  192.168.240.200;
  range dynamic-bootp 192.168.252.10 192.168.252.30;
  default-lease-time 21600;
  max-lease-time 43200;
}

restart dhcp server

  • service isc-dhcp-server restart
isc-dhcp-server stop/waiting
isc-dhcp-server start/running, process 1936

Install Foreman

Repositories

Enable the Foreman repo

Downloading the installer

  • apt-get update && apt-get -y install foreman-installer

Install Foreman

Basic installation

  • foreman-installer
Installing             Done                                               [100%] [..............................................................]
  Success!
  * Foreman is running at https://toc.xinux.org
      Initial credentials are admin / 2Fbfr4EtrZLrHPjW
  * Foreman Proxy is running at https://toc.xinux.org:8443
  * Puppetmaster is running at port 8140
  The full log is at /var/log/foreman-installer/foreman-installer.log

Downloading a Puppet module

  • puppet module install -i /etc/puppet/environments/production/modules saz/ntp

Puppet agent

  • puppet agent --test

activating dhcp proxy

  • /etc/foreman-proxy/settings.d/dhcp.yml
---
:enabled: https
:dhcp_vendor: isc
:dhcp_subnets: [192.168.252.0/255.255.255.0]
:dhcp_config: /etc/dhcp/dhcpd.conf
:dhcp_leases: /var/lib/dhcp/dhcpd.leases
:dhcp_key_name: omapi_key
:dhcp_key_secret: 2wgoV3yukKdKMkmOzOn/hIsM97QgLTT4CLVzg9Zv0sWOSe1yxPxArmr7a/xb5DOJTm5e/9zGgtzL9FKna0NWis==
:dhcp_omapi_port: 7911

restart foreman proxy

  • service foreman-proxy restart
Restarting foreman-proxy foreman-proxy

acticvate foreman on boot

  • /etc/default/foreman
START=yes

restart foreman

  • service foreman restart

weblogin

Foreman1.png

go to smart proxy

Foreman2.png

absenden smart proxy

Foreman3.png


Foreman4.png



Foreman5.png



Foreman6.png



Foreman7.png


Foreman8.png


Foreman9.png


Foreman10.png


Foreman11.png


Foreman12.png


Links