mattermost-plugin-apps

module
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 15, 2021 License: Apache-2.0

README

mattermost-plugin-apps

CircleCI branch Code Coverage Go Report Card

Proof Of Concept - Mattermost Apps

This plugin is being developed to test some concepts of creating Apps, which do not rely on a Go executable being installed on the Mattermost server/cluster to extend functionality. The Apps will not be able to use Go RPC to communicate with the Mattermost Server, only through the "App Plugin" which acts as a sort of proxy to the server's activity.

Apps will generally be communicating with our REST API and authenticating via OAuth.

This is a precursor to our "Mattermost Apps" and "Mattermost Apps Marketplace" we are currently researching.

Getting Started

Join the "Integrations and Apps" channel to provide thoughts and feedback.

App developer documentation.

Running the tests

mattermost-plugin-apps has two types of tests: unit tests and end to end tests.

Unit tests

To run the unit tests, you just need to execute:

make test
End to end tests

To run the end to end test suite, you need to have the Mattermost server project downloaded and configured in your system. Check the Developer Setup guide on how to configure a local server instance. The tests will search for a mattermost-server folder in the same directory where the mattermost-plugin-apps is.

With the mattermost-server folder present, the only thing that needs to be done before running the tests themselves is to start the Mattermost docker development environment. The environment only needs to be started once, and then the tests can run as many times as needed. To start the docker environment, change to the mattermost-server project directory and run:

make start-docker

Change your directory back to mattermost-plugin-apps and run the end to end test suite with:

make test-e2e

Installing AWS Apps

To install an AWS App you need to set APPS_INVOKE_AWS_ACCESS_KEY and APPS_INVOKE_AWS_SECRET_KEY. These credentials should only allow the invocation of lambda function, not the creation.

Provisioning

To provision an App to AWS you first need to store your AWS access key in an environment variable called APPS_PROVISION_AWS_ACCESS_KEY and the secret key in APPS_PROVISION_AWS_SECRET_KEY.

Only once you need to run go run ./cmd/appsctl/ provision bucket to create the s3 bucket.

To provision an app run go run ./cmd/appsctl/ provision app /PATH/TO/YOUR/APP/BUNDLE. Use --update to update the lambda functions if they already exist. This option should not be used in production.

To provision an app in the cloud environment pipeline will need bundle to be uploaded in S3 as well as the additional terraform data(function names, asset keys, etc.). To generate these terraform variables run go run ./cmd/appsctl/ generate-terraform-data /PATH/TO/YOUR/APP/BUNDLE. It will print the indented json directly in the console. Pipe as needed.

Contacts

Dev: Lev Brouk (@lev.brouk) PM: Aaron Rothschild (@aaron.rothschild)

Directories

Path Synopsis
Package apps provides the data types, constants, and convenience functions for the Mattermost Apps API.
Package apps provides the data types, constants, and convenience functions for the Mattermost Apps API.
build
pluginctl
main handles deployment of the plugin to a development server using the Client4 API.
main handles deployment of the plugin to a development server using the Client4 API.
cmd
examples
go
mocks/mock_appservices
Package mock_appservices is a generated GoMock package.
Package mock_appservices is a generated GoMock package.
mocks/mock_config
Package mock_config is a generated GoMock package.
Package mock_config is a generated GoMock package.
mocks/mock_proxy
Package mock_proxy is a generated GoMock package.
Package mock_proxy is a generated GoMock package.
mocks/mock_store
Package mock_store is a generated GoMock package.
Package mock_store is a generated GoMock package.
mocks/mock_upstream
Package mock_upstream is a generated GoMock package.
Package mock_upstream is a generated GoMock package.
md

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL