Launch an Invenio instance — Invenio 3.1.2 documentation

# Launch an Invenio instance

## Prerequisites

To be able to develop and run Invenio you will need the following installed and configured on your system:

- Docker v1.18+ and Docker Compose v1.23+

- NodeJS v6.x+ and NPM v4.x+

- Enough virtual memory for Elasticsearch (when running in Docker).

- Cookiecutter

- Pipenv

Invenio uses Cookiecutter to scaffold the boilerplate for your new instance and uses Pipenv to manage Python dependencies in a virtual environment. Above links contain detailed installation instructions, but the impatient can use following commands:

    # Install cookiecutter if it is not already installed
    $ sudo apt-get install cookiecutter
    $ sudo apt-get install pipenv
    # or e.g.
    $ pip install --upgrade cookiecutter pipenv

## Scaffold

First step is to scaffold a new instance using the official Invenio cookiecutter template.

    $ cookiecutter gh:inveniosoftware/cookiecutter-invenio-instance --checkout v3.1
    # ...fill in the fields...

Note, the cookiecutter script will ask you to resolve some TODOs. These will be covered in the Next Steps section of this quick start guide.

The scaffolded instance comes by default with a toy example data model to help you get started.

## Install

Now that we have our instance’s source code ready we can proceed with the initial setup of the services and dependencies of the project:

First, fire up the database, Elasticsearch, Redis and RabbitMQ:

    $ cd my-site/
    $ docker-compose up -d
    Creating mysite_cache_1 ... done
    Creating mysite_db_1    ... done
    Creating mysite_es_1    ... done
    Creating mysite_mq_1    ... done

If the Elasticsearch service fails to start mentioning that it requires more virtual memory, see the following fix.

Next, activate the virtualenv of the new project by running:

    $ pipenv shell

Finally, install all dependencies, build the JS/CSS assets, create the database tables and create the Elasticsearch indices by running the bootstrap and setup scripts:

    (my-site)$ ./scripts/bootstrap
    (my-site)$ ./scripts/setup

## Run

You can now start the development web server and the background worker for your new Invenio instance:

    (my-site)$ ./scripts/server
    * Environment: development
    * Debug mode: on
    * Running on https://127.0.0.1:5000/ (Press CTRL+C to quit)

You can now visit https://127.0.0.1:5000/ !

### Continue tutorial

Create, Display, Search Records