summaryrefslogtreecommitdiffstats
path: root/README.network_test_server.txt
blob: 9cfdeebe135d3477faf8098c7c9223a1c4348dd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
HOW TO USE THIS REPOSITORY FOR A NETWORK TEST SERVER
====================================================

This README is a fast-track for those who only want to set up a network
test server for use with Qt's network autotests.  Check `README' for
more general details about this repo.


== Phase 1: basic machine setup

Obtain a physical or virtual machine, with an IPv4 interface available.

Suggested specs are at least:

 RAM:  512MB
 CPUs: 1
 Storage: 8GB

Install Ubuntu 10.04, preferably with no GUI.

During installation, set the hostname to `qt-test-server'.

Set root password to anything you like.

When prompted for a non-root user account, use "qt" as the username with
any password you like.

Don't enable automatic updates.

Don't install any extra packages (except openssh-server, if you need it).

Fix apt-sources.list to point to active repositories:

# sed -i 's/security.ubuntu.com/old-releases.ubuntu.com/' /etc/apt/sources.list

The machine needs outbound access to the Internet for accessing this git
repository and Ubuntu package repositories, and needs to accept inbound
access on whatever local network contains the device(s) on which you'll
be running Qt network tests.
If this requires more than one network interface for your setup, you must
ensure that the eth0 interface is set up as the interface which Qt network
tests will connect to.

USE A TRUSTED NETWORK ONLY!  The test server uses trivial weak passwords
and runs open proxies!


== Phase 2: puppet setup

It is recommended that you watch the system log during this step.
For example, run `tail -f /var/log/syslog &' before proceeding.

From this git repo, put bootstrap/ubuntu1004_bootstrap.sh onto the machine,
and run it with bash.

# bash ./ubuntu1004_bootstrap.sh git://code.qt.io/qtqa/sysadmin.git

This will install and run puppet.

An interactive configure script should ask you what type of host you are trying
to configure.  Select the 'network_test_server' option.

If all went well, you should have seen many entries in syslog about
puppet setting up various things.  Puppet will now be run periodically
to enforce correct setup of the machine (see `crontab -l') and automatically
track changes to this git repository.

Due to minor bootstrap issues, in order to complete the setup it will most
likely be necessary to run puppet a second time.  You may wait for this to
happen `naturally' or manually run /var/qtqa/sysadmin/puppet/sync_and_run.pl .

It is recommended to reboot the machine after the initial puppet setup to
ensure that all services are correctly launched after boot, and that no outdated
configuration files remain in use.

As a brief test to see if the server is working, you can try the networkselftest
Qt autotest.  On a machine _other_ than the network test server, put the test server
IP address into /etc/hosts with short and full name, e.g. :

  192.168.1.30  qt-test-server  qt-test-server.qt-test-net

...and run the networkselftest testcase from Qt; if everything is set up
correctly, it should 100% pass.