@@ -8,116 +8,38 @@ of two main parts, a web application for accessing and visualizing performance
88data, and command line utilities to allow users to generate and submit test
99results to the server.
1010
11- The package was originally written for use in testing LLVM compiler
12- technologies, but is designed to be usable for the performance testing of any
13- software.
14-
15- If you are an LLVM developer who is mostly interested in just using LNT to run
16- the test-suite against some compiler, then you should fast forward to the
17- :ref: `quickstart ` or to the information on :ref: `tests `.
18-
19- LNT uses a simple and extensible format for interchanging data between the test
20- producers and the server; this allows the LNT server to receive and store data
21- for a wide variety of applications.
11+ The package was originally written for use in testing LLVM compiler technologies,
12+ but is designed to be usable for the performance testing of any software. LNT uses
13+ a simple and extensible format for interchanging data between the test producers and
14+ the server; this allows the LNT server to receive and store data for a wide variety
15+ of applications.
2216
2317Both the LNT client and server are written in Python, however the test data
2418itself can be passed in one of several formats, including property lists and
2519JSON. This makes it easy to produce test results from almost any language.
2620
21+ .. _installation :
2722
2823Installation
2924------------
3025
31- If you are only interested in using LNT to run tests locally, see the
32- :ref: `quickstart `.
33-
34- If you want to run an LNT server, you will need to perform the following
35- additional steps:
36-
37- 2. Create a new LNT installation::
38-
39- lnt create path/to/install-dir
40-
41- This will create the LNT configuration file, the default database, and a
42- .wsgi wrapper to create the application. You can execute the generated app
43- directly to run with the builtin web server, or use::
44-
45- lnt runserver path/to/install-dir
46-
47- which provides additional command line options. Neither of these servers is
48- recommended for production use.
49-
50- 3. Edit the generated 'lnt.cfg' file if necessary, for example to:
51-
52- a. Update the databases list.
53-
54- b. Update the public URL the server is visible at.
55-
56- c. Update the nt_emailer configuration.
57-
58- 4. Add the 'lnt.wsgi' app to your Apache configuration. You should set also
59- configure the WSGIDaemonProcess and WSGIProcessGroup variables if not
60- already done.
61-
62- If running in a virtualenv you will need to configure that as well; see the
63- `modwsgi wiki <http://code.google.com/p/modwsgi/wiki/VirtualEnvironments >`_.
64-
65- For production servers, you should consider using a full DBMS like PostgreSQL.
66- To create an LNT instance with PostgreSQL backend, you need to do this instead:
26+ You can install the latest stable release of LNT from PyPI. We recommend doing
27+ that from a virtual environment::
6728
68- 1. Create an LNT database in PostgreSQL, also make sure the user has
69- write permission to the database::
29+ python3 -m venv .venv
30+ source .venv/bin/activate
31+ pip install llvm-lnt
7032
71- CREATE DATABASE "lnt.db"
33+ This will install the client-side tools. If you want to run a production server,
34+ you should instead install ``llvm-lnt `` while including the server-side optional
35+ requirements::
7236
73- 2. Then create LNT installation::
37+ pip install "llvm-lnt[server]"
7438
75- lnt create path/to/install-dir --db-dir postgresql://user@host
39+ That's it! `` lnt `` should now be accessible from the virtual environment.
7640
77- 3. Run server normally::
78-
79- lnt runserver path/to/install-dir
80-
81- Architecture
82- ------------
83-
84- The LNT web app is currently implemented as a Flask WSGI web app, with Jinja2
85- for the templating engine. My hope is to eventually move to a more AJAXy web
86- interface.
87-
88- The database layer uses SQLAlchemy for its ORM, and is typically backed by
89- SQLite, although I have tested on MySQL on the past, and supporting other
90- databases should be trivial. My plan is to always support SQLite as this allows
91- the possibility of developers easily running their own LNT installation for
92- viewing nightly test results, and to run with whatever DB makes the most sense
93- on the server.
94-
95- Running a LNT Server Locally
96- ----------------------------
97-
98- LNT can accommodate many more users in the production config. In production:
99- - Postgres or MySQL should be used as the database.
100- - A proper wsgi server should be used, in front of a proxy like Nginx or Apache.
101-
102- To install the extra packages for the server config::
103-
104- virtualenv venv
105- . ./venv/bin/activate
106- pip install -r requirements.server.txt
107- lnt create path/to/data_dir --db-dir postgresql://user@host # data_dir path will be where lnt data will go.
108- cd deployment
109- # Now edit app_wrapper.py to have your path/to/data_dir path and the log-file below.
110- gunicorn app_wrapper:app --bind 0.0.0.0:8000 --workers 8 --timeout 300 --name lnt_server --log-file /var/log/lnt/lnt.log --access-logfile /var/log/lnt/gunicorn_access.log --max-requests 250000
111-
112-
113- Running a LNT Server via Docker
114- -------------------------------
115-
116- We provide a Docker Compose setup with Docker containers that can be used to
117- easily bring up a fully working production server within minutes. The container
118- can be built and run with::
119-
120- docker compose --file docker/compose.yaml --env-file <secrets> up
121-
122- ``<secrets> `` should be the path to a file containing environment variables
123- required by the containers. Please refer to the Docker Compose file for details.
41+ If you are an LLVM developer who is mostly interested in just using LNT to run
42+ the test-suite against some compiler, then you should fast forward to the section
43+ on :ref: `running tests <tests >`. If you want to run your own LNT server, jump to
44+ the section on :ref: `running a server <running_server >`. Otherwise, jump to the
45+ :ref: `table of contents <contents >` to get started.
0 commit comments