tuxology / events-manager

Events Manager is the administrative interface to events in the Rokwire Platform. Through this web application, users can manage existing events coming from calendars and/or create and manage user events.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Events Manager

The goal of the Events Manager is to provide a web interface to manage events in the Rokwire platform. This includes the crawling events from event sources, the approval of the events ingestion to Rokwire events building block and the visualization of the events, etc.

Run in Development Mode

MongoDB's service needs to be started and a Mongo Shell needs to be connected in a separate terminal instance

  • For MacOS
brew services start mongodb-community@4.2
mongo
  • Ubuntu (The daemon-reload command isn't required)
sudo systemctl daemon-reload
sudo systemctl start mongod
mongo

This repository should be put inside /events-manager and run outside the folder. There are two ways to do so:

The first one:

  • (Linux or MAC):
export FLASK_APP=events-manager
export FLASK_ENV=development
flask run
  • (Windows):
set FLASK_APP=eventsmanager
set FLASK_ENV=development
flask run

The second one:

  • create a file called .flaskenv
  • fill in file with:
    • FLASK_APP=__init__.py
    • FLASK_ENV=development
    • FLASK_DEBUG=1

Setup Environment

virtualenv -p python3 venv
source venv/bin/activate
pip install -r requirements.txt

Install pre-commit hooks

pip install -r requirements-dev.txt
pre-commit install

The following environment variables need to be set when running on development machine. This is not required when running within AWS.

AWS_ACCESS_KEY_ID=<AWS Access Key ID>
AWS_SECRET_ACCESS_KEY=<AWS Secret Access Key>

Run as Docker Container in Local

cd events-manager
./docker.sh
docker run --rm --name events -v $PWD/config.py:/app/events-manager/config.py -p 5000:5000 rokwire/events-manager

MongoDB Setup

MongoDB needs to be installed for the flask app to run and interface with a database

  • For MacOS, prerequisites are having XCode and Homebrew
brew tap mongodb/brew
brew install mongodb-community@4.2
  • For Ubuntu LTS releases
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -

The above should work, but in case a gnupg error is encountered

sudo apt-get install gnupg
wget -qO - https://www.mongodb.org/static/pgp/server-4.2.asc | sudo apt-key add -

Create a list file for MongoDB

echo "deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/4.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.2.list

Reload and Install

sudo apt-get update
sudo apt-get install -y mongodb-org

The template setup configuration exists in config.py.template, to run locally a new file config.py needs to be created accounting for changes based on your local environment setup.

About

Events Manager is the administrative interface to events in the Rokwire Platform. Through this web application, users can manage existing events coming from calendars and/or create and manage user events.

License:Apache License 2.0


Languages

Language:Python 49.2%Language:HTML 45.8%Language:CSS 3.6%Language:Shell 0.9%Language:Dockerfile 0.3%Language:JavaScript 0.2%