setup.rst 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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:
  23. Manual Install (a bit less quick, a bit more power)
  24. ---------------------------------------------------
  25. **Note:** These instructions have been tested on Linux. They may work on
  26. Darwin with little modification, and possibly on Windows with some
  27. modifications. Feedback is welcome.
  28. Dependencies
  29. ~~~~~~~~~~~~
  30. #. Python 3.5 or greater.
  31. #. A message broker supporting the STOMP protocol. For testing and
  32. evaluation purposes, `CoilMQ <https://github.com/hozn/coilmq>`__ is
  33. included with the dependencies and should be automatically installed.
  34. Installation steps
  35. ~~~~~~~~~~~~~~~~~~
  36. #. Create a virtualenv in a project folder:
  37. ``virtualenv -p <python 3.5+ exec path> <virtualenv folder>``
  38. #. Activate the virtualenv: ``source <path_to_virtualenv>/bin/activate``
  39. #. Clone this repo:
  40. ``git clone https://github.com/scossu/lakesuperior.git``
  41. #. ``cd`` into repo folder
  42. #. Install dependencies: ``pip install -r requirements.txt``
  43. - (Optional) For a development server, install additional dependencies:
  44. ``pip install -r requirements_dev.txt``. These include some heavyweight
  45. packages needed for development and testing but not for regular operation.
  46. #. Start your STOMP broker, e.g.: ``coilmq &``.
  47. - If you have another
  48. queue manager listening to port 61613 you can either configure a
  49. different port on the application configuration, or use the existing
  50. message queue.
  51. #. Make sure that the ``lsup-admin`` and ``fcrepo`` files are executable.
  52. #. Run ``./lsup-admin bootstrap`` to initialize the binary and graph
  53. stores.
  54. #. Run ``./fcrepo``.
  55. Configuration
  56. -------------
  57. The app should run for testing and evaluation purposes without any
  58. further configuration. All the application data are stored by default in
  59. the ``data`` directory.
  60. To change the default configuration you should:
  61. 1. Copy the ``etc.skeleton`` folder to a separate location
  62. 2. Set the configuration folder location in the environment:
  63. ``export FCREPO_CONFIG_DIR=<your config dir location>`` (you can add
  64. this line at the end of your virtualenv ``activate`` script)
  65. 3. Configure the application
  66. 4. Bootstrap the app or copy the original data folders to the new
  67. location if any loction options changed
  68. 5. (Re)start the server: ``./fcrepo``
  69. The configuration options are documented in the files.
  70. **Note:** ``test.yml`` must specify a different location for the graph
  71. and for the binary stores than the default one, otherwise running a test
  72. suite will destroy your main data store. The application will issue an
  73. error message and refuse to start if these locations overlap.
  74. Production deployment
  75. ---------------------
  76. If you like fried repositories for lunch, deploy before 11AM.