Setup

Installing

The steps required to install the Seed Stage-based Messaging Service are:

  1. Get the code from the Github Project with git:

    $ git clone https://github.com/praekelt/seed-stage-based-messaging.git
    

    This will create a directory seed-stage-based-messaging in your current directory.

  1. Install the Python requirements with pip:

    $ pip install -r requirements.txt
    

    This will download and install all the Python packages required to run the project.

  2. Setup the database:

    $ python manage migrate
    

    This will create all the database tables required.

    Note

    The PostgreSQL database for the Seed Stage-based Messaging Store needs to exist before running this command. See STAGE_BASED_MESSAGING_DATABASE for details.

  3. Run the development server:

    $ python manage.py runserver
    

    Note

    This will run a development HTTP server. This is only suitable for testing and development, for production usage please see Running in Production

Configuration Options

The main configuration file is seed_stage_based_messaging/settings.py.

The following environmental variables can be used to override some default settings:

SECRET_KEY

This overrides the Django SECRET_KEY setting.

DEBUG

This overrides the Django DEBUG setting.

USE_SSL

Whether to use SSL when build absolute URLs. Defaults to False.

STAGE_BASED_MESSAGING_DATABASE

The database parameters to use as a URL in the format specified by the DJ-Database-URL format.

STAGE_BASED_MESSAGING_SENTRY_DSN

The DSN to the Sentry instance you would like to log errors to.

BROKER_URL

The Broker URL to use with Celery.

STAGE_BASED_MESSAGING_URL

The URL of the instance of the Seed Stage-based Messaging API that will be used when creating POST-back hooks to this service from other Seed services.

SCHEDULER_URL

The URL to the Seed Scheduler API instance.

SCHEDULER_API_TOKEN

The auth token to use to connect to the Seed Scheduler API instance above.

SCHEDULER_INBOUND_API_TOKEN

The auth token to use to connect to this Seed Stage-based Messaging API from POST-backs from the Seed Scheduler API instance.

IDENTITY_STORE_URL

The URL to the Seed Identity Store API instance.

IDENTITY_STORE_TOKEN

The auth token to use to connect to the Seed Identity Store API instance above.

MESSAGE_SENDER_URL

The URL to the Seed Message Sender API instance.

MESSAGE_SENDER_TOKEN

The auth token to use to connect to the Seed Message Sender API instance above.

METRICS_URL

The URL to the Go Metrics API instance to push metrics to.

METRICS_AUTH_TOKEN

The auth token to use to connect to the Go Metrics API above.