mmo is a cli tool for monorepo microservice orchestration. It helps to easily create, build, test and deploy services within the same repo.
Tested on Go > 1.8
MMO supports only installation from source, as there is no support for vendor locked go get.
git clone https://github.com/flowup/mmo.git # clone the repository to your tree
cd mmo
glide i # you need to have glide installed curl https://glide.sh/get | sh
go install . # install actual mmo binary
To see all commands available by the mmo CLI, run:
mmo help
Creating new project can be done using mmo init command. This will automatically create a new mmo project. There are multiple flags that can be overriden when using the mmo init command. See mmo init -h to list them.
mmo init projectname
Every project is by default created with Wercker CI configuration, Kubernetes deployment configs and Glide vendoring. In case you want to override those, see command flags.
Microservice creation is handled by mmo add service command. This automatically creates a new folder for the service, registers it to the project and creates proto files, main, infrastructure and deployment configs.
mmo add service myservice
MMO supports plugin system. Each plugin is single purpose. There are only generation plugins for now and they can be run using command mmo gen. Used plugins can be defined in mmo.yaml in plugins section:
...
plugins:
- some-plugin:latest
- another-plugin:0.1
...
flowup/mmo-gen-go-grpc - Plugin generates gRPC Go API stub and server from protofile /service/protobuf/proto.proto, output is saved to /service/proto.pb.goflowup/mmo-gen-grpc-gateway - Plugin generates rest API gateway from protofile /service/protobuf/proto.proto, output is saved to /service/proto.pb.gw.goflowup/mmo-gen-swagger - Plugin generates swagger definition from protofile /service/protobuf/proto.proto, output is saved to /service/swagger.jsonflowup/mmo-plugin-godelermmo init myproject, then cd myprojectmmo add service --gateway exampleserviceflowup/mmo-gen-go-grpc and flowup/mmo-gen-grpc-gateway to mmo.yaml manifestexampleservice/protobuf/proto.protoglide up - later use only glide install and glide getmmo gen to generate API stubs, servers and gatewayexampleservice/service.go according to new generated API serverContent type
Image
Digest
Size
389.9 MB
Last updated
almost 9 years ago
docker pull flowup/mmo-gen-swagger