|
|
Line 1: |
Line 1: |
| {{header|qa}}
| | This page is obsolete. Go to [[AutoQA]]. |
| | |
| {{admon/warning|This page is outdated|Due some recent changes the following instructions may be pretty outdated. Expect troubles if you decide to follow them.}}
| |
| | |
| This guide will help you if you need to [[How to add autotest clients|add many autotest clients]] in the form of virtual machines and you want to automate the process as much as possible.
| |
| | |
| The process will automate these things for you:
| |
| # Create new virtual machine with libvirt
| |
| # Generate a proper [[Anaconda/Kickstart|kickstart]] file according to your preferences
| |
| # Automatically install Fedora, set up desired setting (serial console redirection, etc)
| |
| # Automatically add required repositories and install required packages
| |
| | |
| {{admon/note||If you need to install bare-metal clients, we don't have any handy script for you, but you can always use the kickstart generator described below. But be aware not all options from our kickstart may suit your needs - for example full disk erase.}}
| |
| | |
| == Get the tools ==
| |
| | |
| We have created several scripts which you can use. They are not stabilized yet, so you have to retrieve them from our git:
| |
| <pre>
| |
| $ git clone 'git://git.fedorahosted.org/autoqa.git'
| |
| $ cd autoqa
| |
| $ git checkout -b aqc origin/aqc
| |
| $ cd utils
| |
| </pre>
| |
| | |
| In the current directory you can now see {{filename|aqc-create.py}} script and {{filename|aqc-ks/}} directory (aqc is an acronym for '''A'''uto'''Q'''A '''c'''lient). {{filename|aqc-create.py}} is the main script you will want to use for AutoQA client installation, {{filename|aqc-ks/}} is a small web application for generating appropriate [[Anaconda/Kickstart|kickstarts]].
| |
| | |
| You also need to have {{package|libvirt}} installed:
| |
| <pre>
| |
| # yum install libvirt
| |
| </pre>
| |
| | |
| == Install the virtual AutoQA client ==
| |
| | |
| Just run
| |
| <pre>
| |
| # ./aqc-create.py --help
| |
| </pre>
| |
| to have an idea what can be done with this script.
| |
| | |
| A simple example would be:
| |
| <pre>
| |
| # ./aqc-create.py --name client1 --fedora 13
| |
| </pre>
| |
| That will create virtual machine with Fedora 13, your architecture, 512 MB RAM and storage in {{filename|/dev/vg_autoqa/client1}}. A lot of default values have been used here, you can change anything to your needs.
| |
| | |
| {{admon/warning|When you're not working for Red Hat|Currently this works out-of-the-box just for people inside the Red Hat intranet, because the kickstart generator web application is hosted there. If you are not in the Red Hat intranet, you will have to host the kickstart generator yourself and point to it with <code>--ks</code> option. Read more at [[#Hosting the kickstart generator]].}}
| |
| | |
| Let's see a more complex example:
| |
| <pre>
| |
| # ./aqc-create.py --name client2 --fedora 12 --arch i386 --ram 1024 --disk /tmp/client2.img --ks http://myserver/myks.cfg
| |
| </pre>
| |
| This will create virtual machine with Fedora 12, i386 architecture, 1024 MB RAM and storage in a file {{filename|/tmp/client2.img}} (not logical volume). Kickstart used for installation is retrieved from <code>http://myserver/myks.cfg</code>. Your kickstart must of course match provided options (correct repositories for chosen Fedora release, etc).
| |
| | |
| A few more important options are <code>--verbose</code> for increased verbosity, <code>--detach</code> for not attaching you to client's serial console during installation and <code>--dry</code> for not really executing anything, just simulating.
| |
| | |
| The script will print you some helpful messages before you connect and after you disconnect from client's serial console. Be sure not to miss them.
| |
| | |
| == Hosting the kickstart generator ==
| |
| The default kickstart generator is currently hosted inside Red Hat intranet:<br/>
| |
| http://test1173.test.redhat.com/wsgi/aqc-ks/aqc-ks
| |
| | |
| You may want to host your own, either because you are not inside Red Hat intranet, or you may want to do some changes. It is simple:
| |
| | |
| <ol>
| |
| <li>Install {{package|httpd}} and {{package|mod_wsgi}}.</li>
| |
| <li>Ensure your {{filename|/etc/httpd/conf.d/wsgi.conf}} looks something like this:
| |
| <pre>
| |
| LoadModule wsgi_module modules/mod_wsgi.so
| |
| | |
| <IfModule mod_wsgi.c>
| |
| WSGIScriptAlias /wsgi /var/www/wsgi/
| |
| <Directory /var/www/wsgi>
| |
| AllowOverride FileInfo
| |
| Options ExecCGI MultiViews Indexes FollowSymlinks
| |
| MultiviewsMatch Handlers
| |
| AddHandler wsgi-script .wsgi
| |
| AddHandler wsgi-script .py
| |
| | |
| Order allow,deny
| |
| Allow from all
| |
| </Directory>
| |
| </IfModule>
| |
| </pre></li>
| |
| <li>Create directory {{filename|/var/www/wsgi}}.</li>
| |
| <li>Copy {{filename|aqc-ks/}} directory to {{filename|/var/www/wsgi}}.</li>
| |
| <li>Restart <code>httpd</code> service.</li>
| |
| <li>Access your kickstart generator at http://your_host/wsgi/aqc-ks/aqc-ks.</li>
| |
| </ol>
| |
| | |
| Now you can use your own kickstart generator together with {{filename|aqc-create.py}} like this:
| |
| <pre>
| |
| # ./aqc-create.py ... --ks 'http://your_host/wsgi/aqc-ks/aqc-ks?release=%(fedora)s&arch=%(arch)s' ...
| |
| </pre>
| |
| | |
| [[Category:AutoQA]]
| |