setup.rst 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. Installation & Configuration
  2. ============================
  3. Quick Install: Running in Docker
  4. --------------------------------
  5. You can run Lakesuperior in Docker for a hands-off quickstart.
  6. `Docker <http://docker.com/>`__ is a containerization platform that
  7. allows you to run services in lightweight virtual machine environments
  8. without having to worry about installing all of the prerequisites on
  9. your host machine.
  10. 1. Install the correct `Docker Community
  11. Edition <https://www.docker.com/community-edition>`__ for your
  12. operating system.
  13. 2. Clone the Lakesuperior git repository:
  14. ``git clone https://github.com/scossu/lakesuperior.git``
  15. 3. ``cd`` into repo folder
  16. 4. Run ``docker-compose up``
  17. Lakesuperior should now be available at ``http://localhost:8000/``.
  18. The provided Docker configuration includes persistent storage as a
  19. self-container Docker volume, meaning your data will persist between
  20. runs. If you want to clear the decks, simply run
  21. ``docker-compose down -v``.
  22. Manual Install (a bit less quick, a bit more power)
  23. ---------------------------------------------------
  24. **Note:** These instructions have been tested on Linux. They may work on
  25. Darwin with little modification, and possibly on Windows with some
  26. modifications. Feedback is welcome.
  27. Dependencies
  28. ~~~~~~~~~~~~
  29. #. Python 3.5 or greater.
  30. #. A message broker supporting the STOMP protocol. For testing and
  31. evaluation purposes, `CoilMQ <https://github.com/hozn/coilmq>`__ is
  32. included with the dependencies and should be automatically installed.
  33. Installation steps
  34. ~~~~~~~~~~~~~~~~~~
  35. Start in an empty project folder. If you are feeling lazy you can copy
  36. and paste the lines below in your console.
  37. ::
  38. mkdir lsup_env # Or whatever you want to call it
  39. cd lsup_env
  40. python3 -m venv .
  41. source bin/activate
  42. pip install lakesuperior
  43. # Start the message broker. If you have another
  44. # queue manager listening to port 61613 you can either configure a
  45. # different port on the application configuration, or use the existing
  46. # message queue.
  47. coilmq&
  48. # Bootstrap the repo
  49. echo yes | lsup-admin bootstrap
  50. # Run the thing
  51. fcrepo
  52. Test if it works::
  53. curl http://localhost:8000/ldp/
  54. Advanced Install
  55. ----------------
  56. A "developer mode" install is detailed in the
  57. :ref:`Development Setup<dev_setup>` section.
  58. Configuration
  59. -------------
  60. The app should run for testing and evaluation purposes without any
  61. further configuration. All the application data are stored by default in
  62. the ``data`` directory of the Python package.
  63. This setup is not recommended for anything more than a quick look at the
  64. application. If more complex interaction is needed, or upgrades to the package
  65. are foreseen, it is strongly advised to set up proper locations for
  66. configuration and data.
  67. To change the default configuration you need to:
  68. #. Copy the ``etc.default`` folder to a separate location
  69. #. Set the configuration folder location in the environment:
  70. ``export FCREPO_CONFIG_DIR=<your config dir location>`` (you can add
  71. this line at the end of your virtualenv ``activate`` script)
  72. #. Configure the application
  73. #. Bootstrap the app or copy the original data folders to the new
  74. location if any loction options changed
  75. #. (Re)start the server: ``fcrepo``
  76. The configuration options are documented in the files.
  77. One thing worth noting is that some locations can be specified as relative
  78. paths. These paths will be relative to the ``data_dir`` location specified in
  79. the ``application.yml`` file.
  80. If ``data_dir`` is empty, as it is in the default configuration, it defaults
  81. to the ``data`` directory inside the Python package. This is the option that
  82. one may want to change before anything else.
  83. Production deployment
  84. ---------------------
  85. If you like fried repositories for lunch, deploy before 11AM.