Skip to content

Latest commit

 

History

History
169 lines (112 loc) · 4.16 KB

INSTALL.rst

File metadata and controls

169 lines (112 loc) · 4.16 KB

RERO-ILS Installation

Services

This environment makes use of different services. In most of the cases, RERO is an organisation and a reroadmin user exists. As long as users can be defined as administrator, the account reroadmin won't be used, except if needed.

The services are:

Requirements

  • git
  • docker, docker-compose
  • python, pip, pyenv
  • pipenv

Installation

First you need to install pipenv, it will handle the virtual environment creation for the project in order to sandbox our Python environment, as well as manage the dependency installation, among other things.

Create your working directory and cd into it. Clone inside this directory the project:

$ git clone https://github.com/rero/rero-ils.git

Next, cd into the project directory and bootstrap the instance (this will install all Python dependencies and build all static assets):

$ cd rero-ils
$ ./scripts/bootstrap

Start all dependent services using docker-compose (this will start PostgreSQL, Elasticsearch 6, RabbitMQ and Redis):

$ docker-compose up -d

Make sure you have enough virtual memory for Elasticsearch in Docker:

# Linux
$ sysctl -w vm.max_map_count=262144

# macOS
$ screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty
<enter>
linut00001:~# sysctl -w vm.max_map_count=262144

Next, create database tables, search indexes and message queues:

$ ./scripts/setup

Running

Start the webserver and the celery worker:

$ ./scripts/server

Start a Python shell:

$ ./scripts/console

Upgrading

In order to upgrade an existing instance simply run:

$ ./scripts/update

Testing

Run the test suite via the provided script:

$ ./run-tests.sh

By default, end-to-end tests are skipped. You can include the E2E tests like this:

$ env E2E=yes ./run-tests.sh

For more information about end-to-end testing see pytest-invenio.

Documentation

You can build the documentation with:

$ pipenv run build_sphinx

Production environment

You can use simulate a full production environment using the docker-compose.full.yml. You can start it like this:

$ docker build --rm -t rero/rero-ils-base:latest -f Dockerfile.base .
$ docker-compose -f docker-compose.full.yml up -d

In addition to the normal docker-compose.yml, this one will start:

  • HAProxy (load balancer)
  • Nginx (web frontend)
  • UWSGI (application container)
  • Celery (background task worker)
  • Celery (background task beat)
  • Flower (Celery monitoring)