Mercurial > p > roundup > code
comparison doc/installation.txt @ 6555:34cbd0e633d2
Added FastCGI deployment info, updated Docker docs; docker-compose added
This moves the Docker files to the subdirectory scripts/Docker.
Attempted to provide a slightly guided install of a tracker using the
roundup_start script
It include the docker-compose.yml file donated by Norbert
Schlemmer. Hopefully I didn't break it when modifying it for it's new
home.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sun, 12 Dec 2021 19:19:52 -0500 |
| parents | e6ae8188f61a |
| children | c55d56ab9ee9 |
comparison
equal
deleted
inserted
replaced
| 6554:576d630fc908 | 6555:34cbd0e633d2 |
|---|---|
| 3 ================== | 3 ================== |
| 4 Installing Roundup | 4 Installing Roundup |
| 5 ================== | 5 ================== |
| 6 | 6 |
| 7 .. contents:: | 7 .. contents:: |
| 8 :depth: 2 | 8 :depth: 3 |
| 9 :local: | 9 :local: |
| 10 | 10 |
| 11 | 11 |
| 12 Overview | 12 Overview |
| 13 ======== | 13 ======== |
| 214 You can also use the ``--prefix`` option to use a completely different | 214 You can also use the ``--prefix`` option to use a completely different |
| 215 base directory, if you do not want to use administrator rights. If you | 215 base directory, if you do not want to use administrator rights. If you |
| 216 choose to do this, you may have to change Python's search path (sys.path) | 216 choose to do this, you may have to change Python's search path (sys.path) |
| 217 yourself. | 217 yourself. |
| 218 | 218 |
| 219 Creating a Docker Container | 219 Docker Support |
| 220 ~~~~~~~~~~~~~~~~~~~~~~~~~~~ | 220 ~~~~~~~~~~~~~~ |
| 221 | 221 |
| 222 If you don't want to install it natively, you can create a Docker | 222 If you don't want to install it natively, you can create a Docker |
| 223 container. This uses the Dockerfile in the scripts directory. The | 223 container. This installs roundup using the `stand-alone web server`_ |
| 224 roundup code in the distribuion and any changes will be used. The | 224 method. This is an http only install so we suggest putting an https |
| 225 build command is:: | 225 terminating proxy in front of it. |
| 226 | 226 |
| 227 docker build -t roundup-app --rm -f scripts/Dockerfile . | 227 This is a work in progress and patches to improve it are welcome. You |
| 228 | 228 can find the docker config files under the `scripts/Docker` directory |
| 229 It supports the following backends: anydbm, sqlite, mysql and | 229 of the source tree. |
| 230 postgresql. Mysql and postgresql support hasn't been tested, but the | 230 |
| 231 Python modules are built and available. See scripts/requirement.txt | 231 The dockerized Roundup includes database drivers for anydbm, sqlite, |
| 232 for the additional modules that are installed. | 232 MySQL and Postgresql (Postgresl is untested). It also includes |
| 233 | 233 additional libraries that are listed in |
| 234 If you want to build a docker from the latest release on PyPI, you can | 234 `scripts/Docker/requirements.txt`. |
| 235 use:: | 235 |
| 236 Email support is a work in progress. Outgoing email should work given | |
| 237 an external SMTP server. Reciving email should work by using a | |
| 238 scheduled (cron) job to access email: | |
| 239 | |
| 240 * `As a regular job using a mailbox source`_ | |
| 241 * `As a regular job using a POP source`_ | |
| 242 * `As a regular job using an IMAP source`_ | |
| 243 | |
| 244 Patches for better email support are welcome. | |
| 245 | |
| 246 If you want to use a MySQL backend, the `docker-compose.yml` file will | |
| 247 deploy a Roundup container and a MySQL container backend for use with | |
| 248 Roundup. | |
| 249 | |
| 250 Building a Docker Container | |
| 251 ^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| 252 | |
| 253 To build a docker container using the code in the current directory, | |
| 254 run this build command from the top of the source tree:: | |
| 255 | |
| 256 docker build -t roundup-app -f scripts/Docker/Dockerfile . | |
| 257 | |
| 258 You can also build a container using the newest Roundup release on | |
| 259 PyPI, by running:: | |
| 236 | 260 |
| 237 docker build -t roundup-app --build-arg="source=pypi" \ | 261 docker build -t roundup-app --build-arg="source=pypi" \ |
| 238 --rm -f scripts/Dockerfile . | 262 -f scripts/Docker/Dockerfile . |
| 239 | 263 |
| 240 Once the docker is created, run it with:: | 264 The docker declares a single volume mounted at |
| 241 | 265 ``/usr/src/app/tracker`` inside the container. You will mount your |
| 242 docker run --rm -p 9017:8080 \ | 266 tracker home directory at this location. |
| 243 -v /.../issue.tracker:/usr/src/app/tracker \ | 267 |
| 244 roundup-app:latest | 268 |
| 245 | 269 Configuring Roundup in the Container |
| 246 This will make the tracker available at: | 270 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 247 ``http://yourhost:9017/issues/``. | 271 |
| 272 Once the docker is created using one of the build commands above, run | |
| 273 an interactive session it with:: | |
| 274 | |
| 275 docker run -it --rm -p 9017:8080 \ | |
| 276 -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest | |
| 277 | |
| 278 The ``-v`` option maps a directory from the host into the docker | |
| 279 container. Note that uid 1000 is used by roundup. So the uid of the | |
| 280 directory (and all files under it) must be uid 1000. This example | |
| 281 assumes your tracker configs are in the tracker subdirectory. Replace | |
| 282 ``$PWD/tracker`` with the full path name to the directory where the | |
| 283 tracker home(s) are to be stored. | |
| 248 | 284 |
| 249 The ``-p`` option maps an external port (9017) to proxy the roundup | 285 The ``-p`` option maps an external port (9017) to proxy the roundup |
| 250 server running at port 8080 to the outside. The ``-v`` option maps a | 286 server running at port 8080 to the outside. |
| 251 directory from the host into the docker container. It should be a | 287 |
| 252 tracker home directory. Note that uid 1000 is used by roundup. So the | 288 If the tracker directory is empty, the docker container will prompt |
| 253 uid of the directory must be 1000. | 289 you to install a tracker template and prompt you for the database |
| 290 type. | |
| 291 | |
| 292 Once you have edited and configured ``template/config.ini``, (see | |
| 293 `Configuring your first tracker`) run another interactive session | |
| 294 with:: | |
| 295 | |
| 296 docker run --rm -it -p 9017:8080 \ | |
| 297 -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest | |
| 298 | |
| 299 this will initialize the database and attempt to start the server. If | |
| 300 that is successful, use control-c to exit the server. | |
| 301 | |
| 302 Now start the server non-interactively (note no `-it` option) with:: | |
| 303 | |
| 304 docker run -p 9017:8080 \ | |
| 305 -v $PWD/tracker:/usr/src/app/tracker roundup-app:latest | |
| 306 | |
| 307 Your tracker will be available at: ``http://yourhost:9017/issues/``. | |
| 308 | |
| 309 If you need to access your container while the server is running you | |
| 310 can use:: | |
| 311 | |
| 312 docker exec -it c0d5 sh | |
| 313 | |
| 314 where ``c0d5`` is the id prefix for the running container obtained | |
| 315 from ``docker container ls``. | |
| 316 | |
| 317 Non-Guided Installation | |
| 318 ''''''''''''''''''''''' | |
| 319 | |
| 320 If you got a tracker installed using the automatic setup above, you | |
| 321 can skip this section. To manually install and initialize the | |
| 322 trackers, you can get a shell without starting the roundup-server | |
| 323 using:: | |
| 324 | |
| 325 docker run -it \ | |
| 326 -v $PWD/tracker:/usr/src/app/tracker \ | |
| 327 --entrypoint sh roundup-app:latest | |
| 328 | |
| 329 Now you can configure your tracker using ``roundup-admin -i tracker`` | |
| 330 using the directions for `Configuring your first tracker`. | |
| 331 | |
| 332 Defining Multiple Trackers | |
| 333 ^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
| 254 | 334 |
| 255 If you want to run multiple trackers, create a subdirectory for each | 335 If you want to run multiple trackers, create a subdirectory for each |
| 256 tracker home under the volume mount point. Then invoke ``docker run`` | 336 tracker home under the volume mount point (``$PWD/tracker``). Then |
| 257 passing the roundup-server tracker specifications like:: | 337 invoke ``docker run`` passing the roundup-server tracker |
| 338 specifications like:: | |
| 258 | 339 |
| 259 docker run --rm -p 9017:8080 \ | 340 docker run --rm -p 9017:8080 \ |
| 260 -v /.../issue.tracker:/usr/src/app/tracker \ | 341 -v /.../issue.tracker:/usr/src/app/tracker \ |
| 261 roundup-app:latest tracker1=tracker1_home tracker2=tracker2_home | 342 roundup-app:latest tracker1=tracker/tracker1_home \ |
| 262 | 343 tracker2=tracker/tracker2_home |
| 263 | 344 |
| 264 This will set up two trackers that can be reached at | 345 This will set up two trackers that can be reached at |
| 265 ``http://yourhost:9017/tracker1/`` and ``http://yourhost:9017/tracker2/``. | 346 ``http://yourhost:9017/tracker1/`` and ``http://yourhost:9017/tracker2/``. |
| 266 | 347 The arguments after roundup-app:latest are tracker paths that are |
| 267 If you need to install and initialize the trackers, you can get a | 348 passed to roundup-server. |
| 268 shell without starting the roundup-server using:: | 349 |
| 269 | 350 Docker-compose Deployment |
| 270 docker run -it \ | 351 ^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 271 -v /.../issue.tracker:/usr/src/app/tracker \ | 352 |
| 272 --entrypoint sh roundup-app:latest | 353 If you want to run using the mysql backend, you can use docker-compose |
| 273 | 354 with ``scripts/Docker/docker-compose.yml``. This will run Roundup and |
| 274 Now you can configure your tracker using ``roundup-admin -i tracker`` | 355 MySQL in containers. Directions for building using docker-compose are |
| 275 using the directions below. | 356 at the top of the yml file. |
| 276 | |
| 277 If you need to access your container while the server is running you | |
| 278 can use:: | |
| 279 | |
| 280 docker exec -it c0d5 sh | |
| 281 | |
| 282 where ``c0d5`` is the id prefix for the running container. | |
| 283 | 357 |
| 284 Configuring your first tracker | 358 Configuring your first tracker |
| 285 ------------------------------ | 359 ------------------------------ |
| 286 | 360 |
| 287 1. To create a Roundup tracker (necessary to do before you can | 361 1. To create a Roundup tracker (necessary to do before you can |
| 450 Configure a Web Interface | 524 Configure a Web Interface |
| 451 ------------------------- | 525 ------------------------- |
| 452 | 526 |
| 453 There are multiple web interfaces to choose from: | 527 There are multiple web interfaces to choose from: |
| 454 | 528 |
| 455 1. `web server cgi-bin`_ | 529 .. contents:: |
| 456 2. `cgi-bin for limited-access hosting`_ | 530 :depth: 1 |
| 457 3. `stand-alone web server`_ | 531 :local: |
| 458 4. `Zope product - ZRoundup`_ | |
| 459 5. `Apache HTTP Server with mod_wsgi`_ | |
| 460 6. `Apache HTTP Server with mod_python`_ (deprecated) | |
| 461 7. `Nginx HTTP Server`_ | |
| 462 8. `WSGI Variations`_ | |
| 463 | 532 |
| 464 You may need to give the web server user permission to access the tracker home | 533 You may need to give the web server user permission to access the tracker home |
| 465 - see the `UNIX environment steps`_ for information. You may also need to | 534 - see the `UNIX environment steps`_ for information. You may also need to |
| 466 configure your system in some way - see `platform-specific notes`_. | 535 configure your system in some way - see `platform-specific notes`_. |
| 467 | 536 |
| 1003 } | 1072 } |
| 1004 } | 1073 } |
| 1005 } | 1074 } |
| 1006 | 1075 |
| 1007 | 1076 |
| 1077 FastCGI (Cherokee, Hiawatha, lighttpd) | |
| 1078 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |
| 1079 | |
| 1080 The Hiawatha and lighttpd web servers can run Roundup using FastCGI. | |
| 1081 Cherokee can run FastCGI but it also supports wsgi directly using a | |
| 1082 uWSGI, Gnuicorn etc. | |
| 1083 | |
| 1084 To run Roundup suing FastCGI, the flup_ package can be used under | |
| 1085 Python 2 and Python 3. We don't have a detailed config for this, but | |
| 1086 the basic idea can be found at: | |
| 1087 https://flask.palletsprojects.com/en/2.0.x/deploying/fastcgi/ | |
| 1088 | |
| 1089 If you have deployed Roundup using FastCGI and flup we welcome example | |
| 1090 configuration files and instructions. | |
| 1091 | |
| 1092 .. _flup: https://pypi.org/project/flup/ | |
| 1093 | |
| 1008 WSGI Variations | 1094 WSGI Variations |
| 1009 ~~~~~~~~~~~~~~~ | 1095 ~~~~~~~~~~~~~~~ |
| 1010 | 1096 |
| 1011 .. index:: triple: web interface; apache; mod_wsgi | 1097 .. index:: triple: web interface; apache; mod_wsgi |
| 1012 single: wsgi; apache | 1098 single: wsgi; apache |
