Here’s an explanation of how to install foreman on ubuntu 12.04.
just referred to http://theforeman.org/manuals/1.1/index.html#2.Quickstart
many thanks!
logs including trial and error.
root@ubuntu-foreman:~# tail -1 /etc/lsb-release
DISTRIB_DESCRIPTION="Ubuntu 12.04.2 LTS"
root@ubuntu-foreman:~# uname -ri
3.2.0-39-generic x86_64
|
before installing foreman , install puppet.
# apt-get install -y puppet
root@ubuntu-foreman:~# echo "deb http://deb.theforeman.org/ precise stable" > /e
tc/apt/sources.list.d/foreman.list
root@ubuntu-foreman:~# cat /etc/apt/sources.list.d/foreman.list
deb http://deb.theforeman.org/ precise stable
root@ubuntu-foreman:~# wget -q http://deb.theforeman.org/foreman.asc -O- | apt-key add –
root@ubuntu-foreman:~# apt-get update;apt-get install foreman-installer -y
|
install foreman
error
oot@ubuntu-foreman:~# ruby /usr/share/foreman-installer/generate_answers.rb
Welcome to the Foreman Installer!
---------------------------------
This installer will help you set up Foreman and the associated extra
configuration necessary to get you up and running. There is an interactive shell
which will ask you questions, but if you just want to get up and running as fast
as possible, answer 'yes' to the all-in-one install at the beginning
Ready to start? (y/n)
y
Do you want to use the default all-in-one setup?
This will configure Foreman, Foreman-Proxy, Puppet (including a puppetmaster),
several puppet environments, TFTP (for provisioning) and sudo (for puppet
certificate management) (y/n)
y
Do you want to run Puppet now with these settings? (y/n)
y
warning: Could not retrieve fact fqdn
Failed to parse template foreman/foreman-vhost.conf.erb: Could not find value for 'fqdn' at 4:/usr/share/foreman-installer/foreman/templates/foreman-vhost.conf.erb at /usr/share/foreman-installer/foreman/manifests/config/passenger.pp:7 on node ubuntu-foreman
Okay, you're all set! Check
/usr/share/foreman-installer/foreman_installer/answers.yaml for your
config.
You can apply it in the future as root with:
echo include foreman_installer | puppet apply --modulepath
/usr/share/foreman-installer -v
|
domain is not configured..
root@ubuntu-foreman:~# hostname –fqdn
ubuntu-foreman
root@ubuntu-foreman:~# hostname --doain
root@ubuntu-foreman:~#
|
edit hosts file and reboot the OS
root@ubuntu-foreman:~# cat /etc/hosts
127.0.0.1 localhost
#127.0.1.1 ubuntu-foreman
127.0.1.1 ubuntu-foreman.localdomain ubuntu-foreman
root@ubuntu-foreman:~# cat /etc/hostname
ubuntu-foreman
# reboot
|
after rebooting the OS
root@ubuntu-foreman:~# hostname --domain
localdomain
root@ubuntu-foreman:~# hostname --fqdn
ubuntu-foreman.localdomain
|
still face the same error..
root@ubuntu-foreman:~# echo include foreman_installer | puppet apply --modulepath /usr/share/foreman-installer -v
warning: Could not retrieve fact fqdn
Failed to parse template foreman/foreman-vhost.conf.erb: Could not find value for 'fqdn' at 4:/usr/share/foreman-installer/foreman/templates/foreman-vhost.conf.erb at /usr/share/foreman-installer/foreman/manifests/config/passenger.pp:7 on node ubuntu-foreman
|
how about this ?
add “domain localdomain” in resolv.conf
root@ubuntu-foreman:~# cat /etc/resolv.conf
nameserver 127.0.0.1
domain localdomain
|
Okay.
root@ubuntu-foreman:~# ruby /usr/share/foreman-installer/generate_answers.rb --v
erbose
Welcome to the Foreman Installer!
---------------------------------
This installer will help you set up Foreman and the associated extra
configuration necessary to get you up and running. There is an interactive shell
which will ask you questions, but if you just want to get up and running as fast
as possible, answer 'yes' to the all-in-one install at the beginning
Ready to start? (y/n)
y
Do you want to use the default all-in-one setup?
This will configure Foreman, Foreman-Proxy, Puppet (including a puppetmaster),
several puppet environments, TFTP (for provisioning) and sudo (for puppet
certificate management) (y/n)
y
Do you want to run Puppet now with these settings? (y/n)
y
info: Applying configuration version '1363687657'
<snip>
cause of failed dependencies
info: Creating state file /var/lib/puppet/state/state.yaml
notice: Finished catalog run in 148.98 seconds
Okay, you're all set! Check
/usr/share/foreman-installer/foreman_installer/answers.yaml for your
config.
You can apply it in the future as root with:
echo include foreman_installer | puppet apply --modulepath
/usr/share/foreman-installer -v
root@ubuntu-foreman:~# echo $?
0
root@ubuntu-foreman:~#
|
start foreman
error
root@ubuntu-foreman:~# /etc/init.d/foreman start
foreman not configured to start. Please edit /etc/default/foreman to enable.
|
edit /etc/default/foreman
root@ubuntu-foreman:~# cat /etc/default/foreman
### File managed with puppet ###
## Served by: 'undefined'
## Module: 'foreman'
## Template source: 'MODULES/foreman/templates/foreman.default.erb'
# Start foreman on boot?
#START=no
START=yes
<snip>
|
start foreman
root@ubuntu-foreman:~# /etc/init.d/foreman restart
* Restarting foreman Libvirt binding are missing - hypervisor management is disabled
[ OK ]
|
access to the foreman with browser
https://<foreman IP>
user : admin
password : changeme
I have not installed foreman-xx packages yet.
so the next step is configuring these packages to manage hypervisor machines.
# apt-cache search foreman
foreman-compute - metapackage providing fog dependencies for Foreman (for Amazon EC2 support)
foreman-console - metapackage providing console dependencies for Foreman
foreman-devel - metapackage providing development dependencies for Foreman
foreman-fog - metapackage providing fog dependencies for Foreman (for Amazon EC2 support)
foreman-installer - no description given
foreman-libvirt - metapackage providing libvirt dependencies for Foreman
foreman-mysql2 - metapackage providing mysql2 dependencies for Foreman
foreman-mysql - metapackage providing MySQL dependencies for Foreman
foreman-ovirt - metapackage providing ovirt dependencies for Foreman
foreman-pgsql - metapackage providing PostgreSQL dependencies for Foreman
foreman-postgresql - metapackage providing PostgreSQL dependencies for Foreman
foreman-proxy - RESTful proxies for DNS, DHCP, TFTP, and Puppet
foreman-sqlite3 - metapackage providing sqlite dependencies for Foreman
foreman-test - metapackage providing test dependencies for Foreman
foreman-vmware - metapackage providing vmware dependencies for Foreman
foreman - Systems management web interface
|
Hi,
ReplyDeleteI'm using Ubuntu 12.04 64. I installed foreman as is described in Manual->QuickStart->Installation. Of course I used apt-get.
After that I opened Foreman web page. I added proxy. Then I tried to run:
sudo puppet agent --test
But I get this:
info: Retrieving plugin
err: /File[/var/lib/puppet/lib]: Could not evaluate: Could not retrieve information from environment production source(s) puppet://vb-kerberos-ubuntu-1204-64.mydomain.pl/plugins
err: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find node 'vb-kerberos-ubuntu-1204-64.mydomain.pl'; cannot compile
warning: Not using cache on failed catalog
err: Could not retrieve catalog; skipping run
I know that first error is related with pluginsync. And I can turn of it by 'pluginsync = false' in puppet.conf. But I can't find solution for second error.
I run agent --test on the same system where I installed foreman. I can ping: vb-kerberos-ubuntu-1204-64.mydomain.pl.
Did you have the same problem?