VirtualBox

source: vbox/trunk/src/VBox/ValidationKit/testmanager/readme.txt@ 100762

Last change on this file since 100762 was 82938, checked in by vboxsync, 5 years ago

TestManager/readme.txt,db/Makefile.kmk: Detail the steps necessary to set up the test manager using MacPorts.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.7 KB
Line 
1$Id: readme.txt 82938 2020-01-31 00:10:15Z vboxsync $
2
3Directory descriptions:
4 ./ The Test Manager.
5 ./batch/ Batch scripts to be run via cron.
6 ./cgi/ CGI scripts (we'll use standard CGI at first).
7 ./core/ The core Test Manager logic (model).
8 ./htdocs/ Files to be served directly by the web server.
9 ./htdocs/css/ Style sheets.
10 ./htdocs/images/ Graphics.
11 ./webui/ The Web User Interface (WUI) bits. (Not sure if we will
12 do model-view-controller stuff, though. Time will show.)
13
14I. Running a Test Manager instance with Docker:
15
16 - This way should be preferred to get a local Test Manager instance running
17 and is NOT meant for production use!
18
19 - Install docker-ce and docker-compose on your Linux host (not tested on
20 Windows yet). Your user must be able to run the Docker CLI (see Docker documentation).
21
22 - Type "kmk" to get the containers built, "kmk start|stop" to start/stop them
23 respectively. To start over, use "kmk clean". For having a peek into the container
24 logs, use "kmk logs".
25
26 To administrate / develop the database, an Adminer instance is running at
27 http://localhost:8080
28
29 To access the actual Test Manager instance, go to http://localhost:8080/testmanager/
30
31 - There are two ways of doing development with this setup:
32
33 a. The Test Manager source is stored inside a separate data volume called
34 "docker_vbox-testmgr-web". The source will be checked out automatically on
35 container initialization. Development then can take part within that data
36 container. The initialization script will automatically pull the sources
37 from the public OSE tree, so make sure this is what you want!
38
39 b. Edit the (hidden) .env file in this directory and change VBOX_TESTMGR_DATA
40 to point to your checked out VBox root, e.g. VBOX_TESTMGR_DATA=/path/to/VBox/trunk
41
42
43II. Steps for manually setting up a local Test Manager instance for development:
44
45 - Install apache, postgresql, python, psycopg2 (python) and pylint.
46
47 - Create the database by executing 'kmk load-testmanager-db' in
48 the './db/' subdirectory. The default psql parameters there
49 requies pg_hba.conf to specify 'trust' instead of 'peer' as the
50 authentication method for local connections.
51
52 - Use ./db/partial-db-dump.py on the production system to extract a
53 partial database dump (last 14 days).
54
55 - Use ./db/partial-db-dump.py with the --load-dump-into-database
56 parameter on the development box to load the dump.
57
58 - Configure apache using the ./apache-template-2.4.conf (see top of
59 file for details), for example:
60
61 Define TestManagerRootDir "/mnt/scratch/vbox/svn/trunk/src/VBox/ValidationKit/testmanager"
62 Define VBoxBuildOutputDir "/tmp"
63 Include "${TestManagerRootDir}/apache-template-2.4.conf"
64
65 Make sure to enable cgi (a2enmod cgi && systemctl restart apache2).
66
67 - Default htpasswd file has users a user 'admin' with password 'admin' and a
68 'test' user with password 'test'. This isn't going to get you far if
69 you've loaded something from the production server as there is typically
70 no 'admin' user in the 'Users' table there. So, you will need to add your
71 user and a throwaway password to 'misc/htpasswd-sample' using the htpasswd
72 utility.
73
74 - Try http://localhost/testmanager/ in a browser and see if it works.
75
76
77III. OS X version of the above manual setup using MacPorts:
78
79 - sudo ports install apache2 postgresql12 postgresql12-server py38-psycopg2 py38-pylint
80 sudo port select --set python python38
81 sudo port select --set python3 python38
82 sudo port select --set pylint pylint38
83
84 Note! Replace the python 38 with the most recent one you want to use. Same
85 for the 12 in relation to postgresql.
86
87 - Do what the postgresql12-server notes says, at the time of writing:
88 sudo mkdir -p /opt/local/var/db/postgresql12/defaultdb
89 sudo chown postgres:postgres /opt/local/var/db/postgresql12/defaultdb
90 sudo su postgres -c 'cd /opt/local/var/db/postgresql12 && /opt/local/lib/postgresql12/bin/initdb -D /opt/local/var/db/postgresql12/defaultdb'
91 sudo port load postgresql12-server
92
93 Note! The postgresql12-server's config is 'trust' already, so no need to
94 edit /opt/local/var/db/postgresql12/defaultdb/pg_hba.conf there. If
95 you use a different version, please check it.
96
97 - kmk load-testmanager-db
98
99 - Creating and loading a partial database dump as detailed above.
100
101 - Configure apache:
102 - sudo joe /opt/local/etc/apache2/httpd.conf:
103 - Uncomment the line "LoadModule cgi_module...".
104 - At the end of the file add (edit paths):
105 Define TestManagerRootDir "/Users/bird/coding/vbox/svn/trunk/src/VBox/ValidationKit/testmanager"
106 Define VBoxBuildOutputDir "/tmp"
107 Include "${TestManagerRootDir}/apache-template-2.4.conf"
108 - Test the config:
109 /opt/local/sbin/apachectl -t
110 - So apache will find the right python add the following to
111 /opt/local/sbin/envvars:
112 PATH=/opt/local/bin:/opt/local/sbin:$PATH
113 export PATH
114 - Load the apache service (or reload it):
115 sudo port load apache2
116 - Give apache access to read everything under TestManagerRootDir:
117 chmod -R a:rX /Users/bird/coding/vbox/svn/trunk/src/VBox/ValidationKit/testmanager
118 MYDIR=/Users/bird/coding/vbox/svn/trunk/src/VBox/ValidationKit; while [ '!' "$MYDIR" '<' "$HOME" ]; do \
119 chmod a+x "$MYDIR"; MYDIR=`dirname $MYDIR`; done
120
121 - Fix htpasswd file as detailed above and try the url (also above).
122
123
124N.B. For developing tests (../tests/), setting up a local test manager will be
125 a complete waste of time. Just run the test drivers locally.
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette