Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 0 additions & 76 deletions README.md

This file was deleted.

123 changes: 123 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@

MMS Structured Data Version Control
===================================


.. image:: https://img.shields.io/lgtm/grade/java/g/Open-MBEE/mms.svg?logo=lgtm&logoWidth=18
:target: https://lgtm.com/projects/g/Open-MBEE/mms/context:java
:alt: Language grade: Java

.. image:: https://circleci.com/gh/Open-MBEE/mms.svg?style=svg
:target: https://circleci.com/gh/Open-MBEE/mms
:alt: CircleCI


The MMS SDVC is a collection of modules built on top of the Spring Framework and is a part of Open-MBEE. For more information about Open-MBEE, visit the `Open-MBEE Website <https://openmbee.org/>`_

If you are interested in deploying MMS, please see the `MMSRI <https://github.com/Open-MBEE/mmsri>`_ quickstart.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Developer Setup
---------------

Docker
^^^^^^

We suggest using Docker to set up PostgreSQL and Elasticsearch. Installation
instructions are found here: `Docker documentation <https://docs.docker.com/>`_

Java SE Development Kit 11
^^^^^^^^^^^^^^^^^^^^^^^^^^

Installation instructions: `JDK-11 download <https://www.oracle.com/java/technologies/javase-jdk11-downloads.html>`_

Postgresql
^^^^^^^^^^

Install postgres (PostgreSQL) 11, instructions for Docker: `PostgreSQL with Docker <https://hub.docker.com/_/postgres>`_

.. code-block::

docker run -d -e POSTGRES_PASSWORD=test1234 -e POSTGRES_USER=mmsuser -e POSTGRES_DB=mms -p 5432:5432 postgres:11-alpine


or Mysql
^^^^^^^^

5.7 `Mysql Docker <https://hub.docker.com/_/mysql/>`_

.. code-block::

docker run -d -e MYSQL_ROOT_PASSWORD=test1234 -e MYSQL_DATABASE=mms -p 3306:3306 mysql:5.7


Elasticsearch
^^^^^^^^^^^^^

Install Elasticsearch 7.8. If you use Docker instructions are available here: `Setting up Elasticsearch with Docker <https://www.elastic.co/guide/en/elasticsearch/reference/current/docker.html>`_

.. code-block::

docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.1


Artifacts Storage
^^^^^^^^^^^^^^^^^

.. code-block::

docker run -d -p 9000:9000 -e "MINIO_ACCESS_KEY=admintest" -e "MINIO_SECRET_KEY=admintest" minio/minio server /data


IntelliJ IDEA
^^^^^^^^^^^^^


#. Import Gradle Project to IntelliJ IDEA
#. Ensure that you select JDK 10 or above and search recursively for projects.
#. The ``example`` subproject will show you how to include the different modules to run as a Spring Boot application.

Gradle
^^^^^^

A gradle wrapper is included in the root of this repository and can be called from the command line with ``./gradlew [command]``.

The Example Sub Project:
^^^^^^^^^^^^^^^^^^^^^^^^


#. Copy the example properties file in ``example/src/main/resources/`` as ``application.properties``
#. Change values for all the appropriate properties. The example file holds sane values for most properties.
#. Setup Run and Debug configurations. The command line run command is ``./gradlew bootRun``
#. Swagger ui at `http://localhost:8080/v3/swagger-ui.html <http://localhost:8080/v3/swagger-ui.html>`_

Running tests
-------------

See README in /example

Built With
----------


* `Spring <https://spring.io>`_

Contributing
------------

To learn how you can get involved in a variety of ways, please see `Contributing to OpenMBEE <https://www.openmbee.org/contribute>`_.

Versioning
----------

We use `SemVer <http://semver.org/>`_ for versioning. For the versions available, see the `tags on this repository <https://github.com/Open-MBEE/mms.git>`_.

License
-------

This project is licensed under the Apache License 2.0 - see the `LICENSE <LICENSE>`_ file for details

Structure of Modules
--------------------

TBA
30 changes: 0 additions & 30 deletions artifacts/README.md

This file was deleted.

39 changes: 39 additions & 0 deletions artifacts/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
.. _artifacts:

Artifacts
---------

Allows artifacts (binary objects) to be attached to elements. Attached artifact info are added to an element object under the ``_artifacts`` key and versioned as part of element data.

.. code-block:: JSON

{
"id": "elementId",
"name": "example element with artifact",
"otherKeys": "other values",
"_artifacts": [
{
"location": "string depends on storage impl",
"locationType": "internal",
"mimetype": "image/svg+xml",
"extension": "svg"
}
]
}


Adds endpoints for getting and uploading binary content

Adds ArtifactStorage interface - this allows different implementations to be used if desired given the right module

.. code-block:: java

public interface ArtifactStorage {

byte[] get(String location, ElementJson element, String mimetype);
//returns location
String store(byte[] data, ElementJson element, String mimetype);
}


see :ref:`storage` for an example reference implementation using s3
12 changes: 0 additions & 12 deletions authenticator/README.md

This file was deleted.

22 changes: 22 additions & 0 deletions authenticator/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@

Authenticator
-------------

This module leverages Spring Security's authentication manager to try all registered auth checks provided with other modules


* Adds login endpoint that returns JWT (JSON Web Token)

* token is generated from username and authorities as returned by authentication manager

* Adds JWT Bearer token auth

References
^^^^^^^^^^


* `Overview of Spring Security <https://spring.io/guides/topicals/spring-security-architecture#_authentication_and_access_control>`_
* `UserDetails <https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/userdetails/UserDetails.html>`_
* `Authentication <https://docs.spring.io/spring-security/site/docs/current/api/org/springframework/security/core/Authentication.html>`_
* :ref:`localuser`
* :ref:`ldap`
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ buildscript {
}
}

description = 'Structured Data Version Control'
description = 'Model Management System Reference Implementation'

ext {
commonDependencies = [
Expand Down
9 changes: 0 additions & 9 deletions cameo/README.md

This file was deleted.

13 changes: 13 additions & 0 deletions cameo/README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
.. _cameo:

Cameo
-----

This modules adds behavior for ``cameo`` projects that mimics behavior from `mms 3.x <https://github.com/Open-MBEE/mms-alfresco>`_ AKA Donbot

For projects created using schema ``cameo``\ , this will:


* create holding bin elements for the project
* determine element types such as ``view``\ , ``document``\ , ``group``\ , etc and adds endpoints for getting them (as used by `ve <https://github.com/Open-MBEE/ve>`_ and `mdk <https://github.com/Open-MBEE/mdk>`_\ )
* will follow mounted projects when getting elements
51 changes: 0 additions & 51 deletions core/README.md

This file was deleted.

Loading