||2 weeks ago|
|docker_data||2 weeks ago|
|docs/architecture||3 weeks ago|
|mystic||2 weeks ago|
|stack||2 weeks ago|
|.drone.yml||3 weeks ago|
|.editorconfig||2 months ago|
|.gitignore||4 weeks ago|
|.gitlab-ci.yml||3 weeks ago|
|Dockerfile||2 weeks ago|
|README.md||2 weeks ago|
|config.example.cfg||2 weeks ago|
|development-database.docker-compose.yml||4 weeks ago|
|pyproject.toml||2 months ago|
|setup.py||2 weeks ago|
Mystic is your hub for open source everything. Community is central to every open source project, whether it's open source, open science, or anything else in the open ecosystem. Mystic is your tool to build that community. Anyone in the community can submit what they've been working on and immediately have access to a homepage for their project, CHAOSS community/software health metrics, and visibility within the community — letting them do amazing work among a strong community.
MYSTIC IS NOT YET SUITABLE TO BE RUN IN A PRODUCTION ENVIRONMENT
Mystic is configured through a config file, by default mystic.cfg, although by setting
MYSTIC_CONFIG other config files can be set.
An example config file can be found in
config.example.yml. You are encouraged to copy this file to
config.yml and use it as a base.
All configuration options are case sensitive and must be in all capitals. The following configuration options are available:
- DATABASE: Information about the MySQL database to connect to. See the Database section
- PROJECTS_FILE: Mystic outputs a json file compatible with grimoirelab's
projecs.jsonfile, the location been can be set through this file
- **SAML_***: See the section on SAML
- SECRET_KEY: Set this to some random string, and keep it secure
- SERVER_NAME: The domain that the server will be served on (optional)
Mystic was designed to run with a MySQL database, so that it could be efficiently paired with the grimoirelab stack. The connection details can be specified through a dictionary passed through the DATABASE config option. This dictionary needs the following keys:
- host: The hostname of the server the MySQL database is running on. This assumes port 3306.
- user: The user that mystic should connect as. Should not be
- password: The database password to use when connecting. The password of the user defined above
- database: The database to store data in.
For development and self-hosting, a docker-compose file is provided (
development-database.docker-compose.yml) that can be used to easily set up a database without any fiddling. To do this, simply:
docker-composeon your system
- Start the docker daemon (typically, this means running
sudo systemctl start docker)
- Run the docker compose file (
sudo docker-compose up -f development-database.docker-compose.yml -d)
The default config is already configured to be compatible with the development instance that this should create, so no further changes to the database config are required.
Mystic was designed to be run with SAML authentication. Future authentication schemes are planned, but not yet implemented. For now, SAML is configured as follows:
SAML_SP should be configured to point to a private key and certificate. If open SSL is installed, these can be generated with the command
openssl req -x509 -newkey rsa:4096 -keyout sp_private_key.pem -out sp_certificate.pem -nodes -days 900
The SAML2_IDENTITY_PROVIDERS should contain a list of identity providers for users to login with. Typically, you only need one of these.
- CLASS option can typically be left as
flask_saml2.sp.IdPHandler, unless you need a specialized backend to handle logins
- display_name should be set to a human readable description for the identity providers
- entity_id should be the entity ID set by the IDP
- sso_url and slo_url should be set to the single sign on an single log out url endpoints defined by the IDP
- certificate should point to a copy of the certificate used by the IDP
Mystic can be run using Docker either standalone or with the rest of the Grimoire stack. Currently, only development releases are being posted, and are generated through GitLab's CI. Once Mystic releases properly, release builds will be available.
Mystic's container can be pulled from the GitLab container registry at
registry.gitlab.com/open-rit/mystic:dev (for the development branch). The following mounts/volumes are recommended:
/data/config.cfg: Mounting the main config file
/data/keys: To store private & public keys for SAML
/data/projects.json: To retrieve the
projects.jsonfile, which must be fed to Grimoirelab in order to generate metrics
Of course, you will still need to run the rest of the grimoirelab stack in order to have complete functionality, including a MySQL server, grimoirelab-sirmordred, and elasticsearch, at minimum. For this reason, it's recommended that you deploy the full stack.
Mystic also offers a docker-compose file for deploying the entire software stack needed to run Mystic, as well as configuration files for its components. To see this, check out the
stack folder of this repository.
Mystic is a Flask app, so running a development build is as simple as:
python3 -m venv venv source bin/activate pip install -e . set -x FLASK_APP mystic flask run