M3 Microservices¶
The m3-microservices repo contains scripts and programs to bring up custom instances of the entire MBARI Media Management (M3) microservice stack using docker-compose. This stack is required inorder to use applications such as VARS. This code repository is used to build and deploy M3 on to the Rachel Carson, Western Flyer, as well as permanant testing stack on the server nexus.shore.mbari.org. It can also be used for interatively testing services during development, allowing a developer to bring up a stack that incoporates features in development.
Basic Usage¶
This repo contains shell scripts, such as dev_derby.sh that do the following:
- Source the appropriate file in
etc/envto set the environment variables needed to configure the microservices for a particular deployment. - Use the docker compose files needed for a particular deployment.
- Pass
docker-composecommands through. For example, to build and run a M3 stack using Apache Derby as the back-end database:
dev_derby.sh build
dev_derby.sh up
Building VARS Apps to Match your Environment¶
There's a build script that will check out the source code from each repository and build the apps from source using your enviroment variables. To run it:
cd m3-microserices
etc/bin/build_apps.sh etc/env/<my_env>
For example, to build against the derby database:
etc/bin/build_apps.sh etc/env/dev_derby
Supported Environments¶
The following M3 environments are supported:
Development¶
dev_derby.shwill launch services using a local Apache Derby database.dev_mbari.shwill launch services using testing databases on fog.shore.mbari.org.dev_sqlserver.shwill launch services using a local SQL Server database which is running in a docker container. The first time you use this service you will need to do some database configuration. See DEV_SQLSERVER.md for more information.
Production¶
prod_minirov.shlaunches services using a local SQL Server database. This stack is for Mini ROV deployments.prod_rc.shis used to launch M3 services on the Rachel Carsonprod_wf.shlaunches M3 services on the Western Flyer.