Project

General

Profile

FAQ » History » Version 65

Dominic Cleal, 07/17/2015 05:29 AM
hiera

1 13 Ohad Levy
{{toc}}
2 1 Ohad Levy
3 51 Kal Aeolian
h1. Common Issues
4 51 Kal Aeolian
5 51 Kal Aeolian
h2. I can't login with the 'admin' account and 'rake permissions:reset' gives me an error.
6 51 Kal Aeolian
7 52 Kal Aeolian
Your account was created without an FQDN email address. Login to your SQL server and run "update users set mail='admin@example.com' where login='admin';"
8 51 Kal Aeolian
9 53 Kal Aeolian
h2. I'm getting a 400 from my foreman-proxy when trying to:
10 53 Kal Aeolian
11 53 Kal Aeolian
h3. Allocate DHCP addresses.
12 53 Kal Aeolian
13 53 Kal Aeolian
Make sure both dhcpd.conf and the dhcp leases file are both readable by your foreman-proxy user.
14 53 Kal Aeolian
15 53 Kal Aeolian
h3. Run Puppet CA
16 53 Kal Aeolian
17 53 Kal Aeolian
Puppet needs special sudo permissions. Pay close attention to the manual at this section - http://theforeman.org/manuals/1.2/index.html#4.3.2SmartProxySettings - specifically, "Puppet Certificate Authority Section".
18 53 Kal Aeolian
19 51 Kal Aeolian
h1. Other FAQ
20 51 Kal Aeolian
21 62 Dominic Cleal
h2. Does Foreman support Puppet 4?
22 62 Dominic Cleal
23 62 Dominic Cleal
Support for Puppet 4 needs a lot of work, especially due to the AIO packaging changes, work on updating installer modules etc.  Please join the foreman-dev list/IRC channel if you're interested in helping!
24 62 Dominic Cleal
25 63 Dominic Cleal
#8447 tracks overall tasks and progress.
26 63 Dominic Cleal
27 46 Greg Sutcliffe
h2. Does Foreman support Puppet 3?
28 1 Ohad Levy
29 62 Dominic Cleal
Support for Puppet 3 has been added in Foreman 1.1 (proxy and web UI).  The [[PuppetThreeWorkarounds]] page has additional details about pre-1.1 issues.
30 46 Greg Sutcliffe
31 59 Dominic Cleal
h2. Upgrade puppet from v2 to v3 gotchas
32 55 Joop van de Wege
33 55 Joop van de Wege
/etc/sudoers.d/foreman-proxy still contains the old puppet commands which will cause the provision URL not to work, errors will be in /var/log/foreman-proxy/proxy.log about sudo failing, error in /var/log/foreman/production.log is about Failed to remove hosts.domain.com's puppet certificate: 406 Not Acceptable. Solution is to edit the file and change its content to:
34 55 Joop van de Wege
<pre>
35 55 Joop van de Wege
foreman-proxy ALL = NOPASSWD : /usr/bin/puppet cert *, /usr/bin/puppet kick *
36 55 Joop van de Wege
Defaults:foreman-proxy !requiretty
37 55 Joop van de Wege
</pre>
38 1 Ohad Levy
Might need a service restart, server reboot certainly works.
39 59 Dominic Cleal
40 59 Dominic Cleal
The config.ru file used for Passenger also changes.  Update the @/etc/puppet/rack/config.ru@ file as per the "Puppet release notes":http://docs.puppetlabs.com/puppet/3/reference/release_notes.html#break-puppet-master-rack-configuration-is-changed diff.
41 55 Joop van de Wege
42 48 Ken Barber
h2. How does Foreman work with PuppetDB?
43 48 Ken Barber
44 48 Ken Barber
Foreman does not use PuppetDB, nor does PuppetDB use Foreman. While they can both be used at the same time if you wish, there is no integration between these two tools.
45 48 Ken Barber
46 48 Ken Barber
In the past Foreman used to use the ActiveRecord based Storeconfigs setup, to access facts but this is now deprecated (see [[Puppet Facts]] for the correct way to configure this now).
47 48 Ken Barber
48 48 Ken Barber
Reports can now be stored in PuppetDB (since version 1.1.0) but Foreman uses its own report storage to present reports to you, and will not use the reports stored in PuppetDB.
49 48 Ken Barber
50 50 Ohad Levy
If you wish to use an alternative to PuppetDB exported resources, you can utilize foreman search API - see "This Blog Entry":http://blog.theforeman.org/2012/01/getting-foreman-search-results-into.html
51 48 Ken Barber
52 57 Dominic Cleal
The "puppetdb_foreman plugin":https://github.com/cernops/puppetdb_foreman can be used to deactivate nodes in PuppetDB automatically when they are deleted from Foreman's database.
53 57 Dominic Cleal
54 44 Romain Vrignaud
h2. I'm not using Storeconfigs, how can I still use Foreman?
55 1 Ohad Levy
56 17 Ohad Levy
See [[Puppet Facts]]
57 1 Ohad Levy
58 42 Romain Vrignaud
h2. I'm using Storeconfigs, how can I populate various settings in Foreman that are required for hands free (unattended) installations?
59 1 Ohad Levy
60 1 Ohad Levy
See [[Puppet Facts]]
61 42 Romain Vrignaud
62 22 Ohad Levy
h2. I don't want to use Foreman for unattended installations can I disable it?
63 1 Ohad Levy
64 46 Greg Sutcliffe
see [[Unattended_installations#Deactivation]]
65 37 Romain Vrignaud
66 42 Romain Vrignaud
h2. How can I migrate from an other External Node Classifier to Foreman ?
67 18 Ohad Levy
68 18 Ohad Levy
see [[External Nodes#Import-your-external-node-setup-from-an-older-external-node-setup]]
69 1 Ohad Levy
70 42 Romain Vrignaud
h2. How do I configure my database ?
71 35 Romain Vrignaud
72 1 Ohad Levy
see [[Database configuration]]
73 44 Romain Vrignaud
74 44 Romain Vrignaud
h2. Can I switch from SQLite to MySQL and keep my data ?
75 44 Romain Vrignaud
76 44 Romain Vrignaud
see [[Database_configuration]]
77 20 Ohad Levy
78 54 Lukas Zapletal
h2. How do I start a Rails Console?
79 54 Lukas Zapletal
80 54 Lukas Zapletal
Use
81 54 Lukas Zapletal
82 54 Lukas Zapletal
    cd /usr/share/foreman
83 54 Lukas Zapletal
    rails console
84 54 Lukas Zapletal
85 54 Lukas Zapletal
or if you use RHEL6
86 54 Lukas Zapletal
87 54 Lukas Zapletal
    scl enable ruby193 "rails console"
88 54 Lukas Zapletal
89 54 Lukas Zapletal
Warning: Make a backup of your data if you are going to commit any data changes via console.
90 54 Lukas Zapletal
91 60 Kjell Teirlynck
h2. How do I log my Foreman environments to a different location other than '/var/log'?
92 60 Kjell Teirlynck
<pre>
93 60 Kjell Teirlynck
cd ~foreman/config/environments
94 60 Kjell Teirlynck
vi production.rb
95 60 Kjell Teirlynck
</pre>
96 60 Kjell Teirlynck
97 60 Kjell Teirlynck
Add the following line
98 60 Kjell Teirlynck
<pre>
99 60 Kjell Teirlynck
config.paths["log"] = "/new/log/directory/#{Rails.env}.log"
100 60 Kjell Teirlynck
</pre>
101 60 Kjell Teirlynck
102 60 Kjell Teirlynck
Production.log will now be found and updated at the path specified. Remember to update your logrotations.
103 60 Kjell Teirlynck
Repeat for other environments.
104 60 Kjell Teirlynck
105 64 Jacob Sohl
h2. What is a good set of API permissions for the AWS account used by Foreman?
106 64 Jacob Sohl
107 64 Jacob Sohl
This is a safe place to start. (Written in AWS IAM syntax.)
108 64 Jacob Sohl
109 64 Jacob Sohl
<pre>
110 64 Jacob Sohl
{"Version": "xxx",
111 64 Jacob Sohl
"Statement": [{ "Effect": "Allow", "Action": [
112 64 Jacob Sohl
"ec2:DescribeInstances",
113 64 Jacob Sohl
"ec2:DescribeInstanceStatus",
114 64 Jacob Sohl
"ec2:DescribeImages",
115 64 Jacob Sohl
"ec2:DescribeKeyPairs",
116 64 Jacob Sohl
"ec2:DescribeSecurityGroups",
117 64 Jacob Sohl
"ec2:DescribeAvailabilityZones",
118 64 Jacob Sohl
"ec2:DescribeRegions",
119 64 Jacob Sohl
"ec2:DescribeInstanceAttribute",
120 64 Jacob Sohl
"ec2:DescribeAddresses",
121 64 Jacob Sohl
"ec2:DescribeTags",
122 64 Jacob Sohl
"ec2:DescribeSubnets",
123 64 Jacob Sohl
"ec2:DescribeVolumes",
124 64 Jacob Sohl
"ec2:DescribeVolumeStatus",
125 64 Jacob Sohl
"ec2:CreateTags",
126 64 Jacob Sohl
"ec2:CreateVolume",
127 64 Jacob Sohl
"ec2:CreateNetworkInterface",
128 64 Jacob Sohl
"ec2:CreateKeyPair",
129 64 Jacob Sohl
"ec2:RunInstances",
130 64 Jacob Sohl
"ec2:StopInstances",
131 64 Jacob Sohl
"ec2:StartInstances",
132 64 Jacob Sohl
"ec2:TerminateInstances",
133 64 Jacob Sohl
"ec2:AttachVolume",
134 64 Jacob Sohl
"ec2:AssociateAddress",
135 64 Jacob Sohl
"ec2:DestroyKeyPair",
136 64 Jacob Sohl
"ec2:GetConsoleOutput"
137 64 Jacob Sohl
], "Resource": "*" }]}
138 64 Jacob Sohl
</pre>
139 64 Jacob Sohl
140 42 Romain Vrignaud
h2. What about other operating systems?
141 5 Ohad Levy
142 40 Romain Vrignaud
see [[Other_operating_system]]
143 14 Ohad Levy
144 42 Romain Vrignaud
h2. Will Foreman manage non OpenSource services (e.g. DNS/DHCP etc) ?
145 14 Ohad Levy
146 36 Romain Vrignaud
Yes! we understand that many enterprises relay on non opensource infrastrucutre as well. We support MS DNS and DHCP services
147 14 Ohad Levy
If you have any additional requirements, please enter a feature request.
148 14 Ohad Levy
149 42 Romain Vrignaud
h2. Whats planned for the next major release?
150 1 Ohad Levy
151 34 Romain Vrignaud
See the "roadmap":http://theforeman.org/projects/foreman/roadmap
152 14 Ohad Levy
153 34 Romain Vrignaud
If you want additional features, please open a new feature request "here":http://theforeman.org/projects/foreman/issues/new !
154 45 Romain Vrignaud
155 45 Romain Vrignaud
h2. I want to contribute, how can I do ?
156 45 Romain Vrignaud
157 45 Romain Vrignaud
see [[Contribute]]
158 61 Dominic Cleal
159 61 Dominic Cleal
h2. How do I create resources or use defined types in Foreman?
160 61 Dominic Cleal
161 61 Dominic Cleal
See [[Instantiate_Puppet_resources]]
162 65 Dominic Cleal
163 65 Dominic Cleal
h2. Does Foreman work with Hiera?
164 65 Dominic Cleal
165 65 Dominic Cleal
Yes, you can use either or both.  Puppet can get class parameter values from an ENC such as Foreman, or from Hiera.  The choice of which to use depends on what your aims and requirements are - see "this Ask Puppet":https://ask.puppetlabs.com/question/527/are-hiera-and-foreman-parameters-mutually-exclusive/ question and answer for a comparison.
166 65 Dominic Cleal
167 65 Dominic Cleal
If a parameter is set to "Override" in Foreman and is given a value, then Puppet will use this value.  If the "Use Puppet default" checkbox is ticked either for the default value or for a host override, then Foreman won't send a value.  Click "YAML" on a host page to check, or run node.rb.
168 65 Dominic Cleal
169 65 Dominic Cleal
If Foreman isn't supplying a value then Puppet will try Hiera or other data bindings, then will use the class default value if set.  Set up your Hiera configuration, usually at /etc/puppet/hiera.yaml (often this is a symlink to/from /etc/hiera.yaml) and it should work as normal.