FAQ

Version 1 (Ohad Levy, 09/07/2009 03:01 pm)

1 1
h2. I'm not using Storeconfigs, how can I still use Torque?
2 1
3 1
Torque does not require puppet storeconfigs, however, Torque can work with puppet db schema natively as Torque extends it.
4 1
5 1
If you just want to import hosts inventory (facts), you can use the rake task:
6 1
<pre>RAILS_ENV=production rake puppet:import:hosts_and_facts</pre>
7 1
This will import your exists facts yaml file (defaults to vardir/yaml/facts), if you wish to import from another directory use:
8 1
<pre>RAILS_ENV=production rake puppet:import:hosts_and_facts dir=/my/dir/with/yaml/files</pre>
9 1
10 1
<b>*NOTE:*</b> its probably a good idea to clean up your yaml file directory, as you might have a lot of old data in there.
11 1
12 1
h2. I'm using Storeconfigs, how can I populate various settings in Torque that are required for hands free (unattended) installations?
13 1
14 1
<pre>RAILS_ENV=production rake puppet:migrate:populate_hosts</pre>
15 1
This will try to auto-generate all operating systems,  puppet environments etc into Torque's DB.
16 1
17 1
h2. How do I use unattended installations (Kickstart, jumpstart, preseed)?
18 1
19 1
Torque automates network boot processes using PXEboot (or native Solaris net:dhcp)
20 1
21 1
At this time, Torque does not support DHCP and DNS alteration, you would need to do those steps manually.
22 1
23 1
h3. TFTP
24 1
25 1
Torque has currently limited support for TFTP- that means it require the TFTP server to be accessible via the local file system.
26 1
future versions of Torque would allow remote TFTP servers as well.
27 1
28 1
make sure you add into your config/settings.yml
29 1
<pre> :tftppath: /var/lib/tftpboot/pxelinux.cfg</pre>
30 1
replace the value with your actual TFTP directory and ensure that the *user which executes Torque  have write access*.
31 1
32 1
33 1
h4. How does Torque manages TFTP?
34 1
35 1
When clicking on the Build button (in the host list), Torque would generate a link which will be automatically read by pxelinux,
36 1
This link would point to a predefined syslinux(pxelinux) boot file which would be based on the Operating System used.
37 1
38 1
after a successful OS installation, that link will be removed, and your default PXE settings will be served.
39 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.
40 1
41 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 
42 1
43 1
an example of a such a file for CentOS 5 32bit:
44 1
<pre><code>default linux
45 1
label linux
46 1
kernel boot/centos-5-32.vmlinuz
47 1
append initrd=boot/centos-5-32.initrd.img ks=http://ginihost/unattended/kickstart ksdevice=eth0 network kssendmac
48 1
</code></pre>
49 1
50 1
and another example for Ubuntu 9.04 32bit
51 1
<pre><code>default preseed
52 1
label preseed
53 1
kernel boot/ubuntu-9.04-32.linux
54 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 --
55 1
</code></pre>
56 1
57 1
h3. Whats inside the Kickstart / jumpstart /preseed ?
58 1
59 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.
60 1
 
61 1
if you want to see the kickstart/preseed etc you may use the spoof parameter, just point your browser to:
62 1
63 1
<pre>http://Torquehost:3000/unattended/kickstart?spoof=123.321.123.321</pre>
64 1
* 123.321.123.321 is the hosts IP Address (the one you want to build).
65 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.
66 1
* if you are using passenger please remove the ":3000" from the URL.
67 1
68 1
h3. Modifying the unattended template
69 1
70 1
You probably want to do minor teaks to your kickstart/jumpstart/preseed template (yeah the same kind puppet uses).
71 1
the template for can be found at:
72 1
RedHat based installation
73 1
<pre>app/view/unattended/kickstart.rhtml</pre>
74 1
Debian/Ubuntu installations 
75 1
<pre>app/view/unattended/preseed.rhtml</pre>
76 1
and a finish script
77 1
<pre>app/view/unattended/preseed_finish.rhtml</pre>
78 1
79 1
h3. PuppetCA
80 1
81 1
Torque will enable host autosign during provisioning time, that means, the user which executes Torque must have:
82 1
1. write access to /etc/puppet/autosign.conf
83 1
2. sudo access to run puppetca
84 1
85 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.
86 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.
87 1
88 1
89 1
h2. How do I use Torque with Puppet external nodes?
90 1
91 1
Torque Can provide parameters and class information to Puppet
92 1
Each host can be associated with multiple classes and can have multiple parameters (available via the edit hosts button).
93 1
94 1
under the  <b>extras/externalnodes</b> directory you would find an example script to query Torque DB.
95 1
You would need to setup puppet to use external nodes 
96 1
<pre><code>  external_nodes = /etc/puppet/node.rb
97 1
  node_terminus  = exec</code></pre>
98 1
For additional info please see "Puppet documentation":http://reductivelabs.com/trac/puppet/wiki/ExternalNodes
99 1
*You may also click on the YAML link to see the output that would be used for puppet external nodes.
100 1
101 1
h3. How to import my current classes from Puppet?
102 1
103 1
Torque can import all of the puppet classes directly from puppet just:
104 1
<pre><code>RAILS_ENV=production puppet:import:puppet_classes
105 1
</code></pre>
106 1
107 1
108 1
h2. Where is the DB?!
109 1
110 1
By default, Torque will use sqlite3 as a database, its configuration can be found at 
111 1
<pre>config/database.yml</pre>
112 1
By default, the  database can be found at the db subdirectory.
113 1
Torque is a rails application, therefor, anything that is supported under RAILS (sqlite, mysql, postsql, oracle etc) can be used.
114 1
115 1
h2. What about other operating systems?
116 1
117 1
Torque currently supports RedHat/Fedora, Debian/Ubuntu and Solaris Jumpstart
118 1
it has been successfully tested on CentOS 3,4,5 Fedora 10-11, Ubuntu 9.04 and Solaris 8-10 on Sparc.
119 1
120 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.
121 1
122 1
for Jumpstart support, as Solaris doesn't support nativity accessing the profile data dynamically, its required to create some workarounds
123 1
example for those are found at the *extras/jumpstart* directory.
124 1
You may find the dynamic profile and dynamic finish at the following URL's:
125 1
<pre><code>http://Torquehost:3000/unattended/jumpstart_profile
126 1
http://Torquehost:3000/unattended/jumpstart_finish</code></pre>
127 1
128 1
It is also required to add vendor options to your dhcp server if you plan to boot from network on the sparc platform.