FAQ

Version 9 (Ohad Levy, 09/08/2009 05:00 am)

1 3 Ohad Levy
h1. Frequently Asked Questions
2 3 Ohad Levy
3 3 Ohad Levy
4 2 Ohad Levy
{{toc}}
5 2 Ohad Levy
6 5 Ohad Levy
h1. I'm not using Storeconfigs, how can I still use Torque?
7 1
8 1
Torque does not require puppet storeconfigs, however, Torque can work with puppet db schema natively as Torque extends it.
9 1
10 1
If you just want to import hosts inventory (facts), you can use the rake task:
11 1
<pre>RAILS_ENV=production rake puppet:import:hosts_and_facts</pre>
12 1
This will import your exists facts yaml file (defaults to vardir/yaml/facts), if you wish to import from another directory use:
13 1
<pre>RAILS_ENV=production rake puppet:import:hosts_and_facts dir=/my/dir/with/yaml/files</pre>
14 1
15 4 Ohad Levy
*NOTE:* its probably a good idea to clean up your yaml file directory, as you might have a lot of old data in there.
16 1
17 5 Ohad Levy
h1. I'm using Storeconfigs, how can I populate various settings in Torque that are required for hands free (unattended) installations?
18 1
19 1
<pre>RAILS_ENV=production rake puppet:migrate:populate_hosts</pre>
20 1
This will try to auto-generate all operating systems,  puppet environments etc into Torque's DB.
21 1
22 5 Ohad Levy
h1. How do I use unattended installations (Kickstart, jumpstart, preseed)?
23 1
24 1
Torque automates network boot processes using PXEboot (or native Solaris net:dhcp)
25 1
26 1
At this time, Torque does not support DHCP and DNS alteration, you would need to do those steps manually.
27 1
28 5 Ohad Levy
h2. TFTP
29 1
30 1
Torque has currently limited support for TFTP- that means it require the TFTP server to be accessible via the local file system.
31 1
future versions of Torque would allow remote TFTP servers as well.
32 1
33 1
make sure you add into your config/settings.yml
34 1
<pre> :tftppath: /var/lib/tftpboot/pxelinux.cfg</pre>
35 1
replace the value with your actual TFTP directory and ensure that the *user which executes Torque  have write access*.
36 1
37 1
38 5 Ohad Levy
h3. How does Torque manages TFTP?
39 1
40 1
When clicking on the Build button (in the host list), Torque would generate a link which will be automatically read by pxelinux,
41 1
This link would point to a predefined syslinux(pxelinux) boot file which would be based on the Operating System used.
42 1
43 1
after a successful OS installation, that link will be removed, and your default PXE settings will be served.
44 1
The idea behind it is to set the boot order on each host to always boot from network, and then change the settings via Torque.
45 1
46 1
This avoids the need to press F12 on each machine just to reinstall it, Clicking on Build in Torque will trigger a host re-installation upon the next server reboot if default boot order is PXE 
47 1
48 1
an example of a such a file for CentOS 5 32bit:
49 6 Ohad Levy
<pre>default linux
50 1
label linux
51 1
kernel boot/centos-5-32.vmlinuz
52 1
append initrd=boot/centos-5-32.initrd.img ks=http://ginihost/unattended/kickstart ksdevice=eth0 network kssendmac
53 6 Ohad Levy
</pre>
54 1
55 1
and another example for Ubuntu 9.04 32bit
56 6 Ohad Levy
<pre>default preseed
57 1
label preseed
58 1
kernel boot/ubuntu-9.04-32.linux
59 1
append initrd=boot/ubuntu-9.04-32.initrd.gz ramdisk_size=10800 root=/dev/rd/0 rw auto preseed/url=http://ginihost/unattended/preseed console-keymaps-at/keymap=us locale=en_US interface=eth0 DEBCONF_PRIORITY=critical netcfg/dhcp_timeout=60 --
60 6 Ohad Levy
</pre>
61 1
62 5 Ohad Levy
h2. Whats inside the Kickstart / jumpstart /preseed ?
63 1
64 1
These files are all generated dynamically based on the setting of each host in Torque, things like partition tables and root password can be unique per server.
65 1
 
66 1
if you want to see the kickstart/preseed etc you may use the spoof parameter, just point your browser to:
67 1
68 1
<pre>http://Torquehost:3000/unattended/kickstart?spoof=123.321.123.321</pre>
69 6 Ohad Levy
 
70 1
* 123.321.123.321 is the hosts IP Address (the one you want to build).
71 1
* usually you want to see the page source, the browser might display the file in html which will result in hard to read output.
72 1
* if you are using passenger please remove the ":3000" from the URL.
73 1
74 5 Ohad Levy
h2. Modifying the unattended template
75 1
76 1
You probably want to do minor teaks to your kickstart/jumpstart/preseed template (yeah the same kind puppet uses).
77 1
the template for can be found at:
78 1
RedHat based installation
79 1
<pre>app/view/unattended/kickstart.rhtml</pre>
80 1
Debian/Ubuntu installations 
81 1
<pre>app/view/unattended/preseed.rhtml</pre>
82 1
and a finish script
83 1
<pre>app/view/unattended/preseed_finish.rhtml</pre>
84 1
85 5 Ohad Levy
h2. PuppetCA
86 1
87 1
Torque will enable host autosign during provisioning time, that means, the user which executes Torque must have:
88 1
1. write access to /etc/puppet/autosign.conf
89 1
2. sudo access to run puppetca
90 1
91 1
Once a host (which is enabled for build) is requesting a kickstart/jumpstart etc than an entry would be created in the autosign.conf file.
92 1
Each operating system will run puppetd after the OS installation but before the first reboot, this will acquire the puppet certificate, then the host will notify Torque that it has finished the installation, and Torque will remove the entry from the autosign file automatically.
93 1
94 1
95 5 Ohad Levy
h1. How do I use Torque with Puppet external nodes?
96 1
97 8 Ohad Levy
see [[External Nodes]]
98 1
99 5 Ohad Levy
h1. Where is the DB?!
100 1
101 1
By default, Torque will use sqlite3 as a database, its configuration can be found at 
102 1
<pre>config/database.yml</pre>
103 1
By default, the  database can be found at the db subdirectory.
104 1
Torque is a rails application, therefor, anything that is supported under RAILS (sqlite, mysql, postsql, oracle etc) can be used.
105 1
106 5 Ohad Levy
h1. What about other operating systems?
107 1
108 1
Torque currently supports RedHat/Fedora, Debian/Ubuntu and Solaris Jumpstart
109 1
it has been successfully tested on CentOS 3,4,5 Fedora 10-11, Ubuntu 9.04 and Solaris 8-10 on Sparc.
110 1
111 1
If you have any other operating system you would like to see added to Torque, please contact us and we would be happy to add it.
112 1
113 1
for Jumpstart support, as Solaris doesn't support nativity accessing the profile data dynamically, its required to create some workarounds
114 1
example for those are found at the *extras/jumpstart* directory.
115 1
You may find the dynamic profile and dynamic finish at the following URL's:
116 1
<pre><code>http://Torquehost:3000/unattended/jumpstart_profile
117 1
http://Torquehost:3000/unattended/jumpstart_finish</code></pre>
118 1
119 1
It is also required to add vendor options to your dhcp server if you plan to boot from network on the sparc platform.