diff --git a/README.md b/README.md deleted file mode 100644 index 3ba39ef2e..000000000 --- a/README.md +++ /dev/null @@ -1,76 +0,0 @@ -# MMS Structured Data Version Control -[![Language grade: Java](https://img.shields.io/lgtm/grade/java/g/Open-MBEE/mms.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/Open-MBEE/mms/context:java) [![CircleCI](https://circleci.com/gh/Open-MBEE/mms.svg?style=svg)](https://circleci.com/gh/Open-MBEE/mms) - -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) - - 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/) - - 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) - - docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" docker.elastic.co/elasticsearch/elasticsearch:7.8.1 - -### Artifacts Storage - - docker run -d -p 9000:9000 -e "MINIO_ACCESS_KEY=admintest" -e "MINIO_SECRET_KEY=admintest" minio/minio server /data - -### IntelliJ IDEA - -1. Import Gradle Project to IntelliJ IDEA -2. Ensure that you select JDK 10 or above and search recursively for projects. -3. 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: -1. Copy the example properties file in `example/src/main/resources/` as `application.properties` -1. Change values for all the appropriate properties. The example file holds sane values for most properties. -1. Setup Run and Debug configurations. The command line run command is `./gradlew bootRun` -1. 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 - - diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..81d175838 --- /dev/null +++ b/README.rst @@ -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 `_ + +If you are interested in deploying MMS, please see the `MMSRI `_ quickstart. +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Developer Setup +--------------- + +Docker +^^^^^^ + +We suggest using Docker to set up PostgreSQL and Elasticsearch. Installation +instructions are found here: `Docker documentation `_ + +Java SE Development Kit 11 +^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Installation instructions: `JDK-11 download `_ + +Postgresql +^^^^^^^^^^ + +Install postgres (PostgreSQL) 11, instructions for Docker: `PostgreSQL with Docker `_ + +.. 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 `_ + +.. 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 `_ + +.. 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 `_ + +Running tests +------------- + +See README in /example + +Built With +---------- + + +* `Spring `_ + +Contributing +------------ + +To learn how you can get involved in a variety of ways, please see `Contributing to OpenMBEE `_. + +Versioning +---------- + +We use `SemVer `_ for versioning. For the versions available, see the `tags on this repository `_. + +License +------- + +This project is licensed under the Apache License 2.0 - see the `LICENSE `_ file for details + +Structure of Modules +-------------------- + +TBA diff --git a/artifacts/README.md b/artifacts/README.md deleted file mode 100644 index 01d64a1de..000000000 --- a/artifacts/README.md +++ /dev/null @@ -1,30 +0,0 @@ -## 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. - - { - "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 - - public interface ArtifactStorage { - - byte[] get(String location, ElementJson element, String mimetype); - //returns location - String store(byte[] data, ElementJson element, String mimetype); - } - -see `storage` for an example reference implementation using s3 \ No newline at end of file diff --git a/artifacts/README.rst b/artifacts/README.rst new file mode 100644 index 000000000..597306120 --- /dev/null +++ b/artifacts/README.rst @@ -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 diff --git a/authenticator/README.md b/authenticator/README.md deleted file mode 100644 index 9f4b25ae4..000000000 --- a/authenticator/README.md +++ /dev/null @@ -1,12 +0,0 @@ -## 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) \ No newline at end of file diff --git a/authenticator/README.rst b/authenticator/README.rst new file mode 100644 index 000000000..c6a7421e3 --- /dev/null +++ b/authenticator/README.rst @@ -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 `_ +* `UserDetails `_ +* `Authentication `_ +* :ref:`localuser` +* :ref:`ldap` \ No newline at end of file diff --git a/build.gradle b/build.gradle index 82c35ae8e..779f1045a 100644 --- a/build.gradle +++ b/build.gradle @@ -11,7 +11,7 @@ buildscript { } } -description = 'Structured Data Version Control' +description = 'Model Management System Reference Implementation' ext { commonDependencies = [ diff --git a/cameo/README.md b/cameo/README.md deleted file mode 100644 index 857ca72f5..000000000 --- a/cameo/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## 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 \ No newline at end of file diff --git a/cameo/README.rst b/cameo/README.rst new file mode 100644 index 000000000..3271c88c9 --- /dev/null +++ b/cameo/README.rst @@ -0,0 +1,13 @@ +.. _cameo: + +Cameo +----- + +This modules adds behavior for ``cameo`` projects that mimics behavior from `mms 3.x `_ 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 `_ and `mdk `_\ ) +* will follow mounted projects when getting elements diff --git a/core/README.md b/core/README.md deleted file mode 100644 index 272966af8..000000000 --- a/core/README.md +++ /dev/null @@ -1,51 +0,0 @@ -## Core - -This contains core configurations, constants, interfaces, and object classes used by all other modules. - -### Core data organization concept - -Org (like github org) -> Project (like git repo) -> Commits and Branches - -The objects being versioned are json objects (with optional binary attachments, see `artifacts` module) - -### DAO interfaces (`dao`) - -Interfaces for metadata and json storage - -### Events (`services`, `pubsub`) - -A default `EventService` that can publish `EventObject` (extension of Spring ApplicationEvent that includes event type, projectId, branchId and payload) - -Other modules can use the publisher to publish and listen to events (ex. `crud` publishes events on commit, branch created, etc and `webhooks` listens for those events) - -### Service interfaces (`services`) - -Major ones are ProjectService, BranchService, NodeService - -Project and Node services can have different implementations based on the project schema in order to provide different behaviors if needed. - -A default schema implementation is registered by the `crud` module, new schemas and service implementations provided by modules need to be registered by injecting and adding to the `ProjectSchemas` under `config` - -see `crud`, `cameo` for examples - -### Security and Permissions (`security`, `config`, `delegation`, `services`) - -Locally, MMS uses role based permissions on the org, project, and branch level, for user and groups. There can be different permission implementations that are delegated to for looking up whether a user has certain privileges to do certain things (ex. can user read from project A/branch b) - -Current roles are ADMIN, READER, WRITER, each grants a set of Privileges like PROJECT_READ, PROJECT_EDIT, etc - -Roles can be assigned to groups per org/project/branch, a user's groups are inferred from Spring Security's `Authentication`'s `getAuthorities` method (it's hijacked a bit to fit what we need), then the user, groups, target object and privilege requested are given to a permission delegate implementation to determine authorization. The permission delegate implementation can do whatever it wants with the input to return true/false. - -A special group/authority that denotes admin status is `mmsadmin`, an authentication provider can add this to the user's authorities to denote admin status and mms will allow operation on all endpoints. - -See `MethodSecurityService` (used by controllers gating access to endpoints) and `PermissionService` - -see `permission` or `twc` for more examples - -## ContextHolder (`config`) - -Instead of passing projectId, branchId everywhere, `ContextHolder` can be used to get/set the context for the thread. - -## Exceptions (`exceptions`) - -Runtime Exceptions that'll return the corresponding http response code \ No newline at end of file diff --git a/core/README.rst b/core/README.rst new file mode 100644 index 000000000..f31c533d6 --- /dev/null +++ b/core/README.rst @@ -0,0 +1,61 @@ +.. _core: + +Core +==== + +This contains core configurations, constants, interfaces, and object classes used by all other modules. + +Core data organization concept +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Org (like github org) -> Project (like git repo) -> Commits and Branches + +The objects being versioned are json objects (with optional binary attachments, see ``artifacts`` module) + +DAO interfaces (\ ``dao``\ ) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Interfaces for metadata and json storage + +Events (\ ``services``\ , ``pubsub``\ ) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +A default ``EventService`` that can publish ``EventObject`` (extension of Spring ApplicationEvent that includes event type, projectId, branchId and payload) + +Other modules can use the publisher to publish and listen to events (ex. ``crud`` publishes events on commit, branch created, etc and ``webhooks`` listens for those events) + +Service interfaces (\ ``services``\ ) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Major ones are ProjectService, BranchService, NodeService + +Project and Node services can have different implementations based on the project schema in order to provide different behaviors if needed. + +A default schema implementation is registered by the ``crud`` module, new schemas and service implementations provided by modules need to be registered by injecting and adding to the ``ProjectSchemas`` under ``config`` + +see ``crud``\ , ``cameo`` for examples + +Security and Permissions (\ ``security``\ , ``config``\ , ``delegation``\ , ``services``\ ) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Locally, MMS uses role based permissions on the org, project, and branch level, for user and groups. There can be different permission implementations that are delegated to for looking up whether a user has certain privileges to do certain things (ex. can user read from project A/branch b) + +Current roles are ADMIN, READER, WRITER, each grants a set of Privileges like PROJECT_READ, PROJECT_EDIT, etc + +Roles can be assigned to groups per org/project/branch, a user's groups are inferred from Spring Security's ``Authentication``\ 's ``getAuthorities`` method (it's hijacked a bit to fit what we need), then the user, groups, target object and privilege requested are given to a permission delegate implementation to determine authorization. The permission delegate implementation can do whatever it wants with the input to return true/false. + +A special group/authority that denotes admin status is ``mmsadmin``\ , an authentication provider can add this to the user's authorities to denote admin status and mms will allow operation on all endpoints. + +See ``MethodSecurityService`` (used by controllers gating access to endpoints) and ``PermissionService`` + +see ``permission`` or ``twc`` for more examples + +ContextHolder (\ ``config``\ ) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Instead of passing projectId, branchId everywhere, ``ContextHolder`` can be used to get/set the context for the thread. + +Exceptions (\ ``exceptions``\ ) +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +Runtime Exceptions that'll return the corresponding http response code diff --git a/crud/README.md b/crud/README.md deleted file mode 100644 index 8a31601f3..000000000 --- a/crud/README.md +++ /dev/null @@ -1,13 +0,0 @@ -## CRUD - -This provides the main json document/object versioning functionality and endpoints for cruding orgs, projects, branches, elements and commits. - -### Service Factory - -`ServiceFactory` under `services` is used to get the correct service bean for a particular project type/schema. When creating or getting a project or element, the schema of the project is prefixed to "ProjectService" or "NodeService" to construct the name of the bean. A default implementation is provided. - -`defaultNodeService` - allows partial update of an element by merging it with existing version, allows overwrite of existing version by supplied document, also has overridable hooks for modifying data on create/update/get to allow extending of this class instead of another implementation from scratch - -`defaultProjectService` - auto creates `master` branch on project creation - -see `cameo` module for `cameoNodeService` and `cameoProjectService` for an extension example for a different schema \ No newline at end of file diff --git a/crud/README.rst b/crud/README.rst new file mode 100644 index 000000000..31a5b230f --- /dev/null +++ b/crud/README.rst @@ -0,0 +1,17 @@ +.. _crud: + +CRUD +---- + +This provides the main json document/object versioning functionality and endpoints for cruding orgs, projects, branches, elements and commits. + +Service Factory +^^^^^^^^^^^^^^^ + +``ServiceFactory`` under ``services`` is used to get the correct service bean for a particular project type/schema. When creating or getting a project or element, the schema of the project is prefixed to "ProjectService" or "NodeService" to construct the name of the bean. A default implementation is provided. + +``defaultNodeService`` - allows partial update of an element by merging it with existing version, allows overwrite of existing version by supplied document, also has overridable hooks for modifying data on create/update/get to allow extending of this class instead of another implementation from scratch + +``defaultProjectService`` - auto creates ``master`` branch on project creation + +see :ref:`cameo` module for ``cameoNodeService`` and ``cameoProjectService`` for an extension example for a different schema diff --git a/data/README.md b/data/README.md deleted file mode 100644 index 5652b715e..000000000 --- a/data/README.md +++ /dev/null @@ -1,2 +0,0 @@ -## Data - diff --git a/data/README.rst b/data/README.rst new file mode 100644 index 000000000..7ff9fbffe --- /dev/null +++ b/data/README.rst @@ -0,0 +1,6 @@ +.. _data: + +Data +---- + +The Data Module provides data objects for core MMS functionality. \ No newline at end of file diff --git a/docs/Makefile b/docs/Makefile index d4bb2cbb9..c7c069650 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -5,7 +5,7 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = . +SOURCEDIR = src BUILDDIR = _build # Put it first so that "make" without argument is like "make help". diff --git a/docs/conf.py b/docs/conf.py index 6d82dad5b..2b469ac88 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -12,6 +12,7 @@ # import os import sys + sys.path.insert(0, os.path.abspath('../..')) sys.setrecursionlimit(1500) @@ -34,6 +35,7 @@ # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'sphinx_rtd_theme' ] # Add any paths that contain templates here, relative to this directory. @@ -50,7 +52,7 @@ # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. # -html_theme = 'alabaster' +html_theme = 'sphinx_rtd_theme' # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, diff --git a/docs/deployment.rst b/docs/deployment.rst new file mode 100644 index 000000000..6b76d31e6 --- /dev/null +++ b/docs/deployment.rst @@ -0,0 +1,17 @@ +.. _deployment: + +========== +Deployment +========== + +Bare Metal +---------- +:: + + java -jar mms-4.0.0.jar + +Docker +------ +:: + + docker run mms diff --git a/docs/index.rst b/docs/index.rst index d970a0356..0c7dbe171 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -2,19 +2,20 @@ sphinx-quickstart on Tue Oct 20 07:03:26 2020. You can adapt this file completely to your liking, but it should at least contain the root `toctree` directive. +.. _index: Welcome to Model Management System's documentation! =================================================== -.. toctree:: - :maxdepth: 2 - :caption: Contents: - +.. include:: overview.rst +.. toctree:: + :maxdepth: 2 + :caption: Table of Contents + :glob: -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` + overview + quickstart + installation + deployment + modules/index \ No newline at end of file diff --git a/docs/installation.rst b/docs/installation.rst new file mode 100644 index 000000000..7b0b0b5f1 --- /dev/null +++ b/docs/installation.rst @@ -0,0 +1,12 @@ +.. _installation: + +============ +Installation +============ + +The MMS, in it's reference implementation configuration currently has two main dependencies\: + + - Relational Database (e.g. Postgresql, MySQL, etc.) + - Document Store (e.g. Elasticsearch) + - Optionally, for artifact storage, an S3 compliant object store is necessary. We develop against MinIO and deploy against AWS S3, however, any S3 compliant object store will suffice. (e.g. MinIO) + diff --git a/docs/modules/artifacts.rst b/docs/modules/artifacts.rst new file mode 100644 index 000000000..958c7466d --- /dev/null +++ b/docs/modules/artifacts.rst @@ -0,0 +1 @@ +.. include:: ../../artifacts/README.rst \ No newline at end of file diff --git a/docs/modules/authenticator.rst b/docs/modules/authenticator.rst new file mode 100644 index 000000000..b84a0b011 --- /dev/null +++ b/docs/modules/authenticator.rst @@ -0,0 +1 @@ +.. include:: ../../authenticator/README.rst \ No newline at end of file diff --git a/docs/modules/cameo.rst b/docs/modules/cameo.rst new file mode 100644 index 000000000..2a170d303 --- /dev/null +++ b/docs/modules/cameo.rst @@ -0,0 +1 @@ +.. include:: ../../cameo/README.rst \ No newline at end of file diff --git a/docs/modules/core.rst b/docs/modules/core.rst new file mode 100644 index 000000000..96de145d9 --- /dev/null +++ b/docs/modules/core.rst @@ -0,0 +1 @@ +.. include:: ../../core/README.rst \ No newline at end of file diff --git a/docs/modules/crud.rst b/docs/modules/crud.rst new file mode 100644 index 000000000..32e7b5cfb --- /dev/null +++ b/docs/modules/crud.rst @@ -0,0 +1 @@ +.. include:: ../../crud/README.rst \ No newline at end of file diff --git a/docs/modules/data.rst b/docs/modules/data.rst new file mode 100644 index 000000000..14d601153 --- /dev/null +++ b/docs/modules/data.rst @@ -0,0 +1 @@ +.. include:: ../../data/README.rst \ No newline at end of file diff --git a/docs/modules/elastic.rst b/docs/modules/elastic.rst new file mode 100644 index 000000000..7b36dc99e --- /dev/null +++ b/docs/modules/elastic.rst @@ -0,0 +1 @@ +.. include:: ../../elastic/README.rst \ No newline at end of file diff --git a/docs/modules/index.rst b/docs/modules/index.rst new file mode 100644 index 000000000..cdf87d33f --- /dev/null +++ b/docs/modules/index.rst @@ -0,0 +1,14 @@ +.. _modules: + +======= +Modules +======= + +This section is for the individual modules currently available for MMS. + +.. toctree:: + :maxdepth: 2 + :caption: Modules + :glob: + + * \ No newline at end of file diff --git a/docs/modules/json.rst b/docs/modules/json.rst new file mode 100644 index 000000000..feba4060c --- /dev/null +++ b/docs/modules/json.rst @@ -0,0 +1 @@ +.. include:: ../../json/README.rst \ No newline at end of file diff --git a/docs/modules/jupyter.rst b/docs/modules/jupyter.rst new file mode 100644 index 000000000..c44e6ebf5 --- /dev/null +++ b/docs/modules/jupyter.rst @@ -0,0 +1 @@ +.. include:: ../../jupyter/README.rst \ No newline at end of file diff --git a/docs/modules/ldap.rst b/docs/modules/ldap.rst new file mode 100644 index 000000000..27acf0b31 --- /dev/null +++ b/docs/modules/ldap.rst @@ -0,0 +1 @@ +.. include:: ../../ldap/README.rst \ No newline at end of file diff --git a/docs/modules/localuser.rst b/docs/modules/localuser.rst new file mode 100644 index 000000000..352f2ce41 --- /dev/null +++ b/docs/modules/localuser.rst @@ -0,0 +1 @@ +.. include:: ../../localuser/README.rst \ No newline at end of file diff --git a/docs/modules/permissions.rst b/docs/modules/permissions.rst new file mode 100644 index 000000000..6130ddce8 --- /dev/null +++ b/docs/modules/permissions.rst @@ -0,0 +1 @@ +.. include:: ../../permissions/README.rst \ No newline at end of file diff --git a/docs/modules/rdb.rst b/docs/modules/rdb.rst new file mode 100644 index 000000000..26625705a --- /dev/null +++ b/docs/modules/rdb.rst @@ -0,0 +1 @@ +.. include:: ../../rdb/README.rst \ No newline at end of file diff --git a/docs/modules/search.rst b/docs/modules/search.rst new file mode 100644 index 000000000..3e1155fbd --- /dev/null +++ b/docs/modules/search.rst @@ -0,0 +1 @@ +.. include:: ../../search/README.rst \ No newline at end of file diff --git a/docs/modules/storage.rst b/docs/modules/storage.rst new file mode 100644 index 000000000..786b82846 --- /dev/null +++ b/docs/modules/storage.rst @@ -0,0 +1 @@ +.. include:: ../../storage/README.rst \ No newline at end of file diff --git a/docs/modules/twc.rst b/docs/modules/twc.rst new file mode 100644 index 000000000..7de72e03e --- /dev/null +++ b/docs/modules/twc.rst @@ -0,0 +1 @@ +.. include:: ../../twc/README.rst \ No newline at end of file diff --git a/docs/modules/webhooks.rst b/docs/modules/webhooks.rst new file mode 100644 index 000000000..a85ed7039 --- /dev/null +++ b/docs/modules/webhooks.rst @@ -0,0 +1 @@ +.. include:: ../../webhooks/README.rst \ No newline at end of file diff --git a/docs/overview.rst b/docs/overview.rst new file mode 100644 index 000000000..3c45d7d29 --- /dev/null +++ b/docs/overview.rst @@ -0,0 +1,9 @@ +======== +Overview +======== + +The Model Management System (MMS) provide services for managing models and is a version control system for structured data. It exposes model information through RESTful web services that can be used for CRUD operations, branching, and tagging of the model repository. This heart of the MMS is the View Service which supports the transclusion features of Views. + +The MMS also provides web services for storing and searching Jupyter Lab notebooks. + +Those looking to use MMS as an end user or in a production environment should look into the `MMS Reference Implementation `_. \ No newline at end of file diff --git a/docs/quickstart.rst b/docs/quickstart.rst new file mode 100644 index 000000000..ebe9cb083 --- /dev/null +++ b/docs/quickstart.rst @@ -0,0 +1,69 @@ +.. _quickstart: + +=========== +Quick Start +=========== + +This quick start will focus on running all dependencies and the MMS application as docker containers. This is most suitable for testing environments. For production deployments, we recommend the `MMS Reference Implementation `_ as a starting point. + +Dependencies +------------ + + Docker + We suggest using Docker to set up PostgreSQL and Elasticsearch. Installation instructions are found here: `Docker documentation `_ + + Java SE Development Kit 11+ + Installation instructions: `JDK-11 download `_ + + Postgresql or Mysql 5.7 + Install postgres (PostgreSQL) 11, instructions for Docker: `PostgreSQL with Docker `_ + :: + + docker run -d -e POSTGRES_PASSWORD=test1234 -e POSTGRES_USER=mmsuser -e POSTGRES_DB=mms -p 5432:5432 --name=postgres postgres:11-alpine + + Or mysql: `Mysql with Docker `_ + :: + + docker run -d -e MYSQL_ROOT_PASSWORD=test1234 -e MYSQL_DATABASE=mms -p 3306:3306 --name=mysql mysql:5.7 + + Elasticsearch + Install Elasticsearch 7.8. If you use Docker instructions are available here: `Setting up Elasticsearch with Docker `_ + :: + + docker run -d -p 9200:9200 -p 9300:9300 -e "discovery.type=single-node" --name=elasticsearch docker.elastic.co/elasticsearch/elasticsearch:7.8.1 + + MinIO + Install MinIO for artifact storage. `Instructions for MinIO `_ + :: + + docker run -d -p 9000:9000 -e "MINIO_ACCESS_KEY=admintest" -e "MINIO_SECRET_KEY=admintest" --name=minio minio/minio server /data + +Running MMS +----------- + + Configure the application + Each module of MMS can define configuration properties required to function. These properties can be defined in a single location, by default, called application.properties. Place application.properties in the classpath for MMS to use the defined values. For an example, see `example application.properties `_ + Alternatively, the properties file can be given by defining the environment variable `SPRING_CONFIG_LOCATION`. + + Run the application + First, create a container from an MMS image. In the example below, the container is using the host network for simplicity. + :: + + docker create --name=mms --network="host" -e "SPRING_CONFIG_LOCATION=/mms.properties" openmbee/mms:4.0.0-b5 + + Copy properties + If using the above command, copy the properties file to the defined spring config location. + :: + + docker cp mms.properties mms:/mms.properties + + Start the container + Finally, start the container with the injected properties file. + :: + + docker start mms + +More Information +---------------- + + For more information and hints, check the `docker-compose.yml `_ in the project root to see how we stand up an instance for testing purposes. \ No newline at end of file diff --git a/elastic/README.md b/elastic/README.md deleted file mode 100644 index 515d3daa5..000000000 --- a/elastic/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## Elastic - -Elasticsearch implementation for json document storage, indexing and search. Implements the `*IndexDAO` and `SearchService` interfaces from `core` - -On project creation, will look for a mapping file based on the project schema prefixed to '_node.json' under $classpath/elastic_mappings, otherwise will use elastic_mappins/default_node.json for field mapping \ No newline at end of file diff --git a/elastic/README.rst b/elastic/README.rst new file mode 100644 index 000000000..fb849369d --- /dev/null +++ b/elastic/README.rst @@ -0,0 +1,57 @@ +.. _elastic: + +Elastic +------- + +Elasticsearch implementation for json document storage, indexing and search. Implements the ``*IndexDAO`` and ``SearchService`` interfaces from ``core`` + +On project creation, will look for a mapping file based on the project schema prefixed to '_node.json' under $classpath/elastic_mappings, otherwise will use elastic_mappins/default_node.json for field mapping + +Configuration +^^^^^^^^^^^^^ + +The following are a list of options to configure the Elastic Module for MMS. + + elasticsearch.host + The host name of the Elasticsearch server or cluster. Required. + + elasticsearch.port + The port number of the Elasticsearch server or cluster. Required. + + elasticsearch.http + The transport protocol to use to connect to the Elasticsearch server or cluster. Required. + + elasticsearch.limit.result + The maximum number of results a single search request should return. Optional. + + | `Default: 10000` + + elasticsearch.limit.term + The maximum number of terms that a search query should contain. Optional. + + | `Default: 1000` + + elasticsearch.limit.scrollTimeout + The maximum time to wait for search requests. Optional. + + | `Default: 1000` + + elasticsearch.limit.get + The maximum number of elements that a single get request should return. Optional. + + | `Default: 5000` + + elasticsearch.limit.index + The maximum number of elements that will be indexed in a single bulk request. Optional. + + | `Default: 5000` + + elasticsearch.limit.commit + The maximum number of elements to limit commit objects. Set this to a reasonable size in order to avoid object size limitations in Elasticsearch. + + | `Default: 10000` + +Elastic Mappings +^^^^^^^^^^^^^^^^ + +Elastic mappings are necessary to index fields correctly in Elasticsearch. These mappings are available `here `_. \ No newline at end of file diff --git a/example/README.md b/example/README.md deleted file mode 100644 index 8a9466acc..000000000 --- a/example/README.md +++ /dev/null @@ -1,26 +0,0 @@ -## Quick Start -### Docker -Installation instructions are found here: [Docker documentation](https://docs.docker.com/) - -1. At repo's root level, run `docker-compose up --build` to create and start all the services from the configuration. This uses the `test` Spring profile -1. Swagger ui at [http://localhost:8080/v3/swagger-ui.html](http://localhost:8080/v3/swagger-ui.html) -1. Use the command `docker-compose down` to stop any containers from running and to remove the containers, networks, and images created by the `docker-compose up` command. This command should always be done before any new attempts to restart the services from the configuration. - - -## Run command line api test - -1. run example app on localhost - 1. if using docker-compose to bring up example app, can do the following to run the tests instead of installing node - - docker run -v $PWD:/etc/newman -t --network container:mms postman/newman:alpine run crud.postman_collection.json --environment="test-env.json" --delay-request=300 - - 1. otherwise [install Node.js](https://nodejs.org/en/download/), if not already installed - 1. copy localhost-env.json.example to localhost-env.json, change values accordingly - - npm install -g newman - - newman run crud.postman_collection.json -e localhost-env.json --delay-request 300 - -## Swagger UI of running app - -Swagger 3 UI at http://localhost:8080/v3/swagger-ui.html \ No newline at end of file diff --git a/example/README.rst b/example/README.rst new file mode 100644 index 000000000..0fab858a6 --- /dev/null +++ b/example/README.rst @@ -0,0 +1,45 @@ + +Quick Start +----------- + +Docker +^^^^^^ + +Installation instructions are found here: `Docker documentation `_ + + +#. At repo's root level, run ``docker-compose up --build`` to create and start all the services from the configuration. This uses the ``test`` Spring profile +#. Swagger ui at `http://localhost:8080/v3/swagger-ui.html `_ +#. Use the command ``docker-compose down`` to stop any containers from running and to remove the containers, networks, and images created by the ``docker-compose up`` command. This command should always be done before any new attempts to restart the services from the configuration. + +Run command line api test +------------------------- + + +#. + run example app on localhost + + + #. + if using docker-compose to bring up example app, can do the following to run the tests instead of installing node + + .. code-block:: + + docker run -v $PWD:/etc/newman -t --network container:mms postman/newman:alpine run crud.postman_collection.json --environment="test-env.json" --delay-request=300 + + #. + otherwise `install Node.js `_\ , if not already installed + + #. + copy localhost-env.json.example to localhost-env.json, change values accordingly + + .. code-block:: + + npm install -g newman + + newman run crud.postman_collection.json -e localhost-env.json --delay-request 300 + +Swagger UI of running app +------------------------- + +Swagger 3 UI at http://localhost:8080/v3/swagger-ui.html diff --git a/json/README.md b/json/README.rst similarity index 83% rename from json/README.md rename to json/README.rst index 22c1e44d7..be8d4efc1 100644 --- a/json/README.md +++ b/json/README.rst @@ -1,5 +1,8 @@ -## "JSON" objects +.. _json: + +JSON +---- This module contains classes that provides convenience getter/setters for properties that are defined for each type of object used in mms. All are extended from Map and allow arbitrary extra key/value pairs. -Setters are chained. \ No newline at end of file +Setters are chained. diff --git a/jupyter/README.rst b/jupyter/README.rst new file mode 100644 index 000000000..5b03a1818 --- /dev/null +++ b/jupyter/README.rst @@ -0,0 +1,7 @@ +.. _jupyter: + +======= +Jupyter +======= + +The Jupyter module adds the ability to support jupyter notebooks. \ No newline at end of file diff --git a/ldap/README.md b/ldap/README.md deleted file mode 100644 index 172fad6ea..000000000 --- a/ldap/README.md +++ /dev/null @@ -1,3 +0,0 @@ -## LDAP - -Adds ldap authentication provider, ldap groups the user belongs to that are also assigned a role in mms will be added as the user's granted authorities. \ No newline at end of file diff --git a/ldap/README.rst b/ldap/README.rst new file mode 100644 index 000000000..60fe9e7a4 --- /dev/null +++ b/ldap/README.rst @@ -0,0 +1,46 @@ +.. _ldap: + +LDAP +---- + +Adds ldap authentication provider, ldap groups the user belongs to that are also assigned a role in mms will be added as the user's granted authorities. + +Configuration +^^^^^^^^^^^^^ + + ldap.enabled + Boolean value to enable the ldap module. Required. + + ldap.provider.base + The base string to use. Required. + + ldap.provider.url + The provider url, including the base. Required. + + ldap.provider.userdn + The userdn to use to authenticate to the provider. Optional. + + ldap.provider.password + The password to use to authenticate to the provider. Optional. + + ldap.user.dn.pattern + The dn pattern for the user. Required. + + ldap.user.attributes.username + The attribute to use for the username. Optional. + + | `Default: uid` + + ldap.user.attributes.email + The attribute to use for the email address. Optional. + + | `Default: mail` + + ldap.group.role.attribute + The attribute to use for the group role. Optional. + + ldap.group.search.base + The base for group search. Optional. + + ldap.group.search.filter + The search filter for group search. Optional. diff --git a/localuser/README.md b/localuser/README.md deleted file mode 100644 index 3f56e064c..000000000 --- a/localuser/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## LocalUser authentication - -Adds endpoint for adding local users, admins and changing password, and local authentication provider - -Uses `rdb` for storing user info \ No newline at end of file diff --git a/localuser/README.rst b/localuser/README.rst new file mode 100644 index 000000000..ea4c195b9 --- /dev/null +++ b/localuser/README.rst @@ -0,0 +1,17 @@ +.. _localuser: + +LocalUser +------------------------ + +Adds endpoint for adding local users, admins and changing password, and local authentication provider + +Uses :ref:`rdb` for storing user info + +Configuration +^^^^^^^^^^^^^ + + mms.admin.username + The root admin username to use. + + mms.admin.password + The root admin password to use. diff --git a/permissions/README.md b/permissions/README.md deleted file mode 100644 index d9114df1c..000000000 --- a/permissions/README.md +++ /dev/null @@ -1,4 +0,0 @@ -## Local Permissions - -This module implements local permissions and adds endpoints for modifying and getting permissions - diff --git a/permissions/README.rst b/permissions/README.rst new file mode 100644 index 000000000..99701c60b --- /dev/null +++ b/permissions/README.rst @@ -0,0 +1,70 @@ +.. _permissions: + +Permissions +----------------- + +This module implements local permissions and adds endpoints for modifying and getting permissions + +Default Access Levels +^^^^^^^^^^^^^^^^^^^^^ + +The MMS includes 3 hierarchical levels of permissions in the default implementation. Permissions are inherited from the parent level. + + Organization level + Permissions on this level are inherited by the Project and Branch level by default. + + Project level + Permissions on this level are inherited by the Branch level by default. + + Branch level + Permissions on this level are not inherited. + +From these levels, 3 levels of access permissions are provided by default: + + Admin + Can read and write all elements. Can also access admin level operations. + + Write + Can read and write all elements on this level. + + Read + Can read all elements on this level. + +Setting Permissions +^^^^^^^^^^^^^^^^^^^ + +The Permissions module provides several REST endpoints for managing permissions. + + /orgs/{orgId}/permissions + Update permissions for organizations. + + /projects/{projectId}/permissions + Update permissions for projects. + + /projects/{projectId}/refs/{refId}/permissions + Update permissions for branches. + +For each of these endpoints, a payload must be sent with acceptable values + +Permissions acceptable values + +.. code-block:: JSON + + { + "users / groups": { + "action": "ADD / REMOVE", + "permissions": [ + { + "name": "USERNAME", + "role": "ADMIN / WRITER / READER" + } + ] + }, + "inherit": true, + "public": true + } + +More Information +^^^^^^^^^^^^^^^^ + +For more information, see the OpenAPI Documentation. \ No newline at end of file diff --git a/rdb/README.md b/rdb/README.md deleted file mode 100644 index 6ad12f454..000000000 --- a/rdb/README.md +++ /dev/null @@ -1,9 +0,0 @@ -## RDB - -Implementation of metadata storage and permissions (if using local user auth/local permissions) - -Uses Spring Data JPA and Hibernate for ORM for main db - -Tested most with PostgreSQL, should also work for MySQL and others - -Currently, a separate database is created for each project, and table for each head of branch. Each table contains pointers to the latest element (json document) for that branch. \ No newline at end of file diff --git a/rdb/README.rst b/rdb/README.rst new file mode 100644 index 000000000..a21628ce2 --- /dev/null +++ b/rdb/README.rst @@ -0,0 +1,55 @@ +.. _rdb: + +RDB +--- + +Implementation of metadata storage and permissions (if using local user auth/local permissions) + +Uses Spring Data JPA and Hibernate for ORM for main db + +Tested most with PostgreSQL, should also work for MySQL and others + +Currently, a separate database is created for each project, and table for each head of branch. Each table contains pointers to the latest element (json document) for that branch. + +Configuration +^^^^^^^^^^^^^ + +The following are a list of options to configure the RDB Module for MMS. + + spring.datasource.url + The datasource url in jdbc format. Required. + + spring.datasource.database + The database name to use for global MMS configuration. Required. + + spring.datasource.username + The username to use for authentication. Optional. + + spring.datasource.password + The password to use for authentication. Optional. + + spring.datasource.driver-class-name + The driver to use for JDBC. Any database driver supported by Spring Data can be used. Required. + + spring.datasource.initialization-mode + The initialization mode to use when starting the MMS application. Accepted values are `always`, `embedded`, and `never`. Required. + + spring.jpa.properties.hibernate.dialect + The hibernate dialect to use. Required. + + spring.jpa.properties.hibernate.dialect.storage_engine + The storage engine to use. Optional. + + spring.jpa.hibernate.ddl-auto + The DDL generation option. Accepted values are `none`, `create`, `create-drop`, `validate`, and `update` Required. + +Required Properties +^^^^^^^^^^^^^^^^^^^ + +These properties are required for the MMS application to provide all available features. They are set by default, but are listed here for completeness. + + :: + + spring.jpa.properties.hibernate.jdbc.lob.non_contextual_creation=true + spring.jpa.open-in-view=false + spring.main.allow-bean-definition-overriding=true \ No newline at end of file diff --git a/search/README.rst b/search/README.rst new file mode 100644 index 000000000..a4e712745 --- /dev/null +++ b/search/README.rst @@ -0,0 +1,6 @@ +.. _mmssearch: + +Search +______ + +The Search Module \ No newline at end of file diff --git a/storage/README.md b/storage/README.md deleted file mode 100644 index e5cba6414..000000000 --- a/storage/README.md +++ /dev/null @@ -1,5 +0,0 @@ -## Storage - -This is an implementation of the `artifacts` interface using s3 and should work with any S3 compatible storage service. - -[MinIO](https://min.io/product/overview) is an open source s3 compatible object storage, it can be used standalone or can add a s3 api layer on top of existing providers using MinIO Gateway, for example, [NAS](https://docs.min.io/docs/minio-gateway-for-nas.html) \ No newline at end of file diff --git a/storage/README.rst b/storage/README.rst new file mode 100644 index 000000000..a26396672 --- /dev/null +++ b/storage/README.rst @@ -0,0 +1,25 @@ +.. _storage: + +Storage +------- + +This is an implementation of the ``artifacts`` interface using s3 and should work with any S3 compatible storage service. + +`MinIO `_ is an open source s3 compatible object storage, it can be used standalone or can add a s3 api layer on top of existing providers using MinIO Gateway, for example, `NAS `_ + +Configuration +^^^^^^^^^^^^^ + + s3.access_key + This is the access key for the S3 bucket. Required. + + s3.secret_key + This is the secret key for the S3 bucket. Required. + + s3.region + This is the region that the S3 bucket is located in. Required. + + s3.bucket + This is the name of the S3 bucket. Optional. + + | `Default: mms` \ No newline at end of file diff --git a/twc/README.rst b/twc/README.rst new file mode 100644 index 000000000..1d0f817b8 --- /dev/null +++ b/twc/README.rst @@ -0,0 +1,59 @@ +.. _twc: + +TWC +--- + +The TWC Module provides integration with NoMagic's Teamwork Cloud. + +Configuration +^^^^^^^^^^^^^ + +The TWC Module supports multiple instances of TWC. The following configuration are available, where twc.instances is a list. + + twc.instances[i].url + The url of the REST interface of TWC. + + twc.instances[i].protocol + The protocol to use for the REST interface of TWC. + + twc.instances[i].port + The port for the REST interface of TWC. + + twc.instances[i].aliases + A list of aliases for the REST interface of TWC. + + twc.instances[i].adminUsername + The admin username to use with the defined instance. Required. + + twc.instances[i].adminPwd + The admin password to use with the defined instance. Required. + + twc.instances[i].roles.project_read + The TWC roles to use for MMS project_read permissions. + + twc.instances[i].roles.project_read_commits + The TWC roles to use for MMS project_read_commits permissions. + + twc.instances[i].roles.project_read_permissions + The TWC roles to use for MMS project_read_permissions permissions. + + twc.instances[i].roles.project_edit + The TWC roles to use for MMS project_edit permissions. + + twc.instances[i].roles.project_create_branch + The TWC roles to use for MMS project_create_branch permissions. + + twc.instances[i].roles.project_update_permissions + The TWC roles to use for MMS project_update_permissions permissions. + + twc.instances[i].roles.branch_read + The TWC roles to use for MMS branch_read permissions. + + twc.instances[i].roles.branch_read_permissions + The TWC roles to use for MMS branch_read_permissions permissions. + + twc.instances[i].roles.branch_edit_content + The TWC roles to use for MMS branch_edit_content permissions. + + twc.instances[i].roles.branch_update_permissions + The TWC roles to use for MMS branch_update_permissions permissions. \ No newline at end of file diff --git a/webhooks/README.md b/webhooks/README.md deleted file mode 100644 index 6ffd92f22..000000000 --- a/webhooks/README.md +++ /dev/null @@ -1,23 +0,0 @@ -## Webhooks - -Adds endpoints for registering webhooks per project - -Current triggers are on commit or branch creation - -Commit event: - - { - "projectId": "projectId", - "branchId": "branchId", - "event": "commit", - "payload": {{see CommitJson}} - } - -Branch event: - - { - "projectId": "projectId", - "branchId": "branchId", - "event": "branch_created", - "payload": {{see RefJson}} - } \ No newline at end of file diff --git a/webhooks/README.rst b/webhooks/README.rst new file mode 100644 index 000000000..1a2234fa5 --- /dev/null +++ b/webhooks/README.rst @@ -0,0 +1,33 @@ +.. _webhooks: + +Webhooks +-------- + +Adds endpoints for registering webhooks per project + +Current triggers are on commit or branch creation + +Commit event +^^^^^^^^^^^^ + +.. code-block:: JSON + + { + "projectId": "projectId", + "branchId": "branchId", + "event": "commit", + "payload": {{see CommitJson}} + } + + +Branch event +^^^^^^^^^^^^ + +.. code-block:: JSON + + { + "projectId": "projectId", + "branchId": "branchId", + "event": "branch_created", + "payload": {{see RefJson}} + }